rigaussian {mixbox} | R Documentation |
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)
Arguments
n |
size of required samples. |
alpha |
tail mean parameter. |
beta |
shape parameter. |
Value
simulated realizations of size n
from inversse Gaussian random variable.
Author(s)
Mahdi Teimouri
References
J. R. Michael and Schucany, (1976). Generating Random Variates Using Transformations with Multiple Roots, The American Statistician, 30(2), 88-90, doi: 10.1080/00031305.1976.10479147.
Examples
n <- 100
alpha <- 4
beta <- 2
rigaussian(n, alpha, beta)