Dataplot Vol 2 Vol 1

# MULTIVARIATE T RANDOM NUMBER

Name:
MULTIVARIATE T RANDOM NUMBER GENERATOR
Type:
Let Subcommand
Purpose:
Generate random numbers from a multivariate t distribution.
Description:
For univariate distributions, Dataplot generates random numbers using the common syntax

LET <shape-parameter> = <value>
LET Y = <dist> RANDOM NUMBERS FOR I = 1 1 N
LET Y = LOC + SCALE*Y

Multivariate distributions, however, genrally require matrix operations. For this reason, random numbers for multivariate distributions each have their own unique syntax. Although you can generate P columns of t random numbers, this does take into account any correlation between the variables (i.e., they are independent).

To generate an NxP matrix of t random numbers in Dataplot, you must specify a Px1 mean vector, a PxP variance-covariance matrix, and the desired degress of freedom (i.e., the shape parameter for the t distribution). The mean vector specifies the location parameters for each of the P columns. The diagonal of the variance-covariance matrix specifies the scale parameters of the P columns. A single value is specified for the degrees of freedom (i.e., all columns assume a common degrees of freedom).

Syntax:
LET <mat> = MULTIVARIATE T RANDOM NUMBERS
<mu> <sigma> <nu> <n>
where <mu> is a variable containing the desired location parameters;
<sigma> is a matrix containing the desired variance-covariance matrix;
<nu> is a number or parameter specifying the desired degrees of freedom;
<n> is a number or parameter specifying the desired number of rows;
and where <mat> is a matrix where the resulting multivariate normal random numbers are stored.

Dataplot determines the number of columns to generate from the number of rows in the <mu> vector. Note that the number of rows in <mu> must equal the number of rows (and columns) in <sigma> and <sigma> must be a symmetric positive-definite matrix (i.e., a value variance-covariance matrix).

Examples:
LET MU = -5 0 5
1 0.5 0.5
0.5 1 0.5
0.5 0.5 1
END OF DATA
LET N = 500
LET NU = 500
LET M = MULTIVARIATE T RANDOM NUMBERS MU SIGMA NU N
Note:
Dataplot first generates multivariate normal random numbers with a mean vector AMU and a variance-covariance matrix SIGMA using the RDMNOR routine. The multivariate normal random numbers are then divded by the SQRT(CHSRAN(NU)/NU) where CHSRAN is an independent chi-square random number with NU degrees of freedom.

RDMNOR was written by Charlie Reeves while he was a member of the NIST Statistical Engineering Division.

Note:
As with univariate random numbers, the nultivariate normal random numbers are built on an underlying uniform random number generators. Dataplot supports a number of different uniform random number generators. For details, enter

HELP SET RANDOM NUMBER GENERATOR
Default:
None
Synonyms:
None
Related Commands:
 RANDOM NUMBERS = Generate random numbers for 60+ univariate distributions. SET RANDOM NUMBER GENERATOR = Specify which univariate generator to use. MULTIVARIATE NORMAL RANDOM NUMBERS = Generate multivariate normal random numbers. INDEPENDENT UNIFORM RANDOM NUMBERS = Generate random numbers for independent uniform distributions. WISHART RANDOM NUMBERS = Generate random numbers for a Wishart distribution. DIRICHLET RANDOM NUMBERS = Generate random numbers for a Dirichlet distribution.
Reference:
"Continuous Multivariate Distributions Volume 1: Models and Applications", Johnson, Kotz, and Balakrishnan, Wiley, 2000.

"Introduction to Matrix Computations", G. W. Stewart, Academic Press, Algorithm 3.9, p. 142.

Applications:
Simulation, Bayesian Analysis
Implementation Date:
2003/5
Program:
dimension 100 columns
.
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 = 500
let nu = 3
.
let m = multivariate normal random numbers mu sigma n
.
multiplot corner coordinates 0 0 100 100
multiplot 2 3
title automatic
loop for k = 1 1 5
relative histogram m^k
end of loop

Date created: 5/16/2003
Last updated: 5/16/2003
Please email comments on this WWW page to alan.heckert@nist.gov.