A special mathematical function related to the gamma function, generalized for multivariate gammas. lmvgamma is the log of the multivariate gamma, mvgamma.

The multivariate gamma function for a dimension p is defined as:

$$\Gamma_{p}(a)=\pi^{p(p-1)/4}\prod_{j=1}^{p} \Gamma [a+(1-j)/2]$$ For \(p = 1\), this is the same as the usual gamma function.

lmvgamma(x, p)

mvgamma(x, p)

Arguments

x

non-negative numeric vector, matrix, or array

p

positive integer, dimension of a square matrix

Value

For lmvgamma log of multivariate gamma of dimension p for each entry of x. For non-log variant, use mvgamma.

Functions

  • mvgamma(): Multivariate gamma function.

References

A. K. Gupta and D. K. Nagar 1999. Matrix variate distributions. Chapman and Hall.

Multivariate gamma function. In Wikipedia, The Free Encyclopedia,from https://en.wikipedia.org/w/index.php?title=Multivariate_gamma_function

See also

Examples

lgamma(1:12)
#>  [1]  0.0000000  0.0000000  0.6931472  1.7917595  3.1780538  4.7874917
#>  [7]  6.5792512  8.5251614 10.6046029 12.8018275 15.1044126 17.5023078
lmvgamma(1:12, 1L)
#>  [1]  0.0000000  0.0000000  0.6931472  1.7917595  3.1780538  4.7874917
#>  [7]  6.5792512  8.5251614 10.6046029 12.8018275 15.1044126 17.5023078
mvgamma(1:12, 1L)
#>  [1]        1        1        2        6       24      120      720     5040
#>  [9]    40320   362880  3628800 39916800
gamma(1:12)
#>  [1]        1        1        2        6       24      120      720     5040
#>  [9]    40320   362880  3628800 39916800