ptweedie_series: Series Evaluation for the Tweedie Distribution Function

View source: R/ptweedie_series.R

ptweedie_seriesR Documentation

Series Evaluation for the Tweedie Distribution Function

Description

Evaluates the distribution function (df) for Tweedie distributions with 1 < p < 2 using an infinite series, for given values of the dependent variable y, the mean mu, dispersion phi, and power parameter power. Not usually called by general users, but can be in the case of evaluation problems.

Usage

ptweedie_series(q, power, mu, phi, verbose = FALSE, details = FALSE)

ptweedie.series(q, power, mu, phi, verbose = FALSE, details = FALSE)

Arguments

q

vector of quantiles.

power

the power parameter p.

mu

the mean parameter \mu.

phi

the dispersion parameter \phi.

verbose

logical; if TRUE, displays some internal computation details. The default is FALSE.

details

logical; if TRUE, returns the value of the distribution function and some details.

Value

A numeric vector of densities.

Note

The 'exact' values for the inverse Gaussian distribution are not really exact, but evaluated using inverse normal distributions, for which very good numerical approximation are available in R.

References

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")}

Examples

# Plot a Tweedie distribution function
y <- seq(0.01, 4, length = 50)
Fy <- ptweedie_series(y, power = 1.1, mu = 1, phi = 1)
plot(y, Fy, type = "l", lwd = 2, ylab = "Distribution function")


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