Epidemiology for Health and Medical Sciences II - Assignment 2
VerifiedAdded on ย 2023/06/03
|7
|2457
|122
AI Summary
This assignment involves conducting an independent samples t-test and a chi-square test to determine the association between the treatment that participants were allocated and whether the participants dropped out. It also includes checking for differences in the baseline depression scores of participants who dropped out. The output is in Stata format.
Contribute Materials
Your contribution can guide someoneโs learning journey. Share your
documents today.
1
Epidemiology for Health and Medical Sciences II โ Semester 2, 2018
ASSIGNMENT 2
Student Name:
Instructor Name:
Course Number:
13 October 2018
Epidemiology for Health and Medical Sciences II โ Semester 2, 2018
ASSIGNMENT 2
Student Name:
Instructor Name:
Course Number:
13 October 2018
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
2
Question 1 [14 marks]
The mean and standard deviation of the BDI-II score for each treatment group after treatment can be seen
in the table below:
Group Mean Standard
Deviation
Number
Blended 14.442 11.363 43
Full BA 12.024 9.923 42
Using the equations seen in the lectures, the estimated standard error of the difference in sample means
(i.e. ๐๐ ๐ก๐๐๐๐ก๐๐[๐ . ๐.(๐ฅฬ ๐ต๐ โ ๐ฅฬ ๐น๐ข๐๐ ๐ต๐ด)]) can be calculated by hand to be 2.32. Using this information, follow
the steps below to conduct an independent samples t-test to assess the evidence that Full BA is better than
Blended treatment reducing depression scores (on average).
(a) State the Null Hypothesis and the Alternative Hypothesis for the research question of interest.
Answer
Null Hypothesis (H0): There is no significant difference in the average depression scores for the
Blended and Full BA groups.
Alternative Hypothesis (HA): The average depression scores for Full BA is significantly less than that
of the Blended group.
(a) What was the difference in mean BDI-II scores (Blended โ Full BA)?
Answer
๐ฅฬ ๐ต๐ โ ๐ฅฬ ๐น๐ข๐๐ ๐ต๐ด โ 14.442 โ 12.024 = 2.418
(b) State the expected difference in sample mean BDI-II scores under the Null Hypothesis.
Answer
The expected difference is zero i.e.
๐ฅฬ ๐ต๐ โ ๐ฅฬ ๐น๐ข๐๐ ๐ต๐ด= 0
(c) Calculate the value of the test statistic for the difference in mean depression scores. Show your
working (it may be hand written on typed)!
Answer
The t-value is computed as follows
๐ก = ๐ฅฬ 1 โ ๐ฅฬ 2
๐ ๐
โ๐1 + ๐2
= ๐ท
๐ ๐
โ๐1 + ๐2
๐ท = 2.418
๐ ๐ = โ(๐1 โ 1)๐ 1
2 + (๐2 โ 1)๐ 2
2
๐1 + ๐2 โ 2 = โ(43 โ 1)11.3632 + (42 โ 1)9.9232
43 + 42 โ 2 = โ113.9765
= 10.67598
๐ก = 2.418
10.67598
โ43 + 42
=2.088132
2 = 1.044066
Question 1 [14 marks]
The mean and standard deviation of the BDI-II score for each treatment group after treatment can be seen
in the table below:
Group Mean Standard
Deviation
Number
Blended 14.442 11.363 43
Full BA 12.024 9.923 42
Using the equations seen in the lectures, the estimated standard error of the difference in sample means
(i.e. ๐๐ ๐ก๐๐๐๐ก๐๐[๐ . ๐.(๐ฅฬ ๐ต๐ โ ๐ฅฬ ๐น๐ข๐๐ ๐ต๐ด)]) can be calculated by hand to be 2.32. Using this information, follow
the steps below to conduct an independent samples t-test to assess the evidence that Full BA is better than
Blended treatment reducing depression scores (on average).
(a) State the Null Hypothesis and the Alternative Hypothesis for the research question of interest.
Answer
Null Hypothesis (H0): There is no significant difference in the average depression scores for the
Blended and Full BA groups.
Alternative Hypothesis (HA): The average depression scores for Full BA is significantly less than that
of the Blended group.
(a) What was the difference in mean BDI-II scores (Blended โ Full BA)?
Answer
๐ฅฬ ๐ต๐ โ ๐ฅฬ ๐น๐ข๐๐ ๐ต๐ด โ 14.442 โ 12.024 = 2.418
(b) State the expected difference in sample mean BDI-II scores under the Null Hypothesis.
Answer
The expected difference is zero i.e.
๐ฅฬ ๐ต๐ โ ๐ฅฬ ๐น๐ข๐๐ ๐ต๐ด= 0
(c) Calculate the value of the test statistic for the difference in mean depression scores. Show your
working (it may be hand written on typed)!
Answer
The t-value is computed as follows
๐ก = ๐ฅฬ 1 โ ๐ฅฬ 2
๐ ๐
โ๐1 + ๐2
= ๐ท
๐ ๐
โ๐1 + ๐2
๐ท = 2.418
๐ ๐ = โ(๐1 โ 1)๐ 1
2 + (๐2 โ 1)๐ 2
2
๐1 + ๐2 โ 2 = โ(43 โ 1)11.3632 + (42 โ 1)9.9232
43 + 42 โ 2 = โ113.9765
= 10.67598
๐ก = 2.418
10.67598
โ43 + 42
=2.088132
2 = 1.044066
3
(d) State the number of degrees of freedom for this test statistic.
Answer
The degrees of freedom (๐๐) is given as;
๐๐ = 43 + 42 โ 2 = 83
(e) Draw a rough sketch of the distribution which your test statistic would follow if the Null Hypothesis
were true, and shade the area corresponding to the probability of observing values of the test
statistic as or more extreme than the observed test statistic.
Answer
The sketch is given below;
[2 marks]
(f) Using your Statistical Table for the t distribution (Table 3), find the probability of observing a test
statistic as or more extreme than the value from (d), if the Null Hypothesis were true. [Note: Please
remember that Table 3 provides two-sided probabilities so equivalent one-sided probabilities will
be half of those stated for two-sided tests.]
Answer
The p-value associated with the p-value is given as;
P = .8503.
(g) Based on your result from (g), comment on the strength of the evidence against the Null
Hypothesis.
Answer
From the above results, we observe that the p-value is 0.8503 (a value greater than 5% level of
significance), we therefore fail to reject the null hypothesis and conclude that the average
depression scores for Full BA is significantly less than that of the Blended group. Thus there is no
evidence that Full BA is better than Blended treatment reducing depression scores.
(d) State the number of degrees of freedom for this test statistic.
Answer
The degrees of freedom (๐๐) is given as;
๐๐ = 43 + 42 โ 2 = 83
(e) Draw a rough sketch of the distribution which your test statistic would follow if the Null Hypothesis
were true, and shade the area corresponding to the probability of observing values of the test
statistic as or more extreme than the observed test statistic.
Answer
The sketch is given below;
[2 marks]
(f) Using your Statistical Table for the t distribution (Table 3), find the probability of observing a test
statistic as or more extreme than the value from (d), if the Null Hypothesis were true. [Note: Please
remember that Table 3 provides two-sided probabilities so equivalent one-sided probabilities will
be half of those stated for two-sided tests.]
Answer
The p-value associated with the p-value is given as;
P = .8503.
(g) Based on your result from (g), comment on the strength of the evidence against the Null
Hypothesis.
Answer
From the above results, we observe that the p-value is 0.8503 (a value greater than 5% level of
significance), we therefore fail to reject the null hypothesis and conclude that the average
depression scores for Full BA is significantly less than that of the Blended group. Thus there is no
evidence that Full BA is better than Blended treatment reducing depression scores.
4
Question 2 [4 marks]
The Stata dataset depression.dta contains data from the study. Specifically, it contains the following
variables that may be of interest to us:
Participants: Participantsโ coded study ID
Arm: Treatment group that each participant was randomly assigned to receive (i.e. โBlendedโ or โFull BAโ)
BDIpre: Participantsโ score on the BDI-II at the start of the study (i.e. at baseline)
BDIpost: Participantsโ score on the BDI-II after treatment
bdifu: Participantsโ score on the BDI-II 6 months after treatment
Dropouts: Indication of whether participants dropped out of the study.
Download the data file depression.dta and save it to your personal directory. Proceed to open the dataset
in Stata using the instructions from the computer practicals.
(a) Use the ttest command in Stata to repeat the comparison of mean depression scores after
treatment between the Blended and Full BA groups. Check that the output from Stata agrees with
your calculations from Question 1 and comment. [Remember to include the Stata output in your
answer, and to use a fixed-width font like Courier New to display the output].
Answer
As can be seen, the output table above agrees with the manual calculations that were done in
Question 1.
(b) Given the assignment aims stated earlier, is a one-sided or two-sided test more appropriate for this
comparison? If our aims were different and we selected the other type of test, explain the
potential consequence.
Answer
A one-sided test is more appropriate for this comparison. Selecting other type of test not needed
might result in either type I or type II error. Any of the errors (either type I or type II error) might
therefor lead to biased conclusions.
Pr(T < t) = 0.8503 Pr(|T| > |t|) = 0.2995 Pr(T > t) = 0.1497
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Ho: diff = 0 degrees of freedom = 83
diff = mean(Blended) - mean(Full BA) t = 1.0440
diff 2.418051 2.316048 -2.188475 7.024577
combined 85 13.24706 1.158564 10.68143 10.94313 15.55099
Full BA 42 12.02381 1.531128 9.922844 8.931634 15.11599
Blended 43 14.44186 1.732787 11.36264 10.94496 17.93877
Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Two-sample t test with equal variances
. ttest bdipost, by(arm)
Question 2 [4 marks]
The Stata dataset depression.dta contains data from the study. Specifically, it contains the following
variables that may be of interest to us:
Participants: Participantsโ coded study ID
Arm: Treatment group that each participant was randomly assigned to receive (i.e. โBlendedโ or โFull BAโ)
BDIpre: Participantsโ score on the BDI-II at the start of the study (i.e. at baseline)
BDIpost: Participantsโ score on the BDI-II after treatment
bdifu: Participantsโ score on the BDI-II 6 months after treatment
Dropouts: Indication of whether participants dropped out of the study.
Download the data file depression.dta and save it to your personal directory. Proceed to open the dataset
in Stata using the instructions from the computer practicals.
(a) Use the ttest command in Stata to repeat the comparison of mean depression scores after
treatment between the Blended and Full BA groups. Check that the output from Stata agrees with
your calculations from Question 1 and comment. [Remember to include the Stata output in your
answer, and to use a fixed-width font like Courier New to display the output].
Answer
As can be seen, the output table above agrees with the manual calculations that were done in
Question 1.
(b) Given the assignment aims stated earlier, is a one-sided or two-sided test more appropriate for this
comparison? If our aims were different and we selected the other type of test, explain the
potential consequence.
Answer
A one-sided test is more appropriate for this comparison. Selecting other type of test not needed
might result in either type I or type II error. Any of the errors (either type I or type II error) might
therefor lead to biased conclusions.
Pr(T < t) = 0.8503 Pr(|T| > |t|) = 0.2995 Pr(T > t) = 0.1497
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Ho: diff = 0 degrees of freedom = 83
diff = mean(Blended) - mean(Full BA) t = 1.0440
diff 2.418051 2.316048 -2.188475 7.024577
combined 85 13.24706 1.158564 10.68143 10.94313 15.55099
Full BA 42 12.02381 1.531128 9.922844 8.931634 15.11599
Blended 43 14.44186 1.732787 11.36264 10.94496 17.93877
Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Two-sample t test with equal variances
. ttest bdipost, by(arm)
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
5
Question 3 [12 marks]
One of the variables in the dataset describes whether participants dropped out of the study at some stage.
This variable is called Dropouts. A common concern in randomised controlled trials is that participants
dropping out of a study might compromise the estimate of the difference in treatment means if more
participants drop out of one treatment group than the other. In other words, there may be an interest in
determining whether there an association between (1) the treatment that participants were allocated and
(2) whether the participants dropped out.
The following information is known about drop outs in the two treatment groups:
๏ท In the Blended treatment group, 3 participants dropped out and 43 did not.
๏ท In the Full BA treatment group, 5 participants dropped out and 42 did not.
(a) Create a 2x2 table with the numbers above, including row and column totals and labels.
Answer
Group Dropped Did Not drop Total
Blended 3 43 46
Full BA 5 42 47
Total 8 85 93
(b) State the Null and Alternative Hypotheses for the research question of interest here.
Answer
Null Hypothesis (H0): There is no significant association between the treatment that participants
were allocated and whether the participants dropped out.
Alternative Hypothesis (HA): There is significant association between the treatment that
participants were allocated and whether the participants dropped out.
(c) Calculate the expected values in the table, if the Null Hypothesis is true.
Answer
๐ธ11 = 8 โ 46
93 = 3.956989
๐ธ12 = 85 โ 46
93 = 42.04301
๐ธ21 = 8 โ 47
93 = 4.043011
๐ธ22 = 85 โ 47
93 = 42.95699
(d) We can use the information from parts (a), (b) and (c) above to calculate that the ๐2 statistic for
this table to show that it is 0.50. Explain the steps you would take to manually calculate this
statistic. [You donโt have to actually do the calculations; just state how you would perform them].
Answer
To obtain the ๐2 statistic we compute the square of the difference in the observed values and the
expected values divided by the expected value. We then sum all the value to obtain the ๐2 statistic.
That is we use the following formula;
Question 3 [12 marks]
One of the variables in the dataset describes whether participants dropped out of the study at some stage.
This variable is called Dropouts. A common concern in randomised controlled trials is that participants
dropping out of a study might compromise the estimate of the difference in treatment means if more
participants drop out of one treatment group than the other. In other words, there may be an interest in
determining whether there an association between (1) the treatment that participants were allocated and
(2) whether the participants dropped out.
The following information is known about drop outs in the two treatment groups:
๏ท In the Blended treatment group, 3 participants dropped out and 43 did not.
๏ท In the Full BA treatment group, 5 participants dropped out and 42 did not.
(a) Create a 2x2 table with the numbers above, including row and column totals and labels.
Answer
Group Dropped Did Not drop Total
Blended 3 43 46
Full BA 5 42 47
Total 8 85 93
(b) State the Null and Alternative Hypotheses for the research question of interest here.
Answer
Null Hypothesis (H0): There is no significant association between the treatment that participants
were allocated and whether the participants dropped out.
Alternative Hypothesis (HA): There is significant association between the treatment that
participants were allocated and whether the participants dropped out.
(c) Calculate the expected values in the table, if the Null Hypothesis is true.
Answer
๐ธ11 = 8 โ 46
93 = 3.956989
๐ธ12 = 85 โ 46
93 = 42.04301
๐ธ21 = 8 โ 47
93 = 4.043011
๐ธ22 = 85 โ 47
93 = 42.95699
(d) We can use the information from parts (a), (b) and (c) above to calculate that the ๐2 statistic for
this table to show that it is 0.50. Explain the steps you would take to manually calculate this
statistic. [You donโt have to actually do the calculations; just state how you would perform them].
Answer
To obtain the ๐2 statistic we compute the square of the difference in the observed values and the
expected values divided by the expected value. We then sum all the value to obtain the ๐2 statistic.
That is we use the following formula;
6
๐2 = โ(๐โ๐ธ)2
๐ธ
(e) What is the number of degrees of freedom for this test statistic?
Answer
๐๐ = (๐ โ 1)(๐ถ โ 1)
๐๐ =(2 โ 1)(2 โ 1) = 1
(f) Using your Statistical Table for the ๐2 distribution, find the (approximate) probability of observing a
test statistic as or more extreme than the one you have calculated, if the Null Hypothesis is true.
Answer
From the tables, we obtain the probability to be;
P = 0.4795
(g) Based on your answer in (f), comment on the evidence against the Null Hypothesis.
Answer
The p-value is 0.4795 (a value greater than 5% level of significance), we therefore fail to reject the
null hypothesis and conclude that there in significant evidence against the Null Hypothesis. That is,
we conclude that there is no significant association between the treatment that participants were
allocated and whether the participants dropped out.
Question 4 [7 marks]
(a) Use the tabi command in Stata to reproduce the chi-square test you carried out in Question 3.
Check that your results are consistent. Include your output (using a fixed-width font!) and note
(using highlighting, arrows or similar) the parts of the output that identify the chi-square test
statistic and the probability of observing a statistic as or more extreme under the Null Hypothesis.
Answer
The results are consistent with the previous answers obtained
(b) Another concern relating to dropouts in randomised controlled trials relates to the fact that the
results of the study (i.e. the comparison of means in this context) will not be generalisable to the
population. This might happen for instance if all of the participants dropping out are much older
than those who remain in the study and could be checked by using the following Stata command
and considering the resulting output:
tab Dropouts, summarize(Age)
| Summary of Age
Dropouts | Mean Std. Dev. Freq.
------------+------------------------------------
No | 30.717647 10.827227 85
Pearson chi2(1) = 0.5011 Pr = 0.479
Total 85 8 93
Full BA 42 5 47
Blended 43 3 46
Arm No Yes Total
Dropouts
. tabulate arm dropouts, chi2
Chi-Square Value P-value
๐2 = โ(๐โ๐ธ)2
๐ธ
(e) What is the number of degrees of freedom for this test statistic?
Answer
๐๐ = (๐ โ 1)(๐ถ โ 1)
๐๐ =(2 โ 1)(2 โ 1) = 1
(f) Using your Statistical Table for the ๐2 distribution, find the (approximate) probability of observing a
test statistic as or more extreme than the one you have calculated, if the Null Hypothesis is true.
Answer
From the tables, we obtain the probability to be;
P = 0.4795
(g) Based on your answer in (f), comment on the evidence against the Null Hypothesis.
Answer
The p-value is 0.4795 (a value greater than 5% level of significance), we therefore fail to reject the
null hypothesis and conclude that there in significant evidence against the Null Hypothesis. That is,
we conclude that there is no significant association between the treatment that participants were
allocated and whether the participants dropped out.
Question 4 [7 marks]
(a) Use the tabi command in Stata to reproduce the chi-square test you carried out in Question 3.
Check that your results are consistent. Include your output (using a fixed-width font!) and note
(using highlighting, arrows or similar) the parts of the output that identify the chi-square test
statistic and the probability of observing a statistic as or more extreme under the Null Hypothesis.
Answer
The results are consistent with the previous answers obtained
(b) Another concern relating to dropouts in randomised controlled trials relates to the fact that the
results of the study (i.e. the comparison of means in this context) will not be generalisable to the
population. This might happen for instance if all of the participants dropping out are much older
than those who remain in the study and could be checked by using the following Stata command
and considering the resulting output:
tab Dropouts, summarize(Age)
| Summary of Age
Dropouts | Mean Std. Dev. Freq.
------------+------------------------------------
No | 30.717647 10.827227 85
Pearson chi2(1) = 0.5011 Pr = 0.479
Total 85 8 93
Full BA 42 5 47
Blended 43 3 46
Arm No Yes Total
Dropouts
. tabulate arm dropouts, chi2
Chi-Square Value P-value
7
Yes | 29.625 16.944763 8
------------+------------------------------------
Total | 30.623656 11.356777 93
Use an appropriate Stata command to check whether there are differences in the baseline
depression scores (at the start of the study) of participants who dropped out (include your output
using a fixed-width font!) and then comment, on the basis of these two variables, whether there
appears to be a threat to the generalisability of the results.
Answer
Even though the mean depression scores for those who dropped (M = 26.88, SD = 21.32) was seen
to be slightly lower than that of those who did not drop (M = 28.25, SD = 8.12), the difference was
insignificant. There seems to be no significant difference in the baseline depression scores for those who
dropped from the study and those who did not (p > 0.05). There therefore appears not to be any threat to
the generalisability of the results
Question 5 [3 marks]
In the Results section of the Abstract of the paper, the authors comment that there were โsignificant
improvements in both groups across time on the primary outcome measureโ. Explain whether results like
this could have been achieved through the use of an independent samples t-test or a dependent/paired
samples t-test and state appropriate Null and Alternative hypotheses for this test.
Answer
The results could be achieved through the use of a dependent/paired samples t-test. The appropriate Null
an Alternative hypothesis for this test would be;
Null Hypothesis (H0): There is no significant difference in the average outcome measure before and after
the intervention.
Alternative Hypothesis (HA): There is significant difference in the average outcome measure before and
after the intervention.
The null hypothesis is applied to both the groups.
Pr(T < t) = 0.6777 Pr(|T| > |t|) = 0.6445 Pr(T > t) = 0.3223
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Ho: diff = 0 degrees of freedom = 91
diff = mean(No) - mean(Yes) t = 0.4629
diff 1.372059 2.963787 -4.515139 7.259257
combined 93 28.12903 .8274772 7.979901 26.48559 29.77247
Yes 8 26.875 2.348537 6.642665 21.32159 32.42841
No 85 28.24706 .8805247 8.118037 26.49604 29.99808
Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Two-sample t test with equal variances
. ttest bdipre, by( dropouts)
Yes | 29.625 16.944763 8
------------+------------------------------------
Total | 30.623656 11.356777 93
Use an appropriate Stata command to check whether there are differences in the baseline
depression scores (at the start of the study) of participants who dropped out (include your output
using a fixed-width font!) and then comment, on the basis of these two variables, whether there
appears to be a threat to the generalisability of the results.
Answer
Even though the mean depression scores for those who dropped (M = 26.88, SD = 21.32) was seen
to be slightly lower than that of those who did not drop (M = 28.25, SD = 8.12), the difference was
insignificant. There seems to be no significant difference in the baseline depression scores for those who
dropped from the study and those who did not (p > 0.05). There therefore appears not to be any threat to
the generalisability of the results
Question 5 [3 marks]
In the Results section of the Abstract of the paper, the authors comment that there were โsignificant
improvements in both groups across time on the primary outcome measureโ. Explain whether results like
this could have been achieved through the use of an independent samples t-test or a dependent/paired
samples t-test and state appropriate Null and Alternative hypotheses for this test.
Answer
The results could be achieved through the use of a dependent/paired samples t-test. The appropriate Null
an Alternative hypothesis for this test would be;
Null Hypothesis (H0): There is no significant difference in the average outcome measure before and after
the intervention.
Alternative Hypothesis (HA): There is significant difference in the average outcome measure before and
after the intervention.
The null hypothesis is applied to both the groups.
Pr(T < t) = 0.6777 Pr(|T| > |t|) = 0.6445 Pr(T > t) = 0.3223
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Ho: diff = 0 degrees of freedom = 91
diff = mean(No) - mean(Yes) t = 0.4629
diff 1.372059 2.963787 -4.515139 7.259257
combined 93 28.12903 .8274772 7.979901 26.48559 29.77247
Yes 8 26.875 2.348537 6.642665 21.32159 32.42841
No 85 28.24706 .8805247 8.118037 26.49604 29.99808
Group Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
Two-sample t test with equal variances
. ttest bdipre, by( dropouts)
1 out of 7
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
ย +13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
ยฉ 2024 ย | ย Zucol Services PVT LTD ย | ย All rights reserved.