I am currently in the process of trying to complete a poisson GLMM analysis with two fixed (with an interaction) and two random effects using the glmer() function of the lme4 package. Using the testDispersion() function of the package DHARMa I found my data to be significantly over-dispersed (ratio = 1.877, p-value = <2.2e-16) so as a result attempted to use the glmer.nb() function in order to account for this over-dispersion by using the negative binomial distribution. My problem is that the model using this function still produced a significant dispersion test (ratio = 0.8817, p-value = 0.024). Should I still use this method to account for over-dispersion or is there a better way to account for it? The code for each of my models took the following forms:

Poisson: model1<-glmer(y~x1*x2 + (1|R1) + (1|R2), family = "poisson", data = dataset)

Negative binomial: model2<-glmer.nb(y~x1*x2 + (1|R1) + (1|R2), data = dataset)

  • 5
    $\begingroup$ What is your research question ? Are you interested in inference or prediction ? What do the results of the two models tell you ? 0.88 is quite close to 1, so I'm not sure why you think that would be a problem ? $\endgroup$ Commented Aug 9, 2020 at 12:54
  • 4
    $\begingroup$ I fully agree with Robert (+1). One might want to consider observation-level random effects but that is a bit extreme given the non-severity of the observed over-dispersion. You might also want to use DHARMa::simulateResiduals and plot the residuals to get a better idea of how severe the problem is instead of focusing on ratio tests. A $p$-value of 0.024 is "non-issue" if the model adheres well to our modelling assumptions/research question. $\endgroup$
    – usεr11852
    Commented Aug 9, 2020 at 13:25
  • $\begingroup$ +1 for suggesting the DHARMA method. I think it will be more relevant for the negative binomial model than the ratio test. $\endgroup$ Commented Dec 20, 2021 at 1:56

1 Answer 1


I understand why you decided to use a negative binomial family in that case. However, the ratio of variance and mean don't have to be equal 1 in the negative binomial. https://www.casact.org/pubs/forum/07wforum/07w109.pdf

  • 4
    $\begingroup$ You are correct that variance doesn't equal the mean for a negative binomial, but that's not what the dispersion test evaluates. That test is based on the observed variance versus what would be expected based on the fitted negative binomial parameters. See this answer for details. $\endgroup$
    – EdM
    Commented Aug 9, 2020 at 18:12
  • $\begingroup$ Thank you for the very helpful comment. $\endgroup$
    – Jakub
    Commented Aug 10, 2020 at 8:20

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.