rigaussian | R Documentation |
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.
rigaussian(n, alpha, beta)
n |
size of required samples. |
alpha |
tail mean parameter. |
beta |
shape parameter. |
simulated realizations of size n
from inversse Gaussian random variable.
Mahdi Teimouri
J. R. Michael and Schucany, (1976). Generating Random Variates Using Transformations with Multiple Roots, The American Statistician, 30(2), 88-90, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/00031305.1976.10479147")}.
n <- 100
alpha <- 4
beta <- 2
rigaussian(n, alpha, beta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.