tweedie_AIC: AIC for Tweedie Glms

View source: R/tweedie_AIC.R

tweedie_AICR Documentation

AIC for Tweedie Glms

Description

Evaluates the aic for a fitted Tweedie glm. The Tweedie family of distributions belong to the class of exponential dispersion models (edms), famous for their role in generalized linear models. The Tweedie distributions are the edms with a variance of the form \mbox{var}[Y] = \phi\mu^p where p \ge 1. This function only evaluates for p \ge 1.

Usage

tweedie_AIC(glm.obj, dispersion = NULL, k = 2, verbose = TRUE)

AICtweedie(glm.obj, dispersion = NULL, k = 2, verbose = TRUE)

Arguments

glm.obj

a fitted glm object, fitted using the tweedie family.

dispersion

the dispersion parameter, usually extracted from glm.obj; however, occasionally a specified value of the dispersion may be needed.

k

the aic penalty; k = 2 (the default) produces the AIC.

verbose

logical; if TRUE, display details of the internal process. The default is FALSE.

Details

The aic is computed by evaluating the density function.

Value

The value of the computed aic.

Note

Evaluating the likelihood can be time consuming, so the function may take some time for large data sets.

References

Dunn, P. K. and Smyth, G. K. (2008). Evaluation of Tweedie exponential dispersion model densities by Fourier inversion. Statistics and Computing, 18, 73–86. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11222-007-9039-6")}

Dunn, Peter K and Smyth, Gordon K (2005). Series evaluation of Tweedie exponential dispersion model densities Statistics and Computing, 15(4). 267–280. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11222-005-4070-y")}

Jorgensen, B. (1997). Theory of Dispersion Models. Chapman and Hall, London.

Sakamoto, Y., Ishiguro, M., and Kitagawa G. (1986). Akaike Information Criterion Statistics. D. Reidel Publishing Company.

See Also

dtweedie

Examples

# Fit a Tweedie density using  tweedie  family function from  statmod
pretend <- data.frame( y = stats::rgamma(20, shape = 1, rate = 1) )
fit <- glm(y ~ 1, data = pretend, 
           family = statmod::tweedie(link.power = 0, var.power = 2.1))

# Compute the AIC
tweedie_AIC(fit)


tweedie documentation built on Feb. 7, 2026, 5:07 p.m.