Implemented in R (slow).

diwishart(X, df, Sigma, log = FALSE, is.chol = FALSE)

Arguments

X

observation

df

degrees of freedom

Sigma

scale matrix

log

if TRUE, return the log-density

is.chol

if TRUE, Sigma and X are the upper Cholesky factors of Sigma and X

Value

the density in X

Inverted Wishart parametrization (Press)

Uses (Press 2012) parametrization.

$$X \sim IW(\nu, S)$$ with \(S\) is a \(p \times p\) matrix, \(\nu > 2p\) (the degrees of freedom).

Then: $$E[X] = \frac{S}{\nu - 2(p + 1)}$$

See also