0
$\begingroup$

I am running a glmer with a random effect for count data (x) and two categorical variables (y and z):

fullmodel <- glmer(x ~ y * z + (1 | Replicate), 
                   family = poisson(), data = Data)

However, when I look at the dispersion parameter:

 > dispersion_glmer(fullmodel)
[1] 2.338742

It is way higher than 1. Does this mean my model is over dispersed? How do I correct it. I want to keep my random effect but when I tried to swap the family to quasipoisson it says you can't use it in glmer().


Thank you ! I've run a negative binomial

model<-glmer.nb(z~y*z + (1|Replicate), family = negative.binomial, data = Data)  

However I go some Warning messages:

1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.0289023 (tol = 0.001, component 1)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.269945 (tol = 0.001, component 1)
3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.370829 (tol = 0.001, component 1)

Are these warnings of any concern? My dispersion parameter is now 1.02157 (between the 0.5 and 1.5 I was told it should be between)

$\endgroup$
3
  • $\begingroup$ Have you tried the negative binomial model? $\endgroup$ Aug 1, 2019 at 7:35
  • $\begingroup$ Would the new model code just be: model<-glmer.nb(x~y*z + (1|Replicate), data = Data) ? $\endgroup$
    – user255144
    Aug 1, 2019 at 11:33
  • $\begingroup$ You can give a try in the mixed_model() function from the GLMMadaptive package as described in my answer above. $\endgroup$ Aug 1, 2019 at 11:57

1 Answer 1

4
$\begingroup$

To better check for over-dispersion you can use the simulated residuals provided by the DHARMa package.

If you want to account for over-dispersion, you can use a negative binomial mixed effects model. This is provided by glmer.nb() in the lme4 package and also by mixed_model() of the GLMMadaptive package. The glmer.nb() fits the model using the Laplace approximation, whereas mixed_model() uses the more accurate adaptive Gaussian quadrature. For examples of the latter and checking also the fit of the model, check the vignette Goodness-of-Fit for MixMod Objects.

$\endgroup$
0

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.