Skip to content
Prev 14244 / 20628 Next

Replicating type III anova tests for glmer/GLMM

lme4:anova() is not the same thing as car::Anova()!

A quick R note that might have avoided the confusion:
The :: syntax in R refers to scope, so you can specify a function
unambiguously via package::function.name(). Moreover, R is case
sensitive, so Anova() and anova() are generally different things.

Henrik's message (posted to the list so if you don't suscribe, you need
to look here:
https://mailman.stat.ethz.ch/pipermail/r-sig-mixed-models/2016q1/024465.html
) describes how to do this with either his afex package (for
likelihood-ratio tests) or John Fox's car package (for analysis of
deviance / Wald tests).

If you just want to perform likelihood-ratio tests in lme4, then you
should look at the drop1() function or you can use anova(reduced.model,
full.model). Henrik also does a nice job summarizing some of the issues
here, so I won't repeat them.

One final note: not everything that holds for normal LMM holds for GLMM
-- GLMM tends to be much more complicated. :-(

Best,
Phillip
On 23/02/16 20:03, Francesco Romano wrote: