check_overdispersion: Check overdispersion of Poisson GLM

View source: R/model_performance_overdispersion.R

check_overdispersionR Documentation

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

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

Value

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

Author(s)

Martin Haringa

References

Examples

x <- glm(nclaims ~ area, offset = log(exposure), family = poisson(),
  data = MTPL2)
check_overdispersion(x)


insurancerating documentation built on Dec. 28, 2022, 2:53 a.m.