VNORMAL Call

CALL VNORMAL( series, mu, sigma, n <, seed> ) ;

The VNORMAL subroutine generates a multivariate normal random series.

The input arguments to the VNORMAL subroutine are as follows:

mu

specifies a (or ) mean vector, where is the number of variables. You must specify either mu or sigma. If mu is not specified, a zero vector is used.

sigma

specifies a symmetric positive-definite covariance matrix. By default, sigma is an identity matrix with dimension . You must specify either mu or sigma. If sigma is not specified, an identity matrix is used.

n

specifies the length of the series. If n is not specified, is used.

seed

is a scalar that contains the random number seed. At the first execution of the subroutine, the seed variable is used as follows:

If seed > 0, the input seed is used for generating the series.

If seed = 0, the system clock is used to generate the seed.

If seed < 0, the value ()(seed) is used for generating the series.

If the seed is not supplied, the system clock is used to generate the seed.

On subsequent calls of the subroutine in the DO loop like environment the seed variable is used as follows: If seed > 0, the seed remains unchanged. In other cases, after each execution of the subroutine, the current seed is updated internally.

The VNORMAL subroutine returns the following value:

series

is an matrix that contains the generated normal random series.

Consider a bivariate () normal random series with mean and covariance matrix , where

     

To generate this series, you can use the following statements:

  mu   = { 10, 20 };
  sigma= { 1.0  0.5, 0.5 1.25};
  call vnormal(et, mu, sigma, 100);