[R] exact Wilcoxon signed rank test with ties and the "no longer under development" exactRanksumTests package

Stefan Grosse singularitaet at gmx.net
Fri Aug 25 10:08:10 CEST 2006


Dear List,

after updating the exactRanksumTests package I receive a warning that
the package is not developed any further and that one should consider
the coin package.

I don't find the signed rank test in the coin package, only the Wilcoxon
Mann Whitney U-Test. I only found a signed rank test in the stats
package (wilcox.test) which is able to calculate the exact pvalues but
unfortunately the procedure cannot calculate the exact values with ties.

Is there any other package that is providing a similiar test? Or is
there an easy work out how to take the ties into account? (Or a chance
that the correction is taken into account for the stats package?)

Stefan Grosse

Take the following example from Bortz/Lienert/Boehnke:

> x1<-c(9,14,8,11,14,10,8,14,12,14,13,9,15,12,9)
> x2<-c(13,15,9,12,16,10,8,13,12,16,9,10,16,12,9)

# exactRankTests package:

> wilcox.exact(x1,x2,paired=TRUE)

        Exact Wilcoxon signed rank test

data:  x1 and x2
V = 13, p-value = 0.1367
alternative hypothesis: true mu is not equal to 0

# wilcox.test by stats package:

> wilcox.test(x1,x2,paired=TRUE,exact=TRUE)

        Wilcoxon signed rank test with continuity correction

data:  x1 and x2
V = 13, p-value = 0.1436
alternative hypothesis: true mu is not equal to 0

Warning messages:
1: cannot compute exact p-value with ties in: wilcox.test.default(x1,
x2, paired = TRUE, exact = TRUE)
2: cannot compute exact p-value with zeroes in: wilcox.test.default(x1,
x2, paired = TRUE, exact = TRUE)



More information about the R-help mailing list