[Rd] Kendall's Tau should use Continuity Correction (PR#13691)
dsimcha at yahoo.com
dsimcha at yahoo.com
Thu May 7 15:35:14 CEST 2009
Full_Name: David Simcha
Version: 2.9.0
OS: WinXP
Submission from: (NULL) (96.234.244.142)
> cor.test(c(1,2,3,4,5), c(8,6,7,5,3), method = "kendall")
Kendall's rank correlation tau
data: c(1, 2, 3, 4, 5) and c(8, 6, 7, 5, 3)
T = 1, p-value = 0.08333
alternative hypothesis: true tau is not equal to 0
sample estimates:
tau
-0.8
> cor.test(c(1,2,3,4,5), c(8,6,7,5,3), method = "kendall", exact = FALSE)
Kendall's rank correlation tau
data: c(1, 2, 3, 4, 5) and c(8, 6, 7, 5, 3)
z = -1.9596, p-value = 0.05004
alternative hypothesis: true tau is not equal to 0
sample estimates:
tau
-0.8
It appears that R's implementation of Kendall's Tau does not use any type of
continuity correction, producing very bad results when exact P-values are not
used.
More information about the R-devel
mailing list