normalgamma: A Normal-Gamma Distribution

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Creates an object representing a Normal-Gamma distribution. If (x,y) has a Normal-Gamma distribution, then the marginal distribution of y is a Gamma distribution, and the conditional distribution of x given y is normal.

Usage

1
normalgamma(mu, kappa, alpha, beta)

Arguments

mu

The mu parameter.

kappa

The kappa parameter.

alpha

The alpha parameter.

beta

The beta parameter.

Details

If (x,y) has a Normal-Gamma distribution with parameters μ, κ, α, and β, then the marginal distribution of y has a Gamma distribution with parameters α and β, and conditionally on y, x has a normal distribution with expectation μ and logged standard deviation κ - log(y)/2. The probability density is proportional to

f(x,y)=y^{α-0.5}\exp(-y(β + e^{-2κ}(x-μ)^2/2))

Value

A Normal-Gamma probability distribution.

Author(s)

Petter Mostad <mostad@chalmers.se>

See Also

gamma, normal, expgamma, normalexpgamma, mnormal, mnormalgamma, mnormalexpgamma

Examples

1
plot(normalgamma(3,4,5,6))

Example output

Loading required package: MASS

lestat documentation built on May 2, 2019, 2:09 p.m.