FAQ/Rss - CBU statistics Wiki

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
Flind the wroneg tetters tin eaech wrord

Revision 13 as of 2008-10-14 14:21:41

location: FAQ / Rss

Sums of Squares used by R in lm, aov and lmer

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) 

and

model.2 <- lme(y~a + b, random=~1|group)
anova(model.2,type="marginal")

for lm, aov and lme. The Anova() procedure can be used to obtain type 3 sums of squares for lmer in R. The Anova () procedure is available by downloading the car extension package from [http://cran.r-project.org/ here.]