GRMULTINORMAL procedure
Generates multivariate Normal pseudo-random numbers (P.W. Goedhart & K.L. Moore).
Options
Parameters
Description
GRMULTINORMAL generates pseudo-random numbers from a multivariate Normal distribution Np(μ, Σ). The mean μ is specified by the option MEANS as a variate of length p; the variance-covariance matrix Σ is specified by the option VCOVARIANCE as a symmetric matrix with p rows and columns; and the option NVALUES specifies the number of values n to be generated. Note that VCOVARIANCE must be positive semi-definite.
The numbers can be saved using the NUMBERS parameter, in either a pointer to a set of variates, or a matrix. If the NUMBERS structure or structures are already declared, their dimensions must be compatible with the settings of the NVALUES, MEANS and VCOVARIANCE options. The dimensions are also used, if necessary, to set defaults for the options. By default, MEANS is taken to be a variate of zero values, and VCOVARIANCE is taken to be the identity matrix. If the setting of NUMBERS is not already declared, if will be defined as a pointer to a set of variates with dimensions deduced from the option settings.
Options: NVALUES, MEANS, VCOVARIANCE.
Parameter: NUMBERS.
Method
Pseudo-random numbers from a multivariate Normal distribution are generated by forming a matrix Y of columns of univariate Normal random numbers, using the Box-Muller method (Box & Muller 1958), followed by a linear transformation
X = A Y + μ,
where A is calculated by a CHOLESKI decomposition, AA′ = Σ. (See, for example, Johnson 1987 pages 52-55, Tong 1990 pages 181-186).
Action with
RESTRICT
Variates that have been restricted will receive output from GRMULTINORMAL only in those units that are not excluded by the restriction. Values in the excluded units remain unchanged. Note that the NVALUES option must equal the full size of the variates. Restrictions on the MEANS variate are ignored.
References
Box, G.E.P. & Muller, M.E. (1958). A note on generation of normal deviates. Annals of Mathematical Statistics, 28, 610-611.
Johnson, M.E. (1987). Multivariate Statistical Simulation. John Wiley & Sons, New York.
Tong, Y.L. (1990). The Multivariate Normal Distribution. Springer-Verlag, New York.