aov()
, asking if case
and education
and their interaction have any association
with age
.
> anova(aov(age~case*education,infert)) Analysis of Variance Table Response: age Df Sum Sq Mean Sq F value Pr(>F) case 1 0.1 0.1 0.0034 0.9536 education 2 753.3 376.7 15.0456 6.938e-07 case:education 2 0.2 0.1 0.0031 0.9969 Residuals 242 6058.4 25.0
We're getting pretty much the same answers, except that the variance has been
partitioned appropriately for looking at the more complex question.
anova()
produces the ANOVA table from the output of
aov()
.