[R] U value from wilcox.test
Charles C. Berry
cberry at tajo.ucsd.edu
Fri Aug 20 20:51:26 CEST 2010
Issues like that in this thread can often be resolved by reading the
help page for the relevant function.
From:
?wilcox.test
Note
The literature is not unanimous about the definitions of the Wilcoxon
rank sum and Mann-Whitney tests. The two most common definitions
correspond to the sum of the ranks of the first sample with the
minimum value subtracted or not: R subtracts and S-PLUS does not,
giving a value which is larger by m(m+1)/2 for a first sample of size
m. (It seems Wilcoxon's original paper used the unadjusted sum of the
ranks but subsequent tables subtracted the minimum.)
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.
====
HTH,
Chuck
On Fri, 20 Aug 2010, Cedric Laczny wrote:
> Hi Chloe,
>
> first of all, I want to note, that you should be careful using the WMW-test.
> Even though it is often reported to be some sort of a "swiss-army-knife" for
> comparing two distributions, recent research on this test has revelaed that it
> is crucial what hypotheses you consider. Also the assumptions imposed to the
> test are critical. For the assumptions, the test basically is a test on
> identical distributions. For your sample sizes, this is in my opinion quite
> problematic, as you can not really know what the population distributions look
> like. Furthermore, the test has shown to be quite strongly influenced by
> differing variances in the two groups. All this is more or less valid for not
> necessarily small sample sizes, therefore I am not sure how much it might
> affect your results. Therefore, caution should be adressed to the
> interpretation of the results.
>
> On Friday, 20. August 2010 19:41:55 Chloe wrote:
>> Dear all,
>> I want to compare the efficiency of 2 methods in extracting proteins from
>> algal samples. I collected 6 independant algal samples and I extracted 3 by
>> the method 1 and 3 others by the method 2.
>> So I have 2 groups of 3 samples, that are not paired. I would like to know
>> if the results obtained by these 2 methods are significantly different, I
>> hope method 2 to be more efficient than method 1. As I have few data I went
>> for the Mann-whitney test:
>>
>> method1=c(35,40,56)
>> method2=c(90,110,115)
>> wilcox.test(method1,method2,paired=FALSE,alternative="less")
>>
>> Wilcoxon rank sum test
>>
>> data: method1 and method2
>> W = 0, p-value = 0.05
>> alternative hypothesis: true location shift is less than 0
>>
>> As I have a small number of samples, I would prefer to compare the U value
>> of the Mann-Whitney test to critical value for table rather than to rely on
>> the p-value.
>>
>> Is W value correspond to U value ?
>>
>>> From the help I understand that W=U+m*(m+1)/2, is this true ?
>>
>> In the case it is, my U values would be U=W-6=-6!! I thought that a U value
>> could not be neagtive.
>
> Im a little bit puzzled on this one... I would agree with you. I can't really
> help you with this one right now, but doing the calculation of U manually is
> not really hard for your problem. All the values from method 2 are higher than
> the ones from method 1. So the ranking would be:
>
> method1 : 1,2,3
> method2: 4,5,6
> => W(rank sum)_m,n = 1 + 2 + 3 = 6
>
> If I use the definition of U from http://de.wikipedia.org/wiki/Mann-Whitney-U-
> Test
> I would calculate U = 0 , which goes with your formula: U = W - 6 = 6 - 6 = 0,
> what makes sense because the values of X are never greater than the ones of Y.
> (s. link: the formula for U with the two summations )
>
> Thinking of that, the usage of W in R might simply be misleading and it could
> indeed represent U.
>
>>
>> I would be happy to have any information about how to obtain the U value
>> from the Mann-Withney test (wilcox.test()) in order to be able to compare
>> it with table of critical U value commonly found.
>> Thanks a lot for your time and help
>> Have a nice day,
>> Chloé
>
> For your sample sizes you can nicely use the critical value tables that can be
> found easily on the net.
>
> I hope I could help with your problem, if not, please feel free to ask
> further.
>
> Best,
>
> Cedric
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>
Charles C. Berry (858) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/ La Jolla, San Diego 92093-0901
More information about the R-help
mailing list