For all problems, unless otherwise indicated, assume a Type 1 error rate = .05.
An experiment is conducted that compares the effects of three different levels of stress on cortisol secretion: high, medium, and low stress. Below are the data:
High Stress | 77 | 63 | 80 | 45 | 86 | 72 |
---|---|---|---|---|---|---|
Medium Stress | 34 | 72 | 60 | 44 | 39 | 48 |
Low Stress | 51 | 44 | 29 | 48 | 33 | 32 |
Using R, conduct a one-way ANOVA on these data.
The R code is in homework_2.R to produce:
Response: Cortisol_Secretion Df Sum Sq Mean Sq F value Pr(>F) Stress_Level 2 3004.00 1502.00 8.96 0.002753 ** Residuals 15 2514.50 167.63
To double check, the SAS program homework_2.sas gives similar output:
Sum of Source DF Squares Mean Square F Value Pr > F Model 2 3004.00 1502.000000 8.96 0.0028 Error 15 2514.50 167.633333 Corrected Total 17 5518.50
Indicate whether you reject the null hypothesis.
There is only a 0.275% chance that this data came from a central F-distribution. This is less than the 5% cutoff required to reject, so H0 is rejected.
Compute an estimate of the population value for Cohen's f.
Cohen's magnitudes for effect size are:
Size | Cohen's d | Cohen's f |
---|---|---|
Small | 0.2 | 0.1 |
Medium | 0.5 | 0.25 |
Large | 0.8 | 0.4 |
No unbiased estimator of f is known. An only slightly biased estimator for equal sized groups is:
The R code in homework_2.R produces which is large.
Another suggested slightly biased estimator is:
The R code in homework_2.R produces .
Is the R2 value listed in the SAS output an optimal measure of the proportion of variance in cortisol values accounted for by stress? Explain.
This proportion varies between 0 (all variability is within groups) and 1 (all variability is between groups).
Typically, R2 will overestimate r2. The amount of this bias is proportional to the ratio between the degrees of freedom. A "shrunken" value can take this into account and will give a less biased estimate:
R gives both values:
Multiple R.Squared: 0.5444, Adjusted R.squared: 0.4836
SAS gives just R2:
R-Square Coeff Var Root MSE cortisol Mean 0.544351 24.35234 12.94733 53.16667
Compute two alternative measures of proportion of variance.
One measure is listed above. The other is :
The R code in homework_2.R produces which is less than .
Suppose that you are planning a study to compare the effects of four recall-cue conditions (denoted A, B, C, and D) on memory for spatial relations. The primary dependent measure will be the number of spatial relations accurately recalled.
You assume that the within-population standard deviations all equal 9. You set the Type 1 error rate at α = .05. You presume that the population means will have the following values: uA = 17.5, uB = 19, uC = 25, and uD = 20.5. You intend to run 80 subjects in all, with equal n's across all 4 groups. You plan on conducting a one-way ANOVA. Using GLMPOWER
, compute your power to reject the null hypothesis under these conditions.
You have the same Type 1 error rate and make the same assumptions about the population standard deviation and the population means as in part a. You still have 80 subjects in all but now you want to know how power might change by running 10 subjects in groups A, B, and D and 50 subjects in group C. Using GLMPOWER
, determine the power under this subject allocation scheme. How would it compare to the power under the scheme noted in part a? Why do you think your power differs in the two cases?
From SAS, I get:
Power 0.680
I don't know how to do this calculation automatically in R. So, calculating the answer requires returning to the theoretical basis.
The conceptual structure of the F-distribution is built as a combination of other distributions:
My R code comes up with the same value as SAS: 0.680. Power increases slightly because the non-centrality parameter increased from 7.778 to 8.889. It is important to recall that power is the likelihood of a correct rejection. As the real distribution moves to the right (with an increase in λ), it increases the likelihood that the sampled value will be greater than the critical value for the central F.
Again, you assume that the within-population standard deviations all equal 9. You set the Type 1 error rate at α = .05. You are assuming that you want to conduct the study with equal sample sizes in the groups. You do not think that you know enough to be able to accurately estimate the specific values of the population means. However, you do know that you want to have at least 80% power to detect a medium effect size (f = .25) Using GLMPOWER
, determine what the group sample sizes should be.
HINT: It really doesn't matter what the precise pattern of 4 population means is, as long as it results in an f = .25. So, you might consider:
R uses the between and within group variances to compute power rather than a set of means. This means that the issue is finding a relationship between those characteristics rather than coming up with an appropriate set of means. Cohen's f is simply the ratio of the standard deviation between populations to the deviation within with populations. This means that given f and σy:
R computes:
Balanced one.way analysis of variance power calculation groups = 4 n = 59.13301 between.var = 5.0625 within.var = 81 sig.level = 0.05 power = 0.8
Let's say that a researcher conducts an experiment assessing whether males and females differ in verbal learning. Subjects are forced to perform a demanding secondary task when being exposed to verbal stimuli. Then number of verbal stimuli recalled is assessed. 40 married couples are randomly sampled (leading to 40 male and 40 female subjects and 80 subjects in all). The experimenter analyzes the data as a between-groups t test comparing the male and female groups. She finds that t(76) = 1.83, p < .07, and concludes that there is not sufficient evidence to reject the null hypothesis. Comment.
One of the assumptions of the t-test is the independence of sample populations. Husbands and wives are very likely positively correlated in verbal capacity. The violation of the assumption of independence reduces the power of the test. The experimenter should choose a test statistic that takes into account the correlation such as a paired t-test.
Two effect size measures that we have talked about are Cohen's d for the two group t-test situation and Cohen's f for the one-way ANOVA. The formulas for these measures are as follows:
It is well known that if you have two groups in the context of a between-groups design, you can do either a t-test or a one-way ANOVA. Correspondingly, one would expect that there would be a predictable mathematical relation between Cohen's d and f in the case of a two-group design. In fact, consideration of Cohen's recommendations for small, medium, and large effect sizes indicates such a relation. He has described small, medium, and large effect size d values of .2, .5, and .8 respectively, and f values of .1, .25 and .4, respectively. Using the formulas for d and f shown above, algebraically derive the relation between d and f.