50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


LaplacesDemon (version 16.1.0)

dist.Inverse.Matrix.Gamma: Inverse Matrix Gamma Distribution

Description

This function provides the density for the inverse matrix gamma distribution.

Usage

dinvmatrixgamma(X, alpha, beta, Psi, log=FALSE)

Arguments

X

This is a k×k positive-definite covariance matrix.

alpha

This is a scalar shape parameter (the degrees of freedom), α.

beta

This is a scalar, positive-only scale parameter, β.

Psi

This is a k×k positive-definite scale matrix.

log

Logical. If log=TRUE, then the logarithm of the density is returned.

Value

dinvmatrixgamma gives the density.

Details

  • Application: Continuous Multivariate Matrix

  • Density: p(θ)=|Ψ|αβkαΓk(α)|θ|α(k+1)/2exp(tr(1βΨθ1))

  • Inventors: Unknown

  • Notation 1: θIMGk(α,β,Ψ)

  • Notation 2: p(θ)=IMGk(θ|α,β,Ψ)

  • Parameter 1: shape α>2

  • Parameter 2: scale β>0

  • Parameter 3: positive-definite k×k scale matrix Ψ

  • Mean:

  • Variance:

  • Mode:

The inverse matrix gamma (IMG), also called the inverse matrix-variate gamma, distribution is a generalization of the inverse gamma distribution to positive-definite matrices. It is a more general and flexible version of the inverse Wishart distribution (dinvwishart), and is a conjugate prior of the covariance matrix of a multivariate normal distribution (dmvn) and matrix normal distribution (dmatrixnorm).

The compound distribution resulting from compounding a matrix normal with an inverse matrix gamma prior over the covariance matrix is a generalized matrix t-distribution.

The inverse matrix gamma distribution is identical to the inverse Wishart distribution when α=ν/2 and β=2.

See Also

dinvgamma dmatrixnorm, dmvn, and dinvwishart

Examples

Run this code
# NOT RUN {
library(LaplacesDemon)
k <- 10
dinvmatrixgamma(X=diag(k), alpha=(k+1)/2, beta=2, Psi=diag(k), log=TRUE)
dinvwishart(Sigma=diag(k), nu=k+1, S=diag(k), log=TRUE)
# }

Run the code above in your browser using DataLab