50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

LaplacesDemon (version 16.1.6)

dist.Matrix.Gamma: Matrix Gamma Distribution

Description

This function provides the density for the matrix gamma distribution.

Usage

dmatrixgamma(X, alpha, beta, Sigma, log=FALSE)

Arguments

X

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

alpha

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

beta

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

Sigma

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

log

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

Value

dmatrixgamma gives the density.

Details

  • Application: Continuous Multivariate Matrix

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

  • Inventors: Unknown

  • Notation 1: θMGk(α,β,Σ)

  • Notation 2: p(θ)=MGk(θ|α,β,Σ)

  • Parameter 1: shape α>2

  • Parameter 2: scale β>0

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

  • Mean:

  • Variance:

  • Mode:

The matrix gamma (MG), also called the matrix-variate gamma, distribution is a generalization of the gamma distribution to positive-definite matrices. It is a more general and flexible version of the Wishart distribution (dwishart), and is a conjugate prior of the precision matrix of a multivariate normal distribution (dmvnp) and matrix normal distribution (dmatrixnorm).

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

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

See Also

dgamma dmatrixnorm, dmvnp, and dwishart

Examples

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

Run the code above in your browser using DataLab