Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

logLik.tweedie

Tweedie Distributions


Description

The log likelihood for Tweedie models

Usage

logLiktweedie( glm.obj, dispersion=NULL)

Arguments

glm.obj

a fitted Tweedie glm object

dispersion

the dispersion parameter phi; the default is NULL which means to use an estimate

Details

The log-likelihood is computed from the AIC, so see AICtweedie for more details.

Value

Returns the log-likelihood from the specified model

Note

Computing the log-likelihood may take a long time.

Note

Tweedie distributions with the index parameter as 1 correspond to Poisson distributions when phi=1. However, in general a Tweedie distribution with an index parameter equal to one may not be referring to a Poisson distribution with phi=1, so we cannot assume that phi=1 just because the index parameter is set to one. If the Poisson distribution is intended, then dispersion=1 should be specified. The same argument applies for similar situations.

Author(s)

Peter Dunn (pdunn2@usc.edu.au)

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

Examples

library(statmod) # Needed to use  tweedie  family object

### Generate some fictitious data
test.data <- rgamma(n = 200, scale = 1, shape = 1)

### Fit a Tweedie glm and find the AIC
m1 <- glm( test.data ~ 1, family = tweedie(link.power = 0, var.power = 2) )

### A Tweedie glm with p=2 is equivalent to a gamma glm:
m2 <- glm( test.data ~ 1, family = Gamma(link = log))

### The models are equivalent, so the AIC shoud be the same:
logLiktweedie(m1)
logLik(m2)

tweedie

Evaluation of Tweedie Exponential Family Models

v2.3.3
GPL (>= 2)
Authors
Peter K. Dunn [cre, aut]
Initial release
2021-01-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.