Description Usage Arguments Value Author(s) Examples
Simulates from a inverse gamma (a, b) distribution with density proportional to $y^(-a-1) exp(-b/y)$
1 | rigamma(n, a, b)
|
n |
number of random numbers to be generated |
a |
inverse gamma shape parameter |
b |
inverse gamma rate parameter |
vector of n simulated draws
Jim Albert
1 2 3 4 | a=10
b=5
n=20
rigamma(n,a,b)
|
[1] 0.3834260 0.4719047 0.5931504 0.4672214 0.3860028 0.8494853 0.7019057
[8] 0.7912156 0.7548683 0.6315305 0.4481571 0.5878979 1.3318498 0.6401769
[15] 0.3027346 0.6788368 0.6408850 0.4433238 0.4213004 0.5241296
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.