# An Algorithm to Generate Variates with Desired Intercorrelation Matrix

10 Pages Posted: 27 Jul 2004

## Sudhanshu K. Mishra

North-Eastern Hill University (NEHU)

Date Written: July 27, 2004

### Abstract

The objective of this short paper is to provide an algorithm that generates X(n,m) with a desired intercorrelation matrix, R(m,m). In computer-based simulations (such as Monte Carlo experiments) that evaluate performance of competing estimators of regression coefficients (or evaluate the efficacy of a method of estimation of parameters) under severe multicollinearity conditions, one requires to generate X(n,m) that are highly multicollinear across the variables. Sometimes two variables Y and Z are each cointegrated with another variable X, but Y and Z do not appear to be cointegrated with each other, though, intuitively, one would expect that they should be cointegrated with each other and the transitivity property would be exhibited. By using the algorithm presented here, several examples of X(n,m) may be generated for experiments and further investigation in this line. Experiments that directly or indirectly use multivariate analysis methods (such as Principal components analysis, Factor analysis or Cluster analysis) as a procedure may require X(n,m) with a desired R matrix. In such experiments our algorithm may be useful.

We also provide here the source codes of the computer program (in FORTRAN) that implements the algorithm given in the paper. These source codes may easily be translated into any other computer language such as Pascal, BASIC etc, if needed. Some languages may not have a provision to perform double precision arithmetic. In that case, single precision arithmetic may be used. The results would be sufficiently accurate for the desired purpose. In its present FORTRAN codes, the program may be compiled by any suitable FORTRAN compiler.

Keywords: Intercorrelation matrix, correlation matrix, Monte Carlo experiment, multicollinearity, cointegration, Computer program, multivariate analysis, Simulation, generation of collinear sample data

JEL Classification: C15, C63, C87, C88

Suggested Citation

Mishra, Sudhanshu K., An Algorithm to Generate Variates with Desired Intercorrelation Matrix (July 27, 2004). Available at SSRN: https://ssrn.com/abstract=569543 or http://dx.doi.org/10.2139/ssrn.569543