Dispersion tests in generalised linear mixed-effects models — a methods comparison and practical guide

Melina de Souza Leite, Daniel Rettelbach, Florian Hartig

EcoEvoRxiv (2025)
Cite this
@article{leite2025dispersion,
  author = {Melina de Souza Leite and Daniel Rettelbach and Florian Hartig},
  title = {Dispersion tests in generalised linear mixed-effects models — a methods comparison and practical guide},
  journal = {EcoEvoRxiv},
  year = {2025},
}

Cited by 1 (Google Scholar), as of 07 September 2026

Preprint

Abstract

  1. Underdispersion and overdispersion are common issues when analysing ecological data with generalised linear (mixed) models (GLMs/GLMMs). Overdispersion, the phenomenon where observations spread wider than expected by the fitted model, leads to anti-conservative p-values and, thus, to inflated type I error. In contrast, underdispersion, a narrower spread of the data than expected, causes overly conservative p-values and, therefore, a reduction in power. A range of tests has been suggested to detect such dispersion problems, but there are few comparative studies of their performance across a range of models and analysis situations. 2. The goal of this study is to identify a general dispersion test for GLMs/GLMMs that is applicable across all standard distributions and random-effects structures. After an initial assessment of available tests, we selected two classes of dispersion tests as candidates: (1) parametric and nonparametric tests based on Pearson residuals and (2) simulation-based tests that compare the expected to the observed variance in the response. 3. Comparing their performance by type I error, power, and dispersion estimate, across a range of GLMs and GLMMs, we find that a nonparametric Pearson residuals test performed best across all metrics, especially for data with low incidence or count rates and/or sample sizes; however, at the cost of high computational expenses. The parametric Pearson residuals test, which is recommended in many books and guidelines, is faster and performs excellently for GLMs, but can be seriously biased towards underdispersion for GLMMs. We show that the reason for this bias, which increases with the number of random effect clusters/groups, lies in the naïve computations of the degrees of freedom for the random effects. The simulation-based response variance test is slightly less powerful than the nonparametric Pearson test, but it showed overall good calibration and is much faster to compute. It offers a compromise between the strengths and weaknesses of the two Pearson-based tests. 4. We conclude that for GLMs, the parametric Pearson residuals test offers the best combination of speed and accuracy. For GLMMs, we recommend either the computationally demanding non-parametric Pearson residuals test or the faster, although somewhat less powerful, simulation-based response variance test.

What the paper shows and why it matters (AI-generated)

Textbook guidance on checking GLMM dispersion mostly recommends the parametric Pearson residuals test without qualification, and this comparison finds that guidance is quietly wrong for mixed models specifically: the test is biased toward under-detecting overdispersion as the number of random-effect groups grows, because of how its degrees of freedom get computed. Practical relevance for anyone running DHARMa-style residual diagnostics on ecological count or proportion data — the paper's own recommended fallback, a simulation-based response-variance test, sits in the same space DHARMa's dispersion checks already occupy.