How to calculate the correlation between 4 variables in a matrix
Show older comments
Hello, I have a matrix with 4 variables. I want to find out the correlation of each variable with one another - so I used corr function.
But i want to know, if while doing so, it takes into account the effect of other variables too - example, if correlation of cols 1 and 2 is being calculated, does it take into account the effects of col 3 and 4 as well? I am in need for a correlation of col 1 with all other cols, and so on for each col vs all other cols.
Answers (1)
Jos (10584)
on 27 Oct 2016
0 votes
See the documentation on CORR and PARTIALCORR, both in the Statistics Toolbox:
Categories
Find more on Correlation and Convolution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!