I have a Matrix
X=[0.231914928 3.126057882 -1.752476846-0.779092587 2.143243132 -1.944363312-1.744892449 1.206497824 -2.267829067-0.276817947 1.774687601 -1.768924258-0.367233254 1.697905199 -1.508506912-0.367233254 1.697905199 -1.508506912-1.378240769 0.814907572 -1.700393377-2.389248284 -0.060411815 -1.892279842-1.333033116 0.860977013 -1.8319726680.135041386 1.40613207 -1.333067858] Y=[0.253549664-0.2316929810.7683959712.988670669-0.038625616-0.038625616-0.525155376-1.0116851360.9614633363.181738034]
At first I want to calculate the correlation coefficient between all X columns which can be done like this
[R]=corrcoef(X)
then I want to see which pair of columns has the highest correlation together for example column 1 with 2 ? 1 with 3? 2 with 3?
then the one that has correlation more than 0.5 lets say for example columns 1 and 2 , then check their correlation with y and say which one is more correlated
Best Answer