# How to efficiently generate PSD correlation matrices?

 1 I am would like to be able to efficiently generate PSD correlation matrices. My method slows down dramatically as I increase the size of matrices to be generated. Could you suggest any efficient solutions? If you are aware of any examples in Matlab, I would be very thankful When generating a PSD correlation matrix how would you pick the parameters to describe matrices to be generated? An average correlation, standard deviation of correlations, eigenvalues? asked 16 Sep '10, 20:41 Edward 25●4 accept rate: 0%

 1 Given any PSD matrix, you can cook up a joint normal distribution with that as the covariance matrix. So, barring a need for some specific attribute (such as deliberate multicollinearity), what I typically do is: generate a random square matrix M (which will be full rank with probability 1 if I use a continuous distribution for the components); compute M'M, which will be positive definite (that's my covariance matrix); then convert M'M to a correlation matrix by scaling by the standard deviations (computed from the variances on the diagonal of M'M). I usually only need low dimensional instances, but I think it's pretty efficient. This is a bit trickier. It's relatively easy to modify my method to produce a specific range of variances -- you just do a little scaling on the covariance matrix -- but it's rather hard to directly constraint the correlations. If you're willing to take a slower route, you can specify a Binomial distribution for the number of positive correlations (or a multinomial positive/zero/negative if you want to explicitly include zero correlations) along with a distribution (uniform? beta?) for their magnitudes, then solve a MIQP to find the coefficients of M (actually, just the upper triangle of M) that come closest to producing what you were looking for. answered 16 Sep '10, 21:13 Paul Rubin ♦♦ 14.6k●4●12 accept rate: 19%
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags:

×14