5: ANOVA
Exercise 1 Investigators are planning a study that will be analyzed using a one-way ANOVA. The factor variable is dose of medication and the response variable \(Y\) is serum concentration. They plan to evaluate four different doses: 0, 10, 20 and 30 milligrams. The expect the means will be 0, 20, 25 and 35, respectively. They assume that \(\sigma=30\).
They will use the one-way ANOVA model \(Y_{ij} = \mu + \alpha_i + \epsilon_{ij}\) where \(\sum_i \alpha_i = 0\). What are the values of \(\alpha_1,\alpha_2, \alpha_3,\alpha_4\) for this study?
What is the standard deviation of the effects, \(\sigma_e\)? What is the \(f\) effect size? Is the effect size small, medium or large?
For a balanced design, what sample size is needed per group in order to obtain \(90\%\) power for an omnibus \(F\) test, for \(\alpha=0.05\)?
The investigators plan to conduct to test whether the mean of the means for the groups assigned to 10, 20 and 30 milligrams is equal to the mean for the group assigned to 0 milligrams. Express the contrast coefficient vector for this contrast. For groups of size 10, compute the power for a two-sided contrast test with \(\alpha\) of 0.05.
Exercise 2 A study seeks to investigate the effects of training time on hand grip strength, which is measured in kilograms. Men aged 60-75 will be randomized to 4 groups, with 25 in each group. The 4 groups will receive 0, 30, 60 and 90 minutes of training per week for 6 weeks. The standard deviation of hand grip strength in this population is expected to be 8.5 kg. It is planned that the data will be analyzed using a one-way ANOVA. The investigators expect that the group means will be 40, 42, 44 and 46.
Compute the factors effects, the standard deviation of the effects, the ANOVA standardized effect sizes and the \(f\) effect size.
Compute power for the omnibus F test for the one-way ANOVA, using \(\alpha\) of 0.05.
If you are helping to plan this study, would you recommend that the study be powered based on the omnibus F test? Why or why not?
We can use a linear contrast to test whether there is a linear trend among the group means. A linear trend implies that for each change in group level, the mean increases by a fixed amount. For a four-group ANOVA, the contrast coefficients for a linear contrast are \((c_1, c_2, c_3, c_4) = (-3, -1, 1, 3)\). Compute power for this linear contrast test at significance level \(0.05\).
Exercise 3 An experiment is being designed to test whether the time to complete a math problem varies by the font type. Three different font types will be used: Arial, Bauhaus and Courier.
What sample size per group is needed to detect a medium \(f\) effect size (\(f = 0.25\)) for an omnibus test with 90% power when using a significance level of 0.05?
The standard deviation of time-to-complete is expected to be about 30 seconds. Provide two different sets of means \((\mu_A, \mu_B, \mu_C)\) that would correspond to an \(f\) effect size of 0.25.
The investigators plan to compare all means pairwise. How many comparisons will there be?
Suppose that the means of time-to-complete are expected to be \((\mu_A, \mu_B, \mu_C) = (60, 65, 75)\) with SD of 30 seconds. Assuming equal allocation to groups, find the smallest group size that will provide at least 80% power for testing each pairwise contrast, using two-sided tests and a Bonferroni correction to control the familywise error rate at 0.05.
include a part about adjusting for a covariate, score on a quantitative aptitude test…
Exercise 4 Investigator are planning a study with a \(2 \times 2\) factorial design. They expect the following means:
B1 | B2 | |
---|---|---|
A1 | 15 | 21 |
A2 | 19 | 25 |
The population SD is assumed to be 12.
These means assume there are no interactions. Calculate the values of the parameters \(\mu, \alpha_1, \alpha_2, \beta_1, \beta_2\). The parameters should satisfy the zero-sum constraints.
Calculate the \(f\) effect sizes for factors A and B.
Determine the smallest sample size per cell that is needed to ensure at least \(80\%\) power for both factors. Assume equal sample sizes per cell.
Suppose that the investigators expect that for subjects getting B2, the level of factor A will have no effect. The postulated cell means are:
B1 | B2 | |
---|---|---|
A1 | 15 | 23 |
A2 | 19 | 23 |
Calculate the values of the parameters \(\mu, \alpha_1, \alpha_2, \beta_1, \beta_2\) and all of the \((\alpha\beta_{ij})\). The parameters should satisfy the zero-sum constraints.
Calculate the \(f\) effect sizes for factors A and B and for the interaction.
Determine the sample size per cell that is needed to ensure at least \(80\%\) power for both factors and the interaction effect. Assume equal sample sizes per cell.
Exercise 5 Investigators are planning a 2x2 factorial ANOVA study to test the separate and joint effects of two treatments, A and B. They postulate the following means at follow-up:
B | No B | |
---|---|---|
A | 10 | 20 |
No A | 15 | 30 |
The within-group SD is assumed to be 20.
Derive a table of effects for this study.
Does the table of means imply an interaction between Factors A and B? If so, is the interaction effect small, medium or large?
Suppose that the investigators are only interested in testing for the main effects of A and B and want 80% power for both. What n per group and total N are needed? Use two-sided tests at alpha of 0.05 for all tests.
Suppose the investigators are interested in testing for the main effects of A and B and the interaction effect AB and want 80% power for all 3 tests. What n per group and total N are needed? Use two-sided tests at alpha of 0.05 for all tests.
Plot power versus sample size for a reasonable range of sample sizes around the n your found in part (d). For example, if you found n=100, plot power for n of 80-120.
Write a short description of your calculation in parts (d) and (e) appropriate for a report. The description should include your assumptions and analysis method in addition to the results of the calculations.
Exercise 6 One-way ANOVA can be regarded as an extension of the two-sample \(t\) test with equal variances to more than 2 means. In this problem, we demonstrate the equivalence of a one-way ANOVA with two groups and an equal variance two-sample \(t\) test.
Suppose that \(Y_{1i} \sim N(\mu_1, \sigma^2)\) and \(Y_{2i} \sim N(\mu_2, \sigma^2)\), with all \(Y_{1i}\) and \(Y_{2i}\) independent. We collect samples of size \(n\) from each group and we wish to test the hypotheses \(H_0 \colon \mu_1=\mu_2\) versus \(H_A \colon \mu_1 \neq \mu_2\) at two-sided \(\alpha=0.05\).
Provide the test statistic \(T\) for testing these hypotheses using a two-sample \(t\) test and give its distribution when the null is true and when some alternative \(\mu_1 \neq \mu_2\) is true. Express sample size in terms of group size \(n\) rather than total sample size \(N\).
Provide the test statistic \(F\) for testing these hypotheses using a one-way ANOVA approach and give its distribution when the null is true and when some alternative \(\mu_1 \neq \mu_2\) is true. Express sample size in terms of group size \(n\) rather than total sample size \(N\).
In the one-way ANOVA model, we parametrize the group means as \(\mu_i = \mu + \alpha_i\), where \(\mu\) is the grand mean (mean of the group means) and \(\sum_i \alpha_i = 0\). When there are two groups, the grand mean is \(\mu=(\mu_1+\mu_2)/2\). Show that when there are two groups, \(\sum_i \alpha_i^2 = \frac{(\mu_1-\mu_2)^2}{2}\).
Show that the squared noncentrality parameter for \(T\) is equal to the noncentrality parameter for \(F\).
The Cohen standardized effect size is \(d = \frac{\mu_1-\mu_2}{\sigma}\). The \(f\) effect size for one-way ANOVA is \(f = \frac{\sigma_e}{\sigma}\) where \(\sigma_e = \sqrt{\frac{\sum_i \alpha_i^2}{a}}\). Show that \(f = d/2\).
Cohen defined small, medium and large effect sizes for comparing two means as \(d\) of 0.2, 0.5 and 0.8. He also defined small, medium and large effects in an ANOVA as \(f\) of 0.1, 0.25 and 0.4. Do these effect sizes imply the same difference between two means?