[R-sig-ME] anova (lm, lmer ) question

Ben Pelzer b.pelzer at maw.ru.nl
Thu Oct 2 13:33:56 CEST 2014


Dear list,

Is it possible to use the anova( ) function to compare the deviances of 
a model1 (fixed intercept) and a model2 (random intercept):

model1 <- lm (y ~ 1)
model2 <- lmer (y ~ (1|country), REML=FALSE)

In the above situation, one can use -2*LogLike(model1) and 
-2*LogLike(model2) to find both deviances, the difference of which then 
can tested. However, it would be nice if anova (model1, model2) could be 
used to this end. Is this possible somehow?

Ben.



More information about the R-sig-mixed-models mailing list