0

I'm looking to create a data set with three columns and an arbitrary number of rows.

I'd like column 1 to have a Pearson correlation .20 with column 2, column 1 to correlate .24 with column 3, and column 2 to correlate .3 with column 3.

How do I do produce this?

David_G
  • 1,127
  • 1
  • 16
  • 36

1 Answers1

0

you can generate multivariate guassian using mvnrnd and specify covariance to achieve the desired pearson correlation.

see the following documentation: http://www.mathworks.com/help/stats/mvnrnd.html

Cici
  • 1,407
  • 3
  • 13
  • 31