684
Comment:
|
691
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
R calculates sequential or Type I SS by default when using lm, lmer and aov as opposed to the type III SS (default in SPSS) which partials out effects of other terms in the model. A hierarchical approach is suggested which gives the same results for both sums of squares and only looks at the highest order terms in a model. See [http://tolstoy.newcastle.edu.au/R/help/05/04/2981.html here]. | R calculates sequential or Type I SS by default when using ''lm'', ''lmer'' and ''aov'' as opposed to the type III SS (default in SPSS) which partials out effects of other terms in the model. A hierarchical approach is suggested which gives the same results for both sums of squares and only looks at the highest order terms in a model. See [http://tolstoy.newcastle.edu.au/R/help/05/04/2981.html here]. |
Line 5: | Line 5: |
Type III SS may be obtained using | Type III SS |
Line 13: | Line 13: |
for lm and the Anova() procedure for lmer. | for ''lm'' and the ''Anova()'' procedure for ''lmer'' in R. |
Sums of Squares in lm, aov and lmer in R
R calculates sequential or Type I SS by default when using lm, lmer and aov as opposed to the type III SS (default in SPSS) which partials out effects of other terms in the model. A hierarchical approach is suggested which gives the same results for both sums of squares and only looks at the highest order terms in a model. See [http://tolstoy.newcastle.edu.au/R/help/05/04/2981.html here].
Type III SS [http://tolstoy.newcastle.edu.au/R/help/05/08/9560.html may be obtained] using terms of form
fit <- anova(lm(y~x+z)) anova(fit, ssType=3)
for lm and the Anova() procedure for lmer in R.