[EMAIL PROTECTED] writes: > Dear R maintainers, > > R is great. Now that I have that out of the way, I believe I have > encountered a bug, or at least an inconsistency, in how Spearman and > Kendall rank correlations are handled. Specifically, cor() and > cor.test() do not produce the same answer when the data contain NAs.
We know... PR#6448 is the same thing. (The problem is that rank() follows sort() which by default sorts NA's to the end of the sorted vector. Thus NA's get a high rank and if both x and y have NA at the same time, a high spearman correlation is calculated.) It is fixed in the patched R version and also in the development sources (soon to be 1.9.0). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel