p-values of correlation coefficients

瘦欲@ 提交于 2019-11-28 12:44:13

You can apply rcorr directly on A and B if you convert them to matrices first :

library(Hmisc)
rcorr(as.matrix(A),as.matrix(B))

Which gives :

     A1   B1   C1   A2   B2   C2
A1 1.00 1.00 1.00 0.95 0.92 0.46
B1 1.00 1.00 1.00 0.95 0.92 0.46
C1 1.00 1.00 1.00 0.95 0.92 0.46
A2 0.95 0.95 0.95 1.00 0.97 0.16
B2 0.92 0.92 0.92 0.97 1.00 0.15
C2 0.46 0.46 0.46 0.16 0.15 1.00

n= 5 


P
   A1     B1     C1     A2     B2     C2    
A1        0.0000 0.0000 0.0141 0.0273 0.4361
B1 0.0000        0.0000 0.0141 0.0273 0.4361
C1 0.0000 0.0000        0.0141 0.0273 0.4361
A2 0.0141 0.0141 0.0141        0.0078 0.7981
B2 0.0273 0.0273 0.0273 0.0078        0.8125
C2 0.4361 0.4361 0.4361 0.7981 0.8125       
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!