lmn_post: Parameters of the posterior conditional distribution of an...

View source: R/lmn_post.R

lmn_postR Documentation

Parameters of the posterior conditional distribution of an LMN model.

Description

Calculates the parameters of the LMN model's Matrix-Normal Inverse-Wishart (MNIW) conjugate posterior distribution (see Details).

Usage

lmn_post(suff, prior)

Arguments

suff

An object of class lmn_suff (see lmn_suff()).

prior

A list with elements Lambda, Omega, Psi, nu as returned by lmn_prior().

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().

The posterior MNIW distribution is required to be a proper distribution, but the prior is not. For example, prior = NULL corresponds to the noninformative prior

π(B, Σ) ~ |Σ|^{-(q+1)/2}.

Value

A list with elements named as in prior specifying the parameters of the posterior MNIW distribution. Elements Omega = NA and nu = NA specify that parameters Beta = 0 and Sigma = diag(q), respectively, are known and not to be estimated.

Examples

# generate data
n <- 50
q <- 2
p <- 3
Y <- matrix(rnorm(n*q),n,q) # response matrix
X <- matrix(rnorm(n*p),n,p) # covariate matrix
V <- .5 * exp(-(1:n)/n) # Toeplitz variance specification

suff <- lmn_suff(Y = Y, X = X, V = V, Vtype = "acf") # sufficient statistics

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