Random generation for the Inverse Gamma distribution with parameters shape (alpha) and scale (beta).

rinvgamma(n, shape, scale)

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required.

shape

shape and scale parameters. Must be positive, scale strictly.

scale

shape and scale parameters. Must be positive, scale strictly.

Value

numeric vector of length n.

Examples

rinvgamma(10, 0.5, 0.01)
#> [1] 0.043728991 0.027236732 0.055364541 0.009135460 0.111457682 0.043952824 #> [7] 0.499702266 0.263416786 0.009259703 0.015095984