[R] trouble with wilcox.test

From: Greg Hather <ghather_at_berkeley.edu>
Date: Thu 18 Aug 2005 - 05:12:36 EST


I'm having trouble with the wilcox.test command in R. To demonstrate the anomalous behavior of wilcox.test, consider

> wilcox.test(c(1.5,5.5), c(1:10000), exact = F)$p.value
[1] 0.01438390
> wilcox.test(c(1.5,5.5), c(1:10000), exact = T)$p.value
[1] 6.39808e-07 (this calculation takes noticeably longer).
> wilcox.test(c(1.5,5.5), c(1:20000), exact = T)$p.value
(R closes/crashes)

I believe that wilcox.test(c(1.5,5.5), c(1:10000), exact = F)$p.value yields a bad result because of the normal approximation which R uses when exact = F. Any suggestions for how to compute wilcox.test(c(1.5,5.5), c(1:20000), exact = T)$p.value?

--Greg

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Aug 18 05:16:19 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:50 EST