Exact Nonparametric Inference in R

For many of the classical tests, including the Wilcoxon signed rank and rank sum and the Ansari-Bradley tests, exact unconditional distributions of the test statistics can be obtained using recursion formulae provided that the underlying distribution functions are continuous. For every score function special algorithms are needed. Moreover, they are not valid for tied scores. However, the classical tests can be viewed as special cases of permutation tests. We use the shift algorithm introduced by Streitberg & Rohmel (1986) for the computation of the conditional distribution of a permutation test for integer valued scores. Implementation details and generalizations to situations with rational or real scores are given.