4
$\begingroup$

For the purpose of simulation, I would like to construct such a correlation matrix that would respect to some extend the given set of preferable/desirable correlation coefficients for each pair of variables.

I tried filling in a matrix with the given coefficients and then enforcing the sum of absolute values of off-diagonal entries in each row/column to be smaller than one. It works, but it considerable weakens the given correlations, which I would like to avoid (as much as possible).

I would appreciate any suggestions. Thank you!

Regards, Ivan

$\endgroup$
  • $\begingroup$ A relevant reference here $\endgroup$ – Glen_b -Reinstate Monica Sep 20 '14 at 10:49
  • $\begingroup$ Is your input matrix certain to be symmetric? $\endgroup$ – Glen_b -Reinstate Monica Sep 20 '14 at 11:16
  • $\begingroup$ @Glen_b, thank you for the reference. I do not have any input matrix; for N variables, I have N*(N-1)/2 Pearson correlation coefficients. Or maybe I misunderstood your question? $\endgroup$ – Ivan Sep 20 '14 at 11:30
  • $\begingroup$ I have edited my answer to explain in more detail. $\endgroup$ – Glen_b -Reinstate Monica Sep 20 '14 at 17:44
3
$\begingroup$

Arranging the correlations into a matrix: Let $\rho_{ij}$ be the correlation between variables $i$ and $j$. Place $\rho_{ij}$ into positions $(i,j)$ and $(j,i)$ of the correlation matrix. Note that $\rho_{ii}=1$, so place $1$'s down the diagonal. If the set of correlations is consistent, the matrix you have is a proper correlation matrix.

Sometimes (depending on how they were obtained), it turns out that the set of correlations doesn't form a proper correlation matrix. One way to check whether you do is to take the singular value decomposition and check all the singular values are non-negative.

[Such problems with a matrix that is "put together" are common. For example, pairwise correlation coefficients may have been generated from sets of observations where - due to partially missing observations, for example - different observation-pairs are available between different pairs of variables. If pairwise correlations are computed on all available data, sometimes the resulting correlation matrix is not positive semi-definite.]

If the constructed correlation matrix is not positive semi-definite, one simple approach to finding a valid correlation matrix near to the constructed one is to compute a singular-value decomposition and then set all negative singular values to zero, at which point you have the SVD of a correlation matrix which is often fairly close to the original. (There are alternatives, such as described at the link I gave in comments.)

$\endgroup$
  • $\begingroup$ I do not have any data; I am trying to simulate a completely artificial/synthetic system. I have some understanding about pairwise correlations between my variables, and I would like to construct a correlation matrix that would reflect my knowledge. Having constructed such a matrix, I am planning to assume a multivariate Gaussian distribution and proceed to drawing samples. $\endgroup$ – Ivan Sep 20 '14 at 11:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.