inv_gauss_sampler | R Documentation |
This function returns 1 sample from an Inverse Gaussian distribution with mean mu and shape lambda
inv_gauss_sampler(mu, lambda)
mu |
mean value |
lambda |
shape value |
real value: simulated point from Inverse Gaussian distribution with mean mu and shape lambda
curve(statmod::dinvgauss(x, mean = 1, shape = 1), 0, 4) samples <- sapply(1:10000, function(i) inv_gauss_sampler(mu = 1, lambda = 1)) lines(density(x = samples, adjust = 0.5), col = 'blue')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.