Maybe it's a basic question, but I'm learning about GLMM using the lme4 package. I'm confused about the way that I can know the significance the overall model using glmer.

First, the random model is:

fit.random <- glmer(VDEP ~ AGE +GENDER +EDUC +V1 +V2 +V3 +(1|STATE), family = binomial("logit"), data = mydata, nAGQ = 0)

From Stackoverflow's ask (link) help me with the next null model.

fit.null <- update(fit.random,.~1+(1|STATE))

Then I can do anova and test the significance of the overall model.

Is correct this conjecture? How is the best way to test the significance of the overal model? It will be interesting make a pseudo r squared? There are other important tests (overdispersion, VIF)? (I know that is a very general question, but I only want some ideas to continue learning).


1 Answer 1


Even though this isn't StackOverflow (where people are very picky about questions containing a single, precise programming problem), this is still a bit broad. However:

  • anova(full_model,reduced_model) does a likelihood ratio test -- i.e. it compares the difference in deviance to a null distribution $\chi^2_{p_1-p_2}$, where the number of degrees of freedom is the difference in the number of parameters between the two models.
  • the likelihood ratio test is asymptotic: if you're feeling very patient you can use PBmodcomp from the pbkrtest package to compare the null vs full model via parametric bootstrapping (that is, deriving the null distribution by simulating from the fitted null model, refitting both the null and the full model, computing the deviance difference, and repeating ...)
  • Stroup 2014 doi:10.2134/agronj2013.0342 states that an $F$ test based on the Kenward-Roger correction will work for comparing GLMMs, even though there's not much theoretical justification for it. This hasn't been implemented in R, but you could try it in SAS.

There is a lot of discussion of pseudo-$R^2$ measures for GLMMs, which are difficult because they are both generalized and multi-level.

You should test for overdispersion in the standard way (compare residual deviance to residual df), although as always this is an approximate measure.

The general rule of thumb is that most of the diagnostic procedures and tests from GLMs carry over to GLMM, although in many cases they get more complicated. Some online sources of additional information are the GLMM FAQ and this set of worked examples of GLMMs.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.