[R] correlating between two vectors of numbers

Anders Stegmann Stegmann at imbg.ku.dk
Thu Oct 14 14:37:01 CEST 2004


Hi, R!



Question1:

I am trying to correlate two vectors of numbers (two columns of microarray
signal values) by using the non-parametric Spearman's rank correlation
coefficient rho:

> cor.test(V2.Signal,V3.Signal,method="spearman")

but I get the error message:

Error in if (q > (n^3 - n)/6) pspearman(q - 1, n, lower.tail = FALSE) else
pspearman(q,  : 
        missing value where logical needed
In addition: Warning message: 
NAs introduced by coercion 

I have tried to use the parametric Pearson correlation and the
non-parametric Kendall's tau correlation and had no problem with that!!

> cor(V2.Signal,V3.Signal,use="complete.obs")                        (the
Pearson correlation)

> cor.test(V2.Signal,V3.Signal,method="kendall")                     (the
Kendall's correlation)


what's wrong?



Question2: 

Does anyone accidently know which correlation method would be the most
correct to use when the microarray signal values (the values to be
correlated) are not normal distributed (the Kendall's method seem to fit
better to my other tests than the Pearson method).




More information about the R-help mailing list