rigaussian: Simulating from inversse Gaussian random variable.
Description
Using method of Michael and Schucany (1976), we can generate from inversse Gaussian random variable. The density function of an inversse Gaussian distribution is given by
$$ f_W(w\vert{\bold{\theta}}) =\sqrt{\frac{\beta}{2 \pi w^3}}\exp\biggl\{-\frac{\beta(w - \alpha)^2}{2\alpha^2 w}\biggr\},$$ where \(w>0\) and \({\bold{\theta}}=(\alpha, \beta)^{\top}\). Herein \(\alpha>0\) is the mean and \(\beta> 0\) are the first (mean) and second (shape) parameter of this family, respectively.
Usage
rigaussian(n, alpha, beta)
Value
simulated realizations of size \(n\) from inversse Gaussian random variable.
Arguments
n
size of required samples.
alpha
tail mean parameter.
beta
shape parameter.
Author
Mahdi Teimouri
References
J. R. Michael and Schucany, (1976). Generating Random Variates Using Transformations with Multiple Roots, The American Statistician, 30(2), 88-90, tools:::Rd_expr_doi("10.1080/00031305.1976.10479147").