16.7 Inverse Gamma Distribution
16.7.1 Probability Density Function
If α∈R+ and β∈R+, then for y∈R+, InvGamma(y|α,β)=βαΓ(α) y−(α+1)exp(−β1y).
16.7.2 Sampling Statement
y ~
inv_gamma
(alpha, beta)
Increment target log probability density with inv_gamma_lpdf( y | alpha, beta)
dropping constant additive terms.
16.7.3 Stan Functions
real
inv_gamma_lpdf
(reals y | reals alpha, reals beta)
The log of the inverse gamma density of y given shape alpha and scale
beta
real
inv_gamma_cdf
(reals y, reals alpha, reals beta)
The inverse gamma cumulative distribution function of y given shape
alpha and scale beta
real
inv_gamma_lcdf
(reals y | reals alpha, reals beta)
The log of the inverse gamma cumulative distribution function of y
given shape alpha and scale beta
real
inv_gamma_lccdf
(reals y | reals alpha, reals beta)
The log of the inverse gamma complementary cumulative distribution
function of y given shape alpha and scale beta
R
inv_gamma_rng
(reals alpha, reals beta)
Generate an inverse gamma variate with shape alpha and scale beta; may
only be used in generated quantities block. For a description of
argument and return types, see section vectorized PRNG functions.