Samples from the inverse gamma distribution.

Share:

Description

This function samples from the inverse gamma distribution.

Usage

1
rinvgamma(n, shape, scale)

Arguments

n

Number of values to sample.

shape

Shape parameter.

scale

Scale parameter (1/rate).

Value

Random sample from the inverse gamma distribution.

Author(s)

Frank Dondelinger

See Also

dinvgamma

Examples

1
2
3
4
5
6
# Draw samples from inverse gamma distribution with shape parameter 1 
# and scale parameter 1
samples = rinvgamma(100, shape=1, scale=1)

# Calculate density of samples
densities = dinvgamma(samples, shape=1, scale=1)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.