lmn_prior: Conjugate prior specification for LMN models.

View source: R/lmn_prior.R

lmn_priorR Documentation

Conjugate prior specification for LMN models.

Description

The conjugate prior for LMN models is the Matrix-Normal Inverse-Wishart (MNIW) distribution. This convenience function converts a partial MNIW prior specification into a full one.

Usage

lmn_prior(p, q, Lambda, Omega, Psi, nu)

Arguments

p

Integer specifying row dimension of Beta. p = 0 corresponds to no Beta in the model, i.e., X = 0 in lmn_suff().

q

Integer specifying the dimension of Sigma.

Lambda

Mean parameter for Beta. Either:

  • A p x q matrix.

  • A scalar, in which case Lambda = matrix(Lambda, p, q).

  • Missing, in which case Lambda = matrix(0, p, q).

Omega

Row-wise precision parameter for Beta. Either:

  • A p x p matrix.

  • A scalar, in which case Omega = diag(rep(Omega,p)).

  • Missing, in which case Omega = matrix(0, p, p).

  • NA, which signifies that Beta is known, in which case the prior is purely Inverse-Wishart on Sigma (see Details).

Psi

Scale parameter for Sigma. Either:

  • A q x q matrix.

  • A scalar, in which case Psi = diag(rep(Psi,q)).

  • Missing, in which case Psi = matrix(0, q, q).

nu

Degrees-of-freedom parameter for Sigma. Either a scalar, missing (defaults to nu = 0), or NA, which signifies that Sigma = diag(q) is known, in which case the prior is purely Matrix-Normal on Beta (see Details).

Details

The Matrix-Normal Inverse-Wishart (MNIW) distribution (B, Σ) ~ MNIW(Λ, Ω, Ψ, ν) on random matrices X_(p x q) and symmetric positive-definite Σ_(q x q) is defined as

Σ ~ Inverse-Wishart(Ψ, ν)

B | Σ ~ Matrix-Normal(Λ, Ω^{-1}, Σ),

where the Matrix-Normal distribution is defined in lmn_suff().

Value

A list with elements Lambda, Omega, Psi, nu with the proper dimensions specified above, except possibly Omega = NA or nu = NA (see Details).

Examples

# problem dimensions
p <- 2
q <- 4

# default noninformative prior pi(Beta, Sigma) ~ |Sigma|^(-(q+1)/2)
lmn_prior(p, q)

# pi(Sigma) ~ |Sigma|^(-(q+1)/2)
# Beta | Sigma ~ Matrix-Normal(0, I, Sigma)
lmn_prior(p, q, Lambda = 0, Omega = 1)

# Sigma = diag(q)
# Beta ~ Matrix-Normal(0, I, Sigma = diag(q))
lmn_prior(p, q, Lambda = 0, Omega = 1, nu = NA)

mlysy/LMN documentation built on March 25, 2022, 11:12 a.m.