UNU.RAN object for Generalized Inverse Gaussian distribution
Create UNU.RAN object for a Generalized Inverse Gaussian distribution. Two parametrizations are available.
[Distribution] -- Generalized Inverse Gaussian.
udgig(theta, psi, chi, lb=0, ub=Inf) udgiga(theta, omega, eta=1, lb=0, ub=Inf)
theta
: shape parameter.psi, chi
: shape parameters (must be strictly positive).omega, eta
: shape parameters (must be strictly positive).lb
: lower bound of (truncated) distribution.ub
: upper bound of (truncated) distribution.The generalized inverse Gaussian distribution with parameters , , and
has density proportional to
where and .
An alternative parametrization used parameters , , and
and has density proportional to
The domain of the distribution can be truncated to the interval (lb
,ub
).
An object of class "unuran.cont"
.
These two parametrizations can be converted into each other by means of the following transformations:
unuran.cont
.
N.L. Johnson, S. Kotz, and N. Balakrishnan (1994): Continuous Univariate Distributions, Volume 1. 2nd edition, John Wiley & Sons, Inc., New York. Chap. 15, p. 284.
Josef Leydold and Wolfgang H"ormann unuran@statmath.wu.ac.at .
## Create distribution object for GIG distribution distr <- udgig(theta=3, psi=1, chi=1) ## Generate generator object; use method PINV (inversion) gen <- pinvd.new(distr) ## Draw a sample of size 100 x <- ur(gen,100)