Skip to contents

Check Poisson GLM for overdispersion.

Usage

check_overdispersion(object)

Arguments

object

fitted model of class glm and family Poisson

Value

A list with dispersion ratio, chi-squared statistic, and p-value.

Details

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().

References

Author

Martin Haringa

Examples

x <- glm(nclaims ~ area, offset = log(exposure), family = poisson(),
  data = MTPL2)
check_overdispersion(x)
#>        dispersion ratio =    1.229
#>   Pearson's Chi-Squared = 3684.679
#>                 p-value =  < 0.001
#> 
#> Overdispersion detected.