I have a question about the interpretation of residual diagnostics using DHARMa.

I fitted a binomial mixed model and used DHARMa for model diagnostics.

simulationOutput <- simulateResiduals(m1_test, n = 1000, seed = 123)

This is what the DHARMa plots look like:

enter image description here enter image description here

Given that I have a lot of data (n = 9587) and according to the DHARMa vignette there will very likely be significant patterns with large sample sizes, the plots look pretty good to me. However, I'm not sure if I should be concerned about underdispersion since the dispersion test yields a dispersion parameter of 0.80552:

enter image description here

The DHARMa vignette suggests that e.g. a dispersion parameter of 5 is reason for concern about overdispersion, but I cannot find anything about when a value indicating underdispersion should be taken seriously. Should I worry about underdispersion or is it fine? I also plotted the residuals against individual predictors. There are some significant deviations, but nothing outstanding that would point to large deviations.


1 Answer 1


The default dispersion parameter estimated by DHARMa is essentially observed/expected variance, so 0.8 means that there is 20% lower variance than expected, which I would consider a small to moderate deviation.

Regarding the vignette: I never meant to suggest that 5 is a cut-off for concern. In the vignette, I just provide numerical examples for small / large values of the dispersion parameter, in the spirit to the comment above.

About your question: the main effect of the over/underdispersion is on the CIs / p-values, with overdispersion leading to anti-conservative and underdispersion to conservative bias. Based on this, I wouldn't be super concerned about a small underdispersion such as 0.8, but you might get slightly higher power by fitting a variable dispersion model.

Disclaimer: I'm the developer / maintainer of DHARMa. For technical questions about DHARMa and error reports, please use https://github.com/florianhartig/DHARMa/issues


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.