Bug 13691 - Kendall's Tau should use Continuity Correction
Kendall's Tau should use Continuity Correction
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Wishlist
old
ix86 (32-bit) Windows 32-bit
: P5 normal
Assigned To: Jitterbug compatibility account
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-07 18:33 UTC by Jitterbug compatibility account
Modified: 2009-05-07 18:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 2009-05-07 18:33:01 UTC
From: dsimcha@yahoo.com
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.

Comment 1 Jitterbug compatibility account 2009-05-26 15:53:00 UTC
NOTES:
 where is the evidence for 'very bad results'?  A p value of 5% rather than 8%
when the inaccurate option was deliberately chosen?

Package Kendall, which does use continuity correction, give 0.08641

Option add in 2.10.0
Comment 2 Jitterbug compatibility account 2009-05-26 15:53:01 UTC
Audit (from Jitterbug):
Tue May 26 10:53:01 2009	ripley	changed notes
Tue May 26 10:53:01 2009	ripley	moved from incoming to wishlst-fulfilled