| tweedie_AIC | R Documentation |
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.
tweedie_AIC(glm.obj, dispersion = NULL, k = 2, verbose = TRUE)
AICtweedie(glm.obj, dispersion = NULL, k = 2, verbose = TRUE)
glm.obj |
a fitted |
dispersion |
the dispersion parameter, usually extracted from |
k |
the aic penalty; |
verbose |
logical; if |
The aic is computed by evaluating the density function.
The value of the computed aic.
Evaluating the likelihood can be time consuming, so the function may take some time for large data sets.
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.
dtweedie
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.