Skip to contents

Functions to compute the probability density function, cumulative distribution function, and quantile function for the Inverse Gamma distribution.

Usage

inverse_gamma_pdf(x, shape, scale)

inverse_gamma_lpdf(x, shape, scale)

inverse_gamma_cdf(x, shape, scale)

inverse_gamma_lcdf(x, shape, scale)

inverse_gamma_quantile(p, shape, scale)

Arguments

x

quantile

shape

shape parameter (shape > 0)

scale

scale parameter (scale > 0)

p

probability (0 <= p <= 1)

Value

A single numeric value with the computed probability density, log-probability density, cumulative distribution, log-cumulative distribution, or quantile depending on the function called.

See also

Boost Documentation for more details on the mathematical background.

Examples

# Inverse Gamma distribution with shape = 3, scale = 4
inverse_gamma_pdf(2, 3, 4)
#> [1] 0.2706706
inverse_gamma_lpdf(2, 3, 4)
#> [1] -1.306853
inverse_gamma_cdf(2, 3, 4)
#> [1] 0.6766764
inverse_gamma_lcdf(2, 3, 4)
#> [1] -0.3905621
inverse_gamma_quantile(0.5, 3, 4)
#> [1] 1.495853