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

조회 수: 8(최근 30일)
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개)

Abhiram Bhanuprakash
Abhiram Bhanuprakash 2015년 7월 6일
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

Community Treasure Hunt

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

Start Hunting!

Translated by