Diferencias en el cálculo de la correlación
de Antonio Matas -> datos<-read.table("/home/amatas/Escritorio/data_4.txt", header=TRUE, sep="\t", na.strings="*")
> correlacion<-cor(datos[,c("c28","c29","c30","c31","c32","c59","c65c66","c69","c70c71","c72","c89","c136c137","c138c139","c164","c165c166","c168","c169","c172c173","c174c175")], use="complete.obs", method="spearman")
> correlacion
c28 c29 c30 c31 c32
c28 1.00000000 0.171796709 0.20252303 0.1358170688 -0.117269347
c29 0.17179671 1.000000000 0.56070920 0.6337493091 -0.175399575
c30 0.20252303 0.560709197 1.00000000 0.5315687924 -0.194526665
c31 0.13581707 0.633749309 0.53156879 1.0000000000 -0.362006533
c32 -0.11726935 -0.175399575 -0.19452666 -0.3620065327 1.000000000
c59 0.20125493 0.096717193 0.02292325 0.0818812736 0.006603201
c65c66 0.07464166 0.383621052 0.25605995 0.5029369492 -0.197365043
c69 0.06575747 0.285013289 0.25617919 0.4160725134 -0.387891505
c70c71 0.02714106 0.410238934 0.30476814 0.5901648346 -0.347701905
c72 -0.01496374 -0.366280988 -0.30089008 -0.5416534498 0.403228869
c89 0.07012262 0.428234082 0.34234553 0.6347488819 -0.498028210
c136c137 0.05872029 0.305877608 0.19302757 0.3921505664 -0.201908471
c138c139 0.11566183 0.325962972 0.28907505 0.5186044931 -0.533966744
c164 0.10078373 0.039568176 0.12034043 0.0131500187 -0.055075585
c165c166 0.02991304 -0.042905706 -0.03680569 -0.0279836244 0.014549815
c168 -0.26980813 -0.000746175 -0.10136016 -0.0007628965 0.095662935
c169 0.11520551 -0.020023377 0.02546594 -0.0198774522 -0.067036504
c172c173 0.09725841 0.351172652 0.21813916 0.4325401352 -0.182984388
c174c175 -0.09390659 -0.082521047 -0.02413950 -0.0505976252 0.002599876
> cor(datos[,c("c28","c29")],use="complete.obs",method="spearman")
c28 c29
c28 1.0000000 0.1742175
c29 0.1742175 1.0000000
> cor(datos[,c("c28","c30")],use="complete.obs",method="spearman")
c28 c30
c28 1.0000000 0.1996478
c30 0.1996478 1.0000000
> cor(datos[,c("c28","c31")],use="complete.obs",method="spearman")
c28 c31
c28 1.0000000 0.1245031
c31 0.1245031 1.0000000
> cor(datos[,c("c28","c32")],use="complete.obs",method="spearman")
c28 c32
c28 1.00000000 -0.08195158
c32 -0.08195158 1.00000000
¿sabe alguien la razón de estas diferencias? Gracias