[R] Newbie question about the use of lm and anova
henric.nilsson at statisticon.se
Wed Oct 27 15:30:12 CEST 2004
At 12:54 2004-10-26 -0700, Sandie Peters wrote:
>1. Why do we get a different ANOVA answer when we switch the order of
>the explanatory variables , e.g. ComponentA ~ Parent + Plot vs
>ComponentA ~ Plot + Parent?
>2. Why are the Sum Sq and F ratios calculated by this ANOVA method
>different than those that are calculated by SAS JMP?
It's in the FAQ:
Also, see the `anova.lm' help page for a nice example.
If you want test based on so called Type II and III sums of squares, but
don't want to compute them yourself (by use of `anova' and `drop1' as the
FAQ suggests), John Fox's excellent `car' package has got an `Anova' function.
More information about the R-help