It is quite easy to generate a set of data that represents a sample from a population 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. The program will not generate a data set with exactly the correlation you specify. Instead it will draw data from a population whose correlation parameter (ρ) is that correlation.
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. If you want a program in SPSS or R that will generate a data set with an exact correlation matrix, go to CorrGen2.html. That program will handle a matrix with many variables, not just two.
Return to
Dave Howell's Statistical Home Page
University of Vermont Home Page
dch: