[R] Kendall, cor.test, ties, why?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Apr 21 15:44:13 CEST 2004
How many permutations do you think there are? Direct enumeration is only
efficient for single-digit sample sizes, and those are too small to be
interesting in practice.
The issue is to count them reasonably efficiently: if there are no ties
this can be done inductively on the sample size, but otherwise it is a lot
more complicated.
On Wed, 21 Apr 2004 btom at passagen.se wrote:
> I can't figure out why it is not possible to compute an exact p-value in
> cor.test if there are ties between values in one of the arrays like below:
> cor.test(c(1,2,2), c(5,6,7), method="k", alternative="two.sided").
>
> Perhaps this is due to my lack of understanding of what is ment by p-value
> in this case. To me it seems reasonable that the p-value above should be
> the number of permutations, normalized by the total number of permutations,
> of one of the arrays that together with the other (unpermuted) array produce
> a higer (or equal) absolute tau than than that of the original permutation.
> I would be most greatful if someone cold help me understand the p-value
> better.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list