Creating a matrix of first-order partial correlation coefficients from a correlation matrix
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Abhiram Bhanuprakash
il 6 Lug 2015
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 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!