# MultivariateSpecial: Multivariate special functions In AEBilgrau/Bmisc: Biostatistical miscellaneous functions

## Description

Special matematical functions related to the multivariate gamma function which appears in the Wishart and Inverse Wishart distributions. The interface and usage should mirror the Special mathematical functions from the base package.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11``` ```gammap(x, p = 1) digammap(x, p = 1) Dgammap(x, p = 1) psigammap(x, p = 1, deriv = 0) trigammap(x, p = 1, deriv = 0) lgammap(x, p = 1L) ```

## Arguments

 `x` A numeric vector of values. The values of `x` should be strictly greater than `(p - 1)/2`. `p` A (single) integer giving the dimension. Default is `1`. `deriv` A (single) integer giving the order of the derivative. Default is `0`.

## Details

Warnings are thown when the functions are evaluated outside its domain. Run `Bmisc:::plotMultivariateSpecial()` for more info.

## Value

Returns a numeric vector with the same length as `x`. Similar to `gamma` and related functions `NaN`s are returned with warning when the function is evaluated outside its domain

`gammap` is the multivariate gamma function.

`digammap` is the multivariate digamma function.

`Dgammap` is the derivative of the multivariate gamma function.

`psigammap` is the n'th derivative log multivariate gamma function (i.e. multivariate polygamma).

`trigammap` is the 2'nd derivative log multivariate gamma function (i.e. the multivariate trigamma).

`lgammap` is the log multivariate gamma function.

## Note

For `lgammp`, warnings of the type ```"value out of range in 'lgamma'"``` is due to evaluation in the half integers below (p-1)/2.

## Author(s)

Anders Ellern Bilgrau <anders.ellern.bilgrau (at) gmail.com>

 ```1 2 3 4 5 6 7 8``` ```gammap(3.2, p = 1) gammap(c(0.2, 0.5, 0.9, 1.2, 1.5), p = 3) # x < (p-1)/2 ! lgammap(3.1, p = 2) digammap(2, p = 3) Dgammap(3.2, p = 1) # A plot of all special functions Bmisc:::plotMultivariateSpecial() ```