Skip to content

wilcox.exact function (PR#8856)

2 messages · pat.hodgson at sympatico.ca, Peter Dalgaard

#
Full_Name: Patrick Hodgson
Version: 2.0
OS: solaris 2.9
Submission from: (NULL) (65.94.128.161)


The value reported for the parameter W in the function wilcox.exact appears to
be incorrect.  I have checked the reference in the help file for this function
(Myles & Hollander 1973, as well as 2nd ed. 1999 by same authors) and it is
clear that W is the sum of the ranks of the data set with the smaller number of
members.
Here is sample input/output:
Exact Wilcoxon rank sum test

data:  x and y 
W = 0, p-value = 0.000666
alternative hypothesis: true mu is not equal to 0 

In this case W should be the sum of the ranks of y (coincidentally also the
values of the y data)= 11+12+13+14+15 = 65.
W of zero is ridiculous.

Similarly, in this case W should be 2+4+6+8 = 20, not 10 as reported.
Exact Wilcoxon rank sum test

data:  x and y 
W = 10, p-value = 1
alternative hypothesis: true mu is not equal to 0
#
pat.hodgson at sympatico.ca writes:
You should not use the bug repository to report on a (non-core)
package. However, it is the same W used by wilcox.test and
help(wilcox.test)  has the explanation.