Creating a matrix of first-order partial correlation coefficients from a correlation matrix
조회 수: 2 (최근 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
댓글 수: 0
답변 (1개)
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
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!