[SciPy-dev] Possible Error in Kendall's Tau (scipy.stats.stats.kendalltau)
Sturla Molden
sturla@molden...
Wed Mar 18 10:55:38 CDT 2009
On 3/18/2009 4:12 PM, josef.pktd@gmail.com wrote:
> the sas reference by Bruce hat a reference to a book by Agresti, where
> I finally found a clear formal definition and it excludes matching
> ties in the in the denominator:
>
> http://books.google.ca/books?id=hpEzw4T0sPUC&dq=Agresti,+Alan
This is basically the same as in Numerical Receipes.
Hollander & Wolfe has a discussion of tie handling on page 374 and 375:
"We have recommended dealing with tied X observation and/or tied Y
observations by counting a zero in Q (8.17) counts leading to the
computation of K (8.6). This approach is statisfactory as long as the
number of (X,Y) pairs containing a tied X and/or tied Y observation does
not represent a sizable percentage of the total number (n) of sample pairs.
We should, however, point out that methods other than this zero
assignment to Q counts have been considered for dealing with tied C
and/or tied Y observations [...]"
They then suggest counting +1 or -1 by coin toss for ties, or a strategy
to be conservative about rejecting H0. They also suggest using Efron's
bootstrap for confidency intervals on tau (page 388). I don't see any
mention of tau-a, tau-b or tau-c in H&W, nor contigency tables.
I don't quite understand Hollander & Wolfe's argument. They are
basically saying that their recommended method of dealing with ties only
works when ties are so few in numbers that they don't matter anyway.
> I don't know about kendall's tau-c because m seems to be specific to
> contingency tables, while all other measures have a more general
> interpretation. Similar in view of the general definitions, I don't
> understand the talk about square or rectangular tables. But I don't
> have a good intuition for contingency tables.
The ide is that Kendall's tau works on ordinal scale, not rank scale as
Spearman's r. You can use the number of categories for X and Y you like,
but the categories have to be ordered. You thus get a table of counts.
If you for example use two categories (small or big) in X and four
categories (tiny, small, big, huge) in Y, the table is 2 x 4. If you go
all the way up to rank scale, you get a very sparse table with a lot 0
counts. With few categories, ties will be quite common, and that is the
justification for tau-b instead of gamma.
Sturla Molden
More information about the Scipy-dev
mailing list