Function File: [W[, DI]] = iwishrnd (Psi, df[, DI][, n=1])

Return a random matrix sampled from the inverse Wishart distribution with given parameters

Inputs: the p x p positive definite matrix Tau and scalar degrees of freedom parameter df (and optionally the transposed Cholesky factor DI of Sigma = inv(Tau)). df can be non-integer as long as df > d

Output: a random p x p matrix W from the inverse Wishart(Tau, df) distribution. (inv(W) is from the Wishart(inv(Tau), df) distribution.) If n > 1, then W is p x p x n and holds n such random matrices. (Optionally, the transposed Cholesky factor DI of Sigma is also returned.)

Averaged across many samples, the mean of W should approach Tau / (df - p - 1).

Reference: Yu-Cheng Ku and Peter Bloomfield (2010), Generating Random Wishart Matrices with Fractional Degrees of Freedom in OX, http://www.gwu.edu/~forcpgm/YuChengKu-030510final-WishartYu-ChengKu.pdf

See also: wishrnd, iwishpdf.

Package: statistics