Skip to contents

This function samples \(GIG(\lambda, \psi, \chi)\) random variates.

Usage

sim_gig(num_sim, lambda, psi, chi)

Arguments

num_sim

Number to generate

lambda

Index of modified Bessel function of third kind.

psi

Second parameter of GIG. Should be positive.

chi

Third parameter of GIG. Should be positive.

Details

The density of \(GIG(\lambda, \psi, \chi)\) considered here is as follows. $$f(x) = \frac{(\psi / \chi)^(\lambda / 2)}{2 K_{\lambda}(\sqrt{\psi \chi})} x^{\lambda - 1} \exp(-\frac{1}{2} (\frac{\chi}{x} + \psi x))$$ where \(x > 0\).

References

Hörmann, W., Leydold, J. Generating generalized inverse Gaussian random variates. Stat Comput 24, 547-557 (2014).

Leydold, J, Hörmann, W.. GIGrvg: Random Variate Generator for the GIG Distribution. R package version 0.8 (2023).