WISHART RANDOM NUMBER
Name:
WISHART RANDOM NUMBER GENERATOR
Type:
Purpose:
Generate the sample variancecovariance matrix from a
random sample of size n that is distributed as a
pvariate normal N_{p}
(,
).
Description:
The Wishart distribution is a kdimensional
generalization of the chisquare distribution. The chisquare
distribution is the sum of squared normal variates. The
Wishart distribution is the sum of squared multivariate normal
variates. The Wishart distribution has applications in
Bayesian analysis.
In order to generate the Wishart variates, you need to
specify the following:

 the pxp variancecovariance matrix of
the multivariate normal distribution

 the vector of length p that defines the
location parameters of the multivariate normal
distribution
 n  the sample size
What is returned is a pxp sample
variancecovariance matrix.
Syntax:
LET <mat> = WISHART RANDOM NUMBERS
<mu> <sigma> <n>
where <mu> is a variable containing the desired location
parameters;
<sigma> is a matrix containing the desired
variancecovariance matrix;
<n> is a number or parameter specifying the sample
size;
and where <mat> is a matrix where the resulting Wishart
random numbers are stored.
The number of rows in <mu> must equal the number of rows
and columns in the <Sigma> matrix. The <Sigma>
matrix must be a valid variancecovariance matrix (i.e.,
symmetric and positive definite).
Examples:
LET MU = 5 0 5
READ MATRIX SIGMA
1 0.5 0.5
0.5 1 0.5
0.5 0.5 1
END OF DATA
LET N = 500
LET M = WISHART RANDOM NUMBERS MU SIGMA N
Note:
Dataplot generates the Wishart matrix using algorithm
AS 53 (routine WSHRT) from the Applied Statistics journal.
See the Reference below for details.
Note:
As with univariate random numbers, the Wishart random numbers
are built on an underlying uniform random number generator.
Dataplot supports a number of different uniform random number
generators. For details, enter
HELP SET RANDOM NUMBER GENERATOR
Default:
Synonyms:
Related Commands:
RANDOM NUMBERS

= Generate random numbers for 90+ univariate
distributions.

SET RANDOM NUMBER GENERATOR

= Specify which univariate generator to use.

MULTIVARIATE NORM RAND NUMB

= Generate multivariate normal random numbers.

MULTIVARIATE T RANDOM NUMBERS

= Generate multivariate t random numbers.

INDEPENDENT UNIFORM RAND NUMB

= Generate random numbers for independent uniform
distributions.

MULTINOMIAL RANDOM NUMBERS

= Generate random numbers for a multinomial
distribution.

DIRICHLET RANDOM NUMBERS

= Generate random numbers for a Dirichlet distribution.

Reference:
"Algorithm AS 53: Wishart Variate Generator", Smith and
Hocking, Applied Statistics, 1972, Vol. 21, No. 3.
"Statistical Distributions", Third Edition, Evans, Hastings,
and Peacock, Wiley, 2000, pp. 204205.
Applications:
Implementation Date:
Program:
dimension 100 columns
.
. Test Wishart random numbers
.
read matrix sigma
1.0 0.707107 0.0 0.0 0.0
0.707107 1.0 0.5 0.5 0.5
0.0 0.5 1.0 0.5 0.5
0.0 0.5 0.5 1.0 0.5
0.0 0.5 0.5 0.5 1.0
end of data
.
let mu = data 0 0 0 0 0
let n = 200
.
let w = wishart random numbers mu sigma n
.
set write decimals 3
print w
The following outout is generated.
MATRIX W  5 ROWS
 5 COLUMNS
VARIABLESW1 W2 W3 W4 W5
0.923 0.653 0.024 0.577 0.013
0.653 0.462 0.017 0.408 0.009
0.024 0.017 0.527 0.558 0.564
0.577 0.408 0.558 2.045 0.644
0.013 0.009 0.564 0.644 1.121
Date created: 7/7/2004
Last updated: 7/7/2004
Please email comments on this WWW page to
alan.heckert@nist.gov.
