In: Statistics and Probability
A researcher is interested in studying the effect that the amount of fat in the diet and amount of exercise has on the mental acuity of middle-aged women. The researcher used three different treatment levels for the diet and two levels for the exercise. The results of the acuity test for the subjects in the different treatment levels are shown below.
Diet |
|||
Exercise |
<30% fat |
30% - 60% fat |
>60% fat |
<60 minutes |
4 |
3 |
2 |
4 |
1 |
2 |
|
2 |
2 |
2 |
|
4 |
2 |
2 |
|
3 |
3 |
1 |
|
60 minutes |
6 |
8 |
5 |
or more |
5 |
8 |
7 |
4 |
7 |
5 |
|
4 |
8 |
5 |
|
5 |
6 |
6 |
a) Perform a two-way analysis of variance and explain the results. (Show all work)
b) Find the effect size for each factor and the interaction and explain the results. (Show all work)
This is the anova table for two way analysis:
> summary(aov(measure~diet*exercise))
Df Sum Sq Mean Sq F value Pr(>F)
diet 2 6.20 3.10 4.65 0.0196 *
exercise 1 90.13 90.13 135.20 2.39e-11 ***
diet:exercise 2 18.47 9.23 13.85 0.0001 ***
Residuals 24 16.00 0.67
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
As the p-value for interaction is 0.0001, it implies there is an interaction effect between diet and exercise.
Also as the p-value for diet and exercise is less than 0.05, it implies that both diet and exercise have an effect on mental acuity.
This is the result of pairwise comparison between diet groups.
> TukeyHSD(lm,which = "diet")
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = measure ~ diet * exercise)
$diet
diff lwr upr p adj
>60% fat-<30% fat -0.4 -1.3118803 0.5118803 0.5260312
30% - 60% fat-<30% fat 0.7 -0.2118803 1.6118803 0.1556308
30% - 60% fat->60% fat 1.1 0.1881197 2.0118803 0.0160046
people who consume 30-60% fat have high mental acuity, but result is not statistically significant because p-value is large.
> TukeyHSD(lm,which = "exercise")
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = measure ~ diet * exercise)
$exercise
diff lwr upr p adj
>60 minutes-<60 minutes 3.466667 2.851331 4.082002 0
People who perform more exercise have more mental acuity and p-value is very very small so result is statistically significant.