Hi, I know that I can perform a Mann-Whitney U test with wilcox.test(x,y) But instead of an U-value I get a W-Value. Is it possible to change this?
Martin, If I am not wrong the difference is that if you has two levels you get U-test, and W-test for more than two levels. But the test is almost the same. cheers milton On Sat, Jul 11, 2009 at 2:13 PM, Martin Batholdy <batholdy@googlemail.com>wrote:> Hi, > > I know that I can perform a Mann-Whitney U test with wilcox.test(x,y) > > But instead of an U-value I get a W-Value. > > Is it possible to change this? > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
On 11-Jul-09 18:13:29, Martin Batholdy wrote:> Hi, > I know that I can perform a Mann-Whitney U test with wilcox.test(x,y) > But instead of an U-value I get a W-Value. > Is it possible to change this?The usual definition of the Man-Whitney U test for two samples x of size m) and y (of size n) is that U = number of pairs (x[i],y[j]) such that X[i] < Y[j] For R's wilcox.text(X,Y), '?wilcox.test' says: R's value can also be computed as the number of all pairs '(x[i], y[j])' for which 'y[j]' is not greater than 'x[i]', the most common definition of the Mann-Whitney test. In other words, it is the complement of the definition of U above. Hence the standard U statistic can be obtained from R's W as U = m*n/2 - W since m*n/2 is the total number of possible pairs. (In my view, R is being a bit idiosyncratic there). Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 11-Jul-09 Time: 20:04:40 ------------------------------ XFMail ------------------------------