Skip to contents

X = scale / G for G a unit-scale gamma with shape shape, as actuar's dinvgamma() and SciPy's invgamma. The tail is Pareto-like: the mean is infinite for shape <= 1 and the variance for shape <= 2; limited and layer moments always exist. Properties: d@shape, d@scale.

Usage

inverse_gamma_distribution(shape, scale, ptr = NULL)

Arguments

shape, scale

Finite and positive.

ptr

Internal: an existing object to wrap.

Value

An inverse_gamma_distribution object, which inherits from distribution.

Details

Supports the same operations as pareto.

Examples

d <- inverse_gamma_distribution(3, 2000)
mean(d)
#> [1] 1000
layer(d, 4000, 1000)
#> [1] 248.7503