Finding aggregate correlation of multiple columns against one column in r -


i have data frame 11 columns out of 9 numeric. trying find out correlation of 8 columns against remaining column i.e., correlation of 8 variables 1 variable should generate 1 value of correlation instead of generating 9 different values in matrix.

is possible? or need calculate average correlation after calculating individual correlation?e.g., trying find correlation of x,y,z a. using mentioned methods matrix gives me indivual score of association x,y,z need 1 score takes account 3 x,y & z.

a simulated df presented below illustration purposes

          x            y           z   1   1.72480753  0.007053053  0.32435032  10 2   0.97227885 -0.844118498 -0.75534119  20 3  -0.53844294 -0.036178789  0.89396765  30 4   1.34695331  0.870119744  0.99400826  40 5   0.02336335  0.514481676  0.95894286  50 6  -0.15239307  0.386061290  0.73541287  60 7  -0.29878116  1.615012645 -0.04416341  70 8  -1.10907706 -1.581093487 -0.93293702  80 9   2.73021114 -0.130141775  1.85304372  90 10  0.22417487  1.170900385 -0.68312974 100 

i can correlation of each row , variable want correlation of x,y,z combined a

corr.test(df[,1:3],df[,4]) 

i appreciate towards problem.

regards,

pearson correlation defined number relating 1 sequence (or vector) of values (look up). far know there no equivalent definition group of vectors another, take average vector (of 3 vectors) , correlate that.

to me @ least has more immediate geometric meaning taking average of 3 correlation values.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -