Description Usage Arguments Details Value Author(s) References Examples
Density, derivatives, distribution function, and random generation for the Tweedie distribution. The distribution is parameterised by the mean, dispersion parameter and the power parameter so that the distribution's variance is given by disperion * mean^power.
1 2 3 |
y,q |
vector of quantiles |
n |
number of random draws |
mu |
scalar or vector (length matches y or equal to n) of means |
phi |
scalar or vector (length matches y or equal to n) of dispersion parameters |
p |
scalar or vector (length matches y or equal to n) of power parameters |
LOG |
indication of return scale. If TRUE (default) then the density is returned on the log scale. |
The density calculation is based on the series summation method described in Dunn and Smyth (2005). These functions are really just wrappers to the equivalent functions dPoisGam, pPoisGam and rPoisGam. The functions are equivalent up to parameterisation of the distribution.
The distribution function is calculated by adaptive quadrature (a call to the integrate function). However, the point discontinuity at zero is handled explicitly by assuming the convention that the distribution function evaluated at zero is equal to the density at zero.
dTweedie returns a numeric vector containing the (log-)densities. |
|
pTweedie returns a numeric vector containing the values of the distribution function. |
|
rTweedie returns a numeric vector containing the random variables. |
Scott D. Foster
Dunn P. K. and Smyth G. K. (2005) Series evaluation of Tweedie exponential dispersion model densities. Statistics and Computing 15: 267-280.
Foster, S.D. and Bravington, M.V. (2013) A Poisson-Gamma Model for Analysis of Ecological Non-Negative Continuous Data. Journal of Environmental and Ecological Statistics 20: 533-552
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.