Rev Language Reference


dnInverseGamma - inverseGamma Distribution

inverse-gamma probability distribution for positive real numbers.

Usage

dnInverseGamma(RealPos shape, RealPos rate)

Arguments

shape : RealPos (pass by const reference)
The shape parameter.
rate : RealPos (pass by const reference)
The rate parameter (rate = 1/scale).

Domain Type

Details

The inverse Gamma distribution is the probability of the sum of exponentially distributed variables. Thus, it provides a natural prior distribution for parameters that could be considered as sums of exponential variables.

Example

# lets simulate
a <- rinverseGamma(1000,shape=4,rate=4)
# we expect a mean of 1
mean(a)

# create a random variable
x ~ dnInverseGamma(shape=4,rate=1)
x

See Also