powered by
Simulates from a inverse gamma (a, b) distribution with density proportional to $y^(-a-1) exp(-b/y)$
rigamma(n, a, b)
number of random numbers to be generated
inverse gamma shape parameter
inverse gamma rate parameter
vector of n simulated draws
# NOT RUN { a=10 b=5 n=20 rigamma(n,a,b) # }
Run the code above in your browser using DataLab