| gig {qbld} | R Documentation |
Generalised Inverse Gaussian
Description
Probability distribution function, random generation
for the Generalised Inverse Gaussian with three parameters a(chi), b(psi), p.
Usage
dgig(x, a, b, p, log_density)
rgig(n, lambda, a, b)
Arguments
x |
: Argument of pdf |
a |
: chi parameter. Must be nonnegative for positive lambda and positive else. |
b |
: psi parameter. Must be nonnegative for negative lambda and positive else. |
log_density |
: logical; returns log density if TRUE |
n |
: number of observations |
lambda, p |
: lambda parameter |
Details
The Generalised Inverse Gaussian distrubtion(GIG), which has the following pdf
f(x) = x^{\lambda-1}\exp\{-\frac{\omega}{2}(x + \frac{1}{x})\}
Value
-
rgigreturns a vector of random numbers fromGIG(a,b,p). -
dgigreturns returns density of aGIG(a,b,p)at point x.
References
Devroye, L. Random variate generation for the generalized inverse Gaussian distribution. Stat Comput 24, 239–246 (2014).
Wolfgang Hörmann and Josef Leydold (2013). Generating generalized inverse Gaussian random variates, Statistics and Computing (to appear), DOI: 10.1007/s11222-013-9387-3
J. S. Dagpunar (1989). An easily implemented generalised inverse Gaussian generator, Comm. Statist. B – Simulation Comput. 18, 703–710.
See Also
raldmix for random sampling from Asymmetric Laplace distribution
Examples
rgig(n = 1, lambda = 0.5, a = 1, b = 2)
dgig(x = 1, a = 1, b = 2, p = 0.5, log_density = FALSE)