View source: R/model_performance_overdispersion.R
| check_overdispersion | R Documentation |
Tests whether a fitted Poisson GLM shows overdispersion using Pearson's chi-squared statistic.
check_overdispersion(object)
object |
A fitted model of class |
In Poisson claim frequency models, the variance is assumed to be equal to the mean. A dispersion ratio above 1 indicates that the observed variation is larger than expected under that assumption. In pricing work this can be a useful diagnostic signal for omitted heterogeneity, clustering, outliers, or model misspecification. It does not automatically mean that the model is unusable.
A dispersion ratio close to 1 is broadly consistent with the Poisson variance assumption.
A dispersion ratio above 1 suggests overdispersion.
A p-value below 0.05 indicates statistically significant overdispersion.
An object of class "overdispersion_check" and "overdispersion",
which is a list with elements:
Pearson's chi-squared statistic.
Dispersion ratio, calculated as Pearson's chi-squared statistic divided by residual degrees of freedom.
Residual degrees of freedom.
P-value from the chi-squared test.
For backwards compatibility the object also contains the aliases chisq,
ratio, rdf, and p.
Martin Haringa
Bolker B. et al. (2017). GLMM FAQ
See also: performance::check_overdispersion().
x <- glm(nclaims ~ area, offset = log(exposure),
family = poisson(), data = MTPL2)
check_overdispersion(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.