OptionalalternativeAlternative hypothesis: "two.sided", "less" or "greater". Default "two.sided".
Unambiguous abbreviations such as "two", "l" and "g" are accepted, as in R.
OptionalconfCompute a confidence interval and the Hodges-Lehmann estimate. Default false.
OptionalconfConfidence level of the interval. Default 0.95.
OptionalcorrectContinuity correction of the normal approximation. Default true. As in R 4.6, also 0 (the same as true) or
1, 2, 3: the continuity correction plus that many Edgeworth terms in the p-value (only without ties and zero
differences; with them, the continuity correction only). The interval and estimate use the continuity correction
alone. Any other number throws.
OptionalexactCompute an exact p-value (and interval). Default null: exact when the sample size is below 50 (both samples,
for two samples; zero differences count). With ties or zero differences the exact test is the conditional
(permutation) test given the mid-ranks, as in R 4.6; the signed rank test then ranks the zeros with the other
differences and leaves them out of the permutation distribution (Pratt).
The conditional distribution is built once for the p-value and again for each multiset of scores that the
interval's search meets. Where that would take more than about 8 seconds, a RangeError suggesting exact: false
is thrown before the computation. Measured on a Mac mini (Apple M1, Node 24) with data rounded to one or two
decimals: the p-value up to about n = 2400 (one sample) and m = n = 320 (two samples); the interval up to about
n = 150 to 300 (one sample; 4 s at n = 150 with 3 decimals, 4.6 s at n = 300 with 1) and m = n = 80 (two samples;
49 x 49 takes 3 s). Ties in few places (or none) cost less.
OptionalmuLocation under the null hypothesis (location shift for two samples). Default 0.
OptionalpairedPaired test (signed rank test on x - y). Requires y. Default false.
OptionaltolTolerance of the root search for the interval and estimate in the normal approximation (R's tol.root). Default 1e-4.
Options for wilcoxTest.