Reputation: 12341
I know there's a nice way to compute both the correlation matrix and the correlation coefficient using corr
. However I'm already given a correlation matrix without the correlation coefficient. I don't want to recompute anything as far as covariances or correlation matrices.
What is the most efficient way to get the correlation coefficient?
Upvotes: 0
Views: 80
Reputation: 24581
Is this a mathematical question rather than a Matlab question? If you already have the correlation matrix between two variables, the correlation coefficient is m_12/sqrt(m_11*m_22), where m_ij is the matrix element at row i and column j.
Upvotes: 1