@@ -39,7 +39,9 @@ wilcox.test(x, \dots)
39
39
\item {exact }{a logical indicating whether an exact p - value
40
40
should be computed. }
41
41
\item {correct }{a logical indicating whether to apply continuity
42
- correction in the normal approximation for the p - value. }
42
+ correction in the normal approximation for the p - value , or an
43
+ integer \eqn {k } between 0 and 3 giving the number of correction
44
+ terms to use from the Edgeworth series for the normal approximation. }
43
45
\item {conf.int }{a logical indicating whether a confidence interval
44
46
should be computed. }
45
47
\item {conf.level }{confidence level of the interval. }
@@ -85,8 +87,19 @@ wilcox.test(x, \dots)
85
87
of \code {y }).
86
88
87
89
By default (if \code {exact } is not specified ), an exact p - value
88
- is computed if the samples contain less than 50 finite values and
89
- there are no ties. Otherwise , a normal approximation is used.
90
+ is computed if the samples contain less than 50 finite values.
91
+ Otherwise , a normal approximation is used. If there are ties , exact
92
+ inference is performed using the conditional / permutation distribution
93
+ given the observed ranks , using an implementation of the
94
+ Streitberg - R öhmel shift algorithm
95
+ \bibcitep {R : Streitberg + Roehmel : 1986 , R : Streitberg + Roehmel : 1987 }
96
+ contributed by \I {Torsten Hothorn }.
97
+
98
+ If the normal approximation is used and there are no ties , improved
99
+ asymptotic p - values can be obtained via including up to \eqn {k = 3 }
100
+ correction terms of the Edgeworth series for the normal approximation ,
101
+ as given in \bibcitet {R : Fellingham + Stoker : 1964 } for the signed rank
102
+ test and in \bibcitet {R : Fix + Hodges_Jr_ : 1955 } for the rank sum test.
90
103
91
104
For stability reasons , it may be advisable to use rounded data or to set
92
105
\code {digits.rank = 7 }, say , such that determination of ties does not
@@ -219,8 +232,8 @@ wilcox.test(Ozone ~ Month, data = airquality,
219
232
subset = Month \%in \% c(5 , 8 ))
220
233
221
234
# # accuracy in ties determination via 'digits.rank':
222
- wilcox.test( 4 : 2 , 3 : 1 , paired = TRUE ) # Warning: cannot compute exact p-value with ties
223
- wilcox.test((4 : 2 )/ 10 , (3 : 1 )/ 10 , paired = TRUE ) # no ties => *no* warning
235
+ wilcox.test( 4 : 2 , 3 : 1 , paired = TRUE )
236
+ wilcox.test((4 : 2 )/ 10 , (3 : 1 )/ 10 , paired = TRUE )
224
237
wilcox.test((4 : 2 )/ 10 , (3 : 1 )/ 10 , paired = TRUE , digits.rank = 9 ) # same ties as (4:2, 3:1)
225
238
}
226
239
\keyword {htest }
0 commit comments