diwishart_inverse_R: Inverted Wishart density from the inverse.

Description Usage Arguments Details Value Inverted Wishart parametrization (Press) References See Also

View source: R/diwishart_inverse_R.R

Description

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.

Usage

1
diwishart_inverse_R(X.inv, df, Sigma, log = FALSE, is.chol = FALSE)

Arguments

X.inv

inverse of X (the observation)

df

degrees of freedom

Sigma

scale matrix

log

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 pdf p_X(x) by knowing x^(-1)

Value

the density in X

Inverted Wishart parametrization (Press)

Uses \insertCitePress2012Appliedbayessource parametrization.

X ~ IW(v, S)

with S is a p x p matrix, v > 2p (the degrees of freedom).

Then:

E[X] = S/(n - 2(p + 1))

References

\insertAllCited

See Also

diwishart_inverse, diwishart

Other R functions: diwishart(), dwishart(), riwish_Press()

Other statistical functions: diwishart_inverse(), diwishart(), dmvnorm(), dwishart(), riwish_Press(), rmvnorm(), rwish()

Other Wishart functions: diwishart_inverse(), diwishart(), dwishart(), get_minimum_nw_IW(), riwish_Press(), rwish()


lgaborini/bayessource documentation built on Nov. 9, 2021, 2:10 p.m.