Computes the pdf p_X(x) by knowing x^(-1)

diwishart_inverse(X_inv, df, Sigma, logd = FALSE, is_chol = FALSE)

Arguments

X_inv

inverse of X (the data)

df

degrees of freedom of the Inverted Wishart

Sigma

scale matrix of the Inverted Wishart

logd

if TRUE, return the log-density

is_chol

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

Details

Computes the density of an Inverted Wishart (df, Sigma) in x, by supplying (x^(-1), df, Sigma) rather than (x, df, Sigma). Avoids a matrix inversion.

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)}$$

References

Press SJ (2012). Applied Multivariate Analysis: Using Bayesian and Frequentist Methods of Inference. Courier Corporation.

See also