Learn R Programming

ksm (version 1.0)

mgamma: Multivariate gamma function

Description

Given a vector of points x and an order p, compute the multivariate gamma function. The function is defined as $$\gamma_p(x) = \pi^{p(p-1)/4}\prod_{i=1}^p \Gamma\{x + (1-i)/2\}.$$

Usage

mgamma(x, p, log = FALSE)

Value

a matrix with one column of the same length as x

Arguments

x

[vector] of points at which to evaluate the function

p

[int] dimension of the multivariate gamma function, strictly positive.

log

[logical] if TRUE, returns the log multivariate gamma function.