Skip to main content
2 of 2
edited tags
Dimitris Rizopoulos
  • 21.5k
  • 2
  • 25
  • 51

Understanding ANOVA to compare Mixed Model with a GzLM

I'm having a hard time understanding how can I compare a GLM with a GLMM, knowing that I probably can't compare their AIC as glmer from lme4 probably computes the maximum likelihood differently from glm.

However, I wondered if I could find my way using ANOVA that way:

> anova(md.mm, md.logistic1)
Data: d.binary
Models:
md.logistic1: Precision ~ temps + RunProfile
md.mm: Precision ~ temps + RunProfile + (1 | trainId)
             Df    AIC    BIC  logLik deviance  Chisq Chi Df Pr(>Chisq)
md.logistic1  8 1225.6 1276.7 -604.80   1209.6                         
md.mm         9 1225.3 1282.7 -603.63   1207.3 2.3451      1     0.1257

But still, I'm not really sure how to conclude:

  1. Is it a proper way to compare those two models ?

  2. Can I accurately conclude that considering the degrees of freedom and the not-significant p-value, I should consider the GLM model instead of the GLMM one ?

  3. I read that the best way to conclude regarding the significance of random effects in the GLMM model would be to test the null hypothesis about zero variances. I read in the GLMM FAQ that it's possible to test that using the RLRsim package but that only works for lmer models. Is there a way to test it for GLMMs ?