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? Thanks, Roger
Peter Dalgaard
2005-Mar-21 09:15 UTC
[R] anomalous result for wilcox.exact in exactRankTests
Roger Levy <rog at 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 at biostat.ku.dk) FAX: (+45) 35327907