It is quite easy to generate a set of data with a specified correlation coefficient of r. I don't have the time right now to write out a specific program. However, the basic steps are very simple.
I got this idea from an electronic message from Marco Welton, at University College Cork, Ireland, but I'm sure that it is not original with him. A different way of presenting some of these ideas, and a javascript package to implement them is presented in a document prepared by Derek Ogle, named Ogle.html. The javascript program is not available from that source, but Ogle's address is, and you can probably get it from him.
If you want to generate data for several variables (k > 2), go back to the page you came from and click on the link referencing David Nichols. There you will see an implementation of his ideas, and can generate a data set that either is sampled from a population with a defined correlation matrix, or a data set that has an exactly specified matrix.
Return to
Dave Howell's Statistical Home Page
University of Vermont Home Page
Last revised: 7/11/98