| tweedie | R Documentation |
Density, distribution function, quantile function and random generation for
the Tweedie distribution with mean equal to mean, dispersion equal to
dispersion, and power equal to power.
rtweedie(n, mean = 1, dispersion = 1, power = 1.5)
dtweedie(x, mean = 1, dispersion = 1, power = 1.5, log = FALSE)
ptweedie(
q,
mean = 1,
dispersion = 1,
power = 1.5,
lower.tail = TRUE,
log.p = FALSE
)
qtweedie(
p,
mean = 1,
dispersion = 1,
power = 1.5,
lower.tail = TRUE,
log.p = FALSE
)
n |
number of observations. If |
mean |
vector of means. |
dispersion |
vector of dispersion parameters. |
power |
vector of power parameters. |
x, q |
vector of quantiles. |
log, log.p |
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities. |
If mean, dispersion, or power are not specified they assume the
default values of 1, 1, and 1.5, respectively.
The Tweedie distribution used here follows the compound Poisson-Gamma
parameterisation with power parameter in (1, 2). It has
\mathbb{E}[X] = \mu and
\mathrm{Var}(X) = \phi\mu^p, where \mu is mean,
\phi is dispersion, and p is power.
dtweedie gives the density, ptweedie gives the distribution
function, qtweedie gives the quantile function, and rtweedie
generates random samples.
The length of the result is determined by n for rtweedie, and is the
maximum of the lengths of the numerical arguments for the other functions.
The numerical arguments other than n are recycled to the length of the
result. Only the first elements of the logical arguments are used.
Dunn, P. K., & Smyth, G. 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")}.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.