[R] Wilcox.test U values

Peter Dalgaard pdalgd at gmail.com
Wed Jul 14 10:25:12 CEST 2010


Worik R wrote:
> I have been examining the Mann-Whitney test closely.  And there are two
> features of the R implementation that puzzles me.  The test statistic is
> reported as "W" and depends on the order of the arguments to the function.
....
> Why calculate U, or W, at all?

Did you read the note on the help page and follow up on the reference
therein?

Those test statistics are all simple linear transformations of the sum
of the ranks in one group or the other, and it is purely a matter of
convention which one to report since they are all equivalent (since the
sum of ranks over both groups is a constant, etc.). However, it is
conventional to report some statistic for the test, and R chooses one of
them.

Textbooks sometimes switch the groups to get the smallest sample size in
the first group, for reasons of table lookup (and, seemingly, because
people are less easily confused than computers...)

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list