Learn R Programming

lestat (version 1.9)

mnormalgamma: A Multivariate Normal-Gamma Distribution

Description

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

Usage

mnormalgamma(mu=c(0,0), P, alpha, beta)

Arguments

mu

The mu parameter. It must be a vector of length at least 2. The default value is (0,0).

P

The P parameter.

alpha

The alpha parameter.

beta

The beta parameter.

Value

A multivariate Normal-Gamma probability distribution.

Details

If \((x,y)\) has a multivariate Normal-Gamma distribution with parameters \(\mu\), \(P\), \(\alpha\), and \(\beta\), then the marginal distribution of \(y\) has a Gamma distribution with parameters \(\alpha\), \(\beta\), and conditionally on \(y\), \(x\) has a multivariate normal distribution with expectation \(\mu\) and precision matrix \(yP\). The probability density is proportional to $$ f(x,y)=y^{\alpha+k/2-1}\exp(-y(\beta + (x-\mu)^tP(x-\mu)/2)) $$ where \(k\) is the dimension.

See Also

gamma,normal,expgamma, normalgamma, normalexpgamma, mnormal,mnormalexpgamma

Examples

Run this code
# NOT RUN {
plot(mnormalgamma(alpha=3, beta=3))
# }

Run the code above in your browser using DataLab