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

tweedie-package

Tweedie Distributions


Description

Functions for computing and fitting the Tweedie family of distributions

Details

Package: tweedie
Type: Package
Version: 2.3.1
Date: 2017-11-15
License: GPL (>=2)

Author(s)

Peter K Dunn

Maintainer: Peter K 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

Dunn, Peter K and Smyth, Gordon K (2001). Tweedie family densities: methods of evaluation. Proceedings of the 16th International Workshop on Statistical Modelling, Odense, Denmark, 2–6 July

Jorgensen, B. (1987). Exponential dispersion models. Journal of the Royal Statistical Society, B, 49, 127–162.

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

Tweedie, M. C. K. (1984). An index which distinguishes between some important exponential families. Statistics: Applications and New Directions. Proceedings of the Indian Statistical Institute Golden Jubilee International Conference (Eds. J. K. Ghosh and J. Roy), pp. 579–604. Calcutta: Indian Statistical Institute.

Examples

# Generate random numbers
set.seed(987654)
y <- rtweedie( 20, xi = 1.5, mu = 1, phi = 1)
	# With Tweedie index  xi   between 1 and 2, this produces continuous
	# data with exact zeros
x <- rnorm( length(y), 0, 1)  # Unrelated predictor

# With exact zeros, Tweedie index  xi  must be between 1 and 2

# Fit the tweedie distribution; expect  xi  about 1.5
library(statmod)

xi.vec <- seq(1.1, 1.9, by = 0.5)
out <- tweedie.profile( y ~ 1, xi.vec = xi.vec, do.plot = TRUE, verbose = TRUE)

# Fit the glm
require(statmod) # Provides  tweedie  family functions
summary(glm( y ~ x, family = tweedie(var.power = out$xi.max, link.power = 0) ))

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.