Re: [R] Bug in Kendall for n<4?

From: Stavros Macrakis <>
Date: Sat, 22 Nov 2008 14:50:52 -0500

On Sat, Nov 22, 2008 at 9:04 AM, Martin Maechler <> wrote:
> SM> I believe Kendall tau is well-defined for this case...
> The real question is *WHY* there needs to be a separate package 'Kendall' when R itself does everything you want and does not show any problems?

Thanks for pointing me to cor(...,method="kendall"), which I did not know about; I used the Kendall CRAN package out of pure ignorance.

In my defense, I think it is excusable ignorance, as Search on the R Project home page finds the Kendall package (which only mentions cor as a "See Also"). I only more recently discovered the advantages of

By the way, is Kendall well-defined when the arguments are not permutations of each other? cor seems to return results even in this case:

       =>  1

apparently interpreting b as c(1,2) and c as c(1,2) based on alphabetical order (even though it is an UNordered factor), which seems to make the value depend on the subjects' names, which I'd think was wrong for a rank-order statistic.

Thanks again,

           -s mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sat 22 Nov 2008 - 19:53:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 23 Nov 2008 - 05:30:27 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive