GIGrvg-package | 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^{\lambda-1} e^{-\frac{1}{2}(\chi/x+\psi x)}
Package: | GIGrvg |
Type: | Package |
Version: | 0.8 |
Date: | 2023-03-22 |
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 (2014). Generating generalized inverse Gaussian random variates, Statistics and Computing 24, 547–557, DOI: 10.1007/s11222-013-9387-3
See also Research Report Series / Department of Statistics and Mathematics Nr. 123, Department of Statistics and Mathematics, WU Vienna University of Economics and Business, https://research.wu.ac.at/en/publications/generating-generalized-inverse-gaussian-random-variates-3.
J. S. Dagpunar (1989). An easily implemented generalised inverse Gaussian generator, Comm. Statist. B – Simulation Comput. 18, 703–710.
Karl Lehner (1989). Erzeugung von Zufallszahlen für zwei exotische stetige Verteilungen, Diploma Thesis, 107 pp., Technical University Graz, Austria (in German).
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.