In: Math
This problem is going to use the data set in R called "ChickWeight" that has 4 variables, as described below.
ChickWeight:
A data frame with 578 observations on 4 variables.
1) weight: a numeric vector giving the body weight of the chick
(gm).
2) Time: a numeric vector giving the number of days since birth
when the measurement was made.
3) Chick: an ordered factor with levels 18 < ... < 48 giving
a unique identifier for the chick. The ordering of the levels
groups chicks on the same diet together and orders them according
to their final weight (lightest to heaviest) within diet.
4) Diet: a factor with levels 1, ..., 4 indicating which
experimental diet the chick received.
Using a significance level of 0.05, is there evidence to support that the weight can be determined by the Time, Diet, and the interaction between the two? (Appears as Time:Diet in RStudio)
Fill in the R code below.
dat.aov = aov( ~ factor( ) * , data= )
summary( )
Fill in the ANOVA table below.
Type the values into the table EXACTLY as they appear in your
output in RStudio.
df | SS | MS | F | Pr(>F) | |
factor(Time) | 2e-16 | ||||
Diet | 2e-16 | ||||
factor(Time):Diet | 0.00017 | ||||
Residuals |
Is there evidence to support a significant interaction between
Time and Diet?
1. ?0:H0: No AB interaction vs ??:Ha: Factors A and B
interact
2. ?=0.05α=0.05
3. F =
4. ??Fα =
5. Conclusion:
Reject H0
Fail to reject H0
Interpretation:
There is sufficient evidence to support that the interaction
between Time and Diet is significant.
There is not sufficient evidence to support that the interaction
between Time and Diet is significant.
R code:
dat.aov = aov(lm(weight~ factor(Time)+Diet+factor(Time):Diet,
data=ChickWeight))
summary(dat.aov)
Output:
summary(dat.aov)
Df Sum Sq Mean Sq F value Pr(>F)
factor(Time) 11 2067050 187914
157.808 < 2e-16 ***
Diet
3 129721 43240 36.313 < 2e-16 ***
factor(Time):Diet 33 86676
2627 2.206 0.000172 ***
Residuals 530
631110
1191
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
df | SS | MS | F | Pr(>F) | |
factor(Time) | 11 | 2067050 | 187914 | 157.808 | 2e-16 |
Diet | 3 | 129721 | 43240 | 36.313 | 2e-16 |
factor(Time):Diet | 33 | 86676 | 2627 | 2.206 | 0.00017 |
Residuals | 530 | 631110 | 1191 |
3. F = 2.206
4. Fα = F0.05,33,530=1.4585
5. Conclusion:
Reject H0
(since F>Fα)
Interpretation:
There is sufficient evidence to support that the interaction between Time and Diet is significant.