Re: [R] anomalous result for wilcox.exact in exactRankTests

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Mon 21 Mar 2005 - 20:15:04 EST

Roger Levy <rog@stanford.edu> writes:

> Hi,
>
> In the exactRankTest package, I've become aware that you can get
> anomalous p-values (i.e., above 1) from the wilcox.exact method, as in:
>
> > wilcox.exact(c(-0.6,0.8,-0.5))
>
> Exact Wilcoxon signed rank test
>
> data: c(-0.6, 0.8, -0.5)
> V = 3, p-value = 1.25
> alternative hypothesis: true mu is not equal to 0
>
> This is disturbing. Has anyone encountered this before, and if so is
> there an obvious reason why this should happen?

Presumably by counting the observed value towards both tails:

> dsignrank(0:6,3)

[1] 0.125 0.125 0.125 0.250 0.125 0.125 0.125
> sum(dsignrank(0:3,3))+sum(dsignrank(3:6,3))
[1] 1.25

which looks a bit odd, but of course only happens when the correct p-value is 1.0, so it is fairly harmless.

-- 
   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

______________________________________________
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 Mon Mar 21 20:17:20 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:51 EST