Learn R Programming

tweedie (version 3.0.17)

dtweedie_saddle: Tweedie densities evaluation using the saddlepoint approximation

Description

Density function for the Tweedie EMDs using a saddlepoint approximation.

Usage

dtweedie_saddle(y, xi = NULL, mu, phi, eps = 1/6, power = NULL)

dtweedie.saddle(y, xi = NULL, mu, phi, eps = 1/6, power = NULL)

Value

A numeric vector of densities.

Arguments

y

vector of quantiles.

xi

scalar; the value of \(\xi\) such that the variance is \(\mbox{var}[Y]=\phi\mu^{\xi}\). A synonym for power.

mu

vector of mean \(\mu\).

phi

vector of dispersion parameters \(\phi\).

eps

the offset in computing the variance function; the default is eps=1/6 (as suggested by Nelder and Pregibon, 1987).

power

scalar; a synonym for \(\xi\), the Tweedie index parameter.

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. 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. tools:::Rd_expr_doi("10.1007/s11222-005-4070-y")

Nelder, J. A. and Pregibon, D. (1987). An extended quasi-likelihood function Biometrika, 74(2), 221--232. tools:::Rd_expr_doi("10.1093/biomet/74.2.221")

Examples

Run this code
# Plot a Tweedie density
y <- seq(0.01, 4, length = 50)
fy <- dtweedie_saddle(y, power = 1.1, mu = 1, phi = 1)
plot(y, fy, type = "l", lwd = 2, ylab = "Density")


Run the code above in your browser using DataLab