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
rigaussian(n, alpha, beta)
simulated realizations of size
size of required samples.
tail mean parameter.
shape parameter.
Mahdi Teimouri
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").
# \donttest{
n <- 100
alpha <- 4
beta <- 2
rigaussian(n, alpha, beta)
# }
Run the code above in your browser using DataLab