View source: R/model_performance_overdispersion.R
check_overdispersion | R Documentation |
Check Poisson GLM for overdispersion.
check_overdispersion(object)
object |
fitted model of class |
A dispersion ratio larger than one indicates overdispersion, this
occurs when the observed variance is higher than the variance of the
theoretical model. If the dispersion ratio is close to one, a Poisson model
fits well to the data. A p-value < .05 indicates overdispersion.
Overdispersion > 2 probably means there is a larger problem with the data:
check (again) for outliers, obvious lack of fit. Adopted from
performance::check_overdispersion()
.
A list with dispersion ratio, chi-squared statistic, and p-value.
Martin Haringa
Bolker B et al. (2017): GLMM FAQ.
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.