Description Usage Arguments Details Note Author(s) References See Also Examples
Evaluates analytical formulae for distribution functions of the
generalized inverse Gaussian distribution (GIG) by calling
function besselK_inc_err
.
1 |
q |
Quantile, q > 0. |
lambda |
Parameter, λ = \pm(j + \frac{1}{2}) with j = 0, 1, 2, …. |
chi |
Parameter chi > 0. |
psi |
Parameter psi > 0. |
lower.tail |
Logical. P(W < w) is
returned if |
bit |
Precision bit. A positive integer greater or equal 100. |
The GIG is given by
GIG(w|λ, χ, ψ) = \frac{(ψ/χ)^{λ/2}}{2 K_{λ} (√{χψ})}\,e^{-≤ft(χ w^{-1} \,+\, ψ w \right)/2}\, w^{λ - 1} \qquad w >0.
This distribution has been used in hydrology, reliability analysis, extreme events modelling in financial risk management, and as the mixing distribution to form the family of generalized hyperbolic distributions in statistics.
This function allows for accurate evaluation of distribution functions (c.d.f and c.c.d.f) of the family of GIG distributions with λ = \pm(j + \frac{1}{2}). Currently, only c.d.f of inverse Gaussian distribution, λ = -\frac{1}{2}, is available.
Thanh T. Tran frmqa.package@gmail.com
Barndorff-Nielsen, O. E (1977) Exponentially decreasing distributions for the logarithm of particle size. Proceedings of the Royal Society of London. Series A, 353, 401–419.
Olver, F.W.J., Lozier, D.W., Boisver, R.F. and Clark, C.W (2010) Handbook of Mathematical Functions. New York: National Institute of Standards and Technology, and Cambridge University Press.
Tran, T. T., Yee, W.T. and Tee, J.G (2012) Formulae for the Extended Laplace Integral and Their Statistical Applications. Working Paper.
Watson, G.N (1931) A Treatise on the Theory of Bessel Functions and Their Applications to Physics. London: MacMillan and Co.
1 2 3 4 5 6 7 8 9 10 11 | ## Accuracy tests
q <- 1
chi <- 3
psi <- 15
lambda <- 5/2
lowerTail <- sapply(lambda, function(w.)
pgig(q, chi, psi, lambda = w., lower.tail = TRUE, 200))
upperTail <- sapply(lambda, function(w.)
pgig(q, chi, psi, lambda = w., lower.tail = FALSE, 200))
## sum of two parts equals 1
(lowerTail + upperTail)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.