Generation random samples from Inverse-Gamma distribution. For a random variable x, the density function is defined as: $$(rate^shape)/Gamma(shape) x^{-shape-1} exp(-rate/x)$$ Where Gamma() is the Gamma function.
rInvGamma(n, shape, scale)
integer, number of samples to be generated.
numeric, the shape parameter of gamma distribution.
numeric, the scale, or inverse-scale parameter of gamma distribution. The 'rate' parameter in Gamma is the 'scale' parameter in InvGamma.
A numeric vector, samples of Inverse-Gamma distribution.