From Dan.Field at av.com  Tue Apr  8 09:46:37 2003
From: Dan.Field at av.com (Dan Field)
Date: Tue Apr  8 16:46:41 2003
Subject: [Rd] kendall's tau-b computation (PR#2742)
In-Reply-To: <x2d6jx86jh.fsf@biostat.ku.dk>
Message-ID: <PEEHLJBCHOGCHCJADBJDCEACDDAA.Dan.Field@av.com>


Hmm; I had another look and my original comment is incorrect.  I apologize for the bogus bug report.

The reason I looked at this in the first place is because I implemented my own version in order to get around the O(n^2) running
time (one of my lists has only 4 possible values so I can bin the other list items and then sort each of the bins).  I was using the
version in this library to compare the resulting value of tau with my own and found that I was getting disagreement in the 3rd
decimal place and thus looked at the code to understand why.

Given that my original report was in error, I'm still trying to discover the source of the disagreement.  Most likely it's a bug in
my own code.

Thanks for the quick response; please accept my apologies.

-----Original Message-----
From: Peter Dalgaard BSA [mailto:p.dalgaard@biostat.ku.dk]
Sent: Tuesday, April 08, 2003 7:26 AM
To: dan.field@av.com
Cc: r-devel@stat.math.ethz.ch; R-bugs@biostat.ku.dk
Subject: Re: [Rd] kendall's tau-b computation (PR#2742)


dan.field@av.com writes:

> In kendall.c (library is ctest), the limits for the first loop in routine
> kendall_tau run from 0 through n-1, and the inner loop runs from 0 through i-1.
> This causes the each pair at index i to be compared with itself; my
> understanding is that there should only be n*(n-1)/2 pairs under consideration
> for concordance, discordance, and ties.

???

Are you saying that j==i becomes true, when j runs from 0 to i-1?

--
   O__  ---- Peter Dalgaard             Blegdamsvej 3
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] kendall's tau-b computation (PR#2742)
Dan Field