Creating a matrix of first-order partial correlation coefficients from a correlation matrix

Dear all, I have a correlation matrix R (of a n-dimensional random vector), and I want to create matrices of first-order partial correlation coefficients. For example,
R_q(i,j) = (R(i,j)-R(i,q)*R(j,q))/(sqrt((1-R(i,q)^2)*(1-R(j,q)^2)))
for q = 1,...,n.
I want to create R_1,...,R_n from R. Obviously, you can always brute force it, but I'm curious if there's an efficient way of doing this. I'd really appreciate any and all comments.
Thank you very much in advance!
Best, John

답변 (1개)

Hi Jeong Ho,
There is a function in Statistics and Machine Learning Toolbox called partialcorri which gives partial correlation coefficients adjusted for internal variables and another function called partialcorr which gives Linear or rank partial correlation coefficients. Links to doc below:
Hopefully if you have Statistics Toolbox you can use these, but I don't know of other functions which do this.
Hope this helps,
Cheers!
Abhiram

카테고리

도움말 센터File Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

질문:

2015년 7월 2일

답변:

2015년 7월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by