How to calculate the correlation between 4 variables in a matrix
7 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Jos (10584)
2016-10-27
See the documentation on CORR and PARTIALCORR, both in the Statistics Toolbox:
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!