[R] ANOVA table and lmer

Mark Difford mark_difford at yahoo.co.uk
Thu Nov 4 20:46:37 CET 2010

Hi Jim,

>> The decomposition of the sum of squares should be the same regardless of 
>> whether block is treated as random of fixed.

Should it? By whose reckoning? The models you are comparing are different.
Simple consideration of the terms listed in the (standard) ANOVA output
shows that this is so, so how could the sum-of-squares be the same?

>> I noticed that other people have asked similar questions in the past, but
>> I haven't seen a 
>> satisfactory explanation.

Maybe, but it has been answered (by me, and surely by others). However,
canonical would be Venables and Ripley's MASS (: 283--286).

The models you need to compare are the following:
Aov.mod <- aov(Y ~ V * N + Error(B/V/N), data = oats) 
Lme.mod <- lme(Y ~ V * N, random = ~1 | B/V/N, data = oats)
Lmer.mod <- lmer(Y~ V * N +(1|B)+(1|B:V)+(1|B:N), data = oats)


HTH, Mark Difford.
View this message in context: http://r.789695.n4.nabble.com/ANOVA-table-and-lmer-tp3027546p3027662.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list