normalgamma {lestat}R Documentation

A Normal-Gamma Distribution

Description

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

Usage

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)(x,y) has a Normal-Gamma distribution with parameters μ\mu, κ\kappa, α\alpha, and β\beta, then the marginal distribution of yy has a Gamma distribution with parameters α\alpha and β\beta, and conditionally on yy, xx has a normal distribution with expectation μ\mu and logged standard deviation κlog(y)/2\kappa - log(y)/2. The probability density is proportional to

f(x,y)=yα0.5exp(y(β+e2κ(xμ)2/2)) f(x,y)=y^{\alpha-0.5}\exp(-y(\beta + e^{-2\kappa}(x-\mu)^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

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

[Package lestat version 1.9 Index]