Displaying 1 result from an estimated 1 matches for "restmodel".
Did you mean:
bestmodel
2009 Feb 27
1
testing two-factor anova effects using model comparison approach with lm() and anova()
...h to analysis
of variance by using anova() to compare a full model that contains all
effects, to restricted models that contain all effects save for the effect
of interest.
The test of the interaction effect seems to be as I expected:
> fullmodel<-lm(DV~factorA+factorB+factorA:factorB)
> restmodel<-lm(DV~factorA+factorB)
> anova(fullmodel,restmodel)
Analysis of Variance Table
Model 1: DV ~ factorA + factorB + factorA:factorB
Model 2: DV ~ factorA + factorB
Res.Df RSS Df Sum of Sq F Pr(>F)
1 24 18.0000
2 26 27.8667 -2 -9.8667 6.5778 0.005275 **
As you can see...