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.

回答(1 个)

Jos (10584)
Jos (10584) 2016-10-27
See the documentation on CORR and PARTIALCORR, both in the Statistics Toolbox:

标签

Community Treasure Hunt

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

Start Hunting!

Translated by