[R] Model simplification using anova()
Dieter Menne
dieter.menne at menne-biomed.de
Wed Jun 4 09:33:20 CEST 2008
ChCh <jmo101 <at> student.canterbury.ac.nz> writes:
>
>
> Hello all,
>
> I've become confused by the output produced by a call to
> anova(model1,model2). First a brief background. My model used to predict
> final tree height is summarised here:
>
> Df Sum Sq Mean Sq F value Pr(>F)
> Treatment 2 748.35 374.17 21.3096 7.123e-06 ***
> HeightInitial 1 0.31 0.31 0.0178 0.89519
> DiameterInitial 1 0.52 0.52 0.0298 0.86460
> Frost 1 38.29 38.29 2.1807 0.15392
> HeightInitial:Frost 1 85.83 85.83 4.8882 0.03774 *
> DiameterInitial:Frost 1 97.90 97.90 5.5754 0.02749 *
> Residuals 22 386.30 17.56
> ---
>
> Based on this, I should not remove either of the interaction terms, so I
> turned my attention to the main factors. Based on p-values, I removed
> HeightInitial and used a call to anova(model1,model2) to see if this
> resulted in a weaker model. Here is the output:
...
Though should never remove main factors in the presence of interactions. Check
Bill Venables penitential sermon which quite on top of google when you enter
"exegeses".
http://www.stats.ox.ac.uk/pub/MASS3/Exegeses.pdf
The usual way to simplify models in R is based on the AIC, not on p-values. See
stepAIC and the chapter in MASS.
Dieter
More information about the R-help
mailing list