Learn R Programming

insurancerating (version 0.6.3)

check_overdispersion: Check overdispersion of Poisson GLM

Description

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

Examples

Run this code
# NOT RUN {
x <- glm(nclaims ~ area, offset = log(exposure), family = poisson(), data = MTPL2)
check_overdispersion(x)

# }

Run the code above in your browser using DataLab