Function Reference: wishrnd

statistics: [W, D] = wishrnd (Sigma, df, D, n=1)

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

Inputs: the p× p positive definite matrix Sigma (or the lower-triangular Cholesky factor D of Sigma) and scalar degrees of freedom parameter df.

df can be non-integer as long as df > p

Output: a random p× p matrix W from the Wishart(Sigma, df) distribution. If n > 1, then W is p x p x n and holds n such random matrices. (Optionally, the lower-triangular Cholesky factor D of Sigma is also returned.)

Averaged across many samples, the mean of W should approach df*Sigma, and the variance of each element W_ij should approach df*(Sigma_ij^2 + Sigma_ii*Sigma_jj)

References

  1. 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: wishpdf, iwishpdf, iwishrnd

Source Code: wishrnd