ASA053
Wishart Variate Generator


ASA053 is a MATLAB library which returns samples from the Wishart distribution.

As far as I can tell, there are two mistakes in the printed text of the algorithm; one involves incorrectly determining the number of degrees of freedom for the ChiSquared distribution; the other omits an absolute value sign when inverting the Wilson-Hilferty formula, so that square roots of negative values are occasionally requested. These mistakes have been corrected here.

Source code for many Applied Statistics Algorithms is available through STATLIB.

Licensing:

The computer code and data files made available on this web page are distributed under the GNU LGPL license.

Languages:

ASA053 is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

WISHART, a MATLAB library which produces sample matrices from the Wishart or Bartlett distributions, useful for sampling random covariance matrices.

Reference:

  1. Stanley Sawyer,
    Wishart Distributions and Inverse-Wishart Sampling,
    Washington University,
    30 April 2007, 12 pages.
  2. William Smith, Ronald Hocking,
    Algorithm AS 53, Wishart Variate Generator,
    Applied Statistics,
    Volume 21, Number 3, pages 341-345, 1972.

Original Source Code:

Source Code:

Examples and Tests:

You can go up one level to the MATLAB source codes.


Last revised on 16 April 2014.