> DV <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+ 56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+ 43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)
> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1)) # full model = unrestricted model (just A)
Df Sum Sq Mean Sq F value Pr(>F)
IV1 2 101.11 50.556 0.9342 0.4009
Residuals 42 2272.80 54.114
> anova(lm(DV ~ IV1 + IV2)) # full model = A+B
Df Sum Sq Mean Sq F value Pr(>F)
IV1 2 101.11 50.56 1.9833 0.1509
IV2 2 1253.19 626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61 25.49
> anova(lm(DV ~ IV1 + IV2 + IV1:IV2)) # full model = A+B+A:B
Df Sum Sq Mean Sq F value Pr(>F)
IV1 2 101.11 50.56 1.8102 0.1782
IV2 2 1253.19 626.59 22.4357 4.711e-07 ***
IV1:IV2 4 14.19 3.55 0.1270 0.9717
Residuals 36 1005.42 27.93
> DV <- c(41,43,50, 51,43,53,54,46, 45,55,56,60,58,62,62,
+ 56,47,45,46,49, 58,54,49,61,52,62, 59,55,68,63,
+ 43,56,48,46,47, 59,46,58,54, 55,69,63,56,62,67)
> IV1 <- factor(rep(1:3, c(3+5+7, 5+6+4, 5+4+6)))
> IV2 <- factor(rep(rep(1:3, 3), c(3,5,7, 5,6,4, 5,4,6)))
> anova(lm(DV ~ IV1)) # full model = unrestricted model (just A)
Df Sum Sq Mean Sq F value Pr(>F)
IV1 2 101.11 50.556 0.9342 0.4009
Residuals 42 2272.80 54.114
> anova(lm(DV ~ IV1 + IV2)) # full model = A+B
Df Sum Sq Mean Sq F value Pr(>F)
IV1 2 101.11 50.56 1.9833 0.1509
IV2 2 1253.19 626.59 24.5817 1.09e-07 ***
Residuals 40 1019.61 25.49
> anova(lm(DV ~ IV1 + IV2 + IV1:IV2)) # full model = A+B+A:B
Df Sum Sq Mean Sq F value Pr(>F)
IV1 2 101.11 50.56 1.8102 0.1782
IV2 2 1253.19 626.59 22.4357 4.711e-07 ***
IV1:IV2 4 14.19 3.55 0.1270 0.9717
Residuals 36 1005.42 27.93