GIGrvg-package {GIGrvg} | R Documentation |
This package provides a generator and the density for the Generalized Inverse Gaussian (GIG) distribution. It uses the parametrization with density proportional to
f(x) = x^(λ-1) e^(-(χ/x+ψ*x)/2)
Package: | GIGrvg |
Type: | Package |
Version: | 0.4.1 |
Date: | 2017-06-08 |
License: | GPL 2 or later |
Package GIGrvg provides two routines:
rgig
generates GIG distributed random variates.
It is especially designed for the varying parameter case, i.e.,
for sample size n=1
.
dgig
computes the density of the GIG distribution.
Note that the parameters of the distribution are assumed to be single values. If a vector is provided then just the first value is used!
For the very fast generation of large samples more efficient algorithms exists. We recommend package Runuran.
Josef Leydold josef.leydold@wu.ac.at and Wolfgang Hörmann.
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
## Draw a random sample rgig(n=10, lambda=0.5, chi=0.1, psi=2) ## Evaluate the density dgig(0.3, lambda=0.5, chi=0.1, psi=2)