st: RE: Two-sided P value for Wilcoxon (Mann-Whitney) rank-sum test

 From Garry Anderson To statalist@hsphsun2.harvard.edu Subject st: RE: Two-sided P value for Wilcoxon (Mann-Whitney) rank-sum test Date Fri, 03 Oct 2008 00:39:17 +1000

```Hi Andres,
The z=0.385 and p=0.700 suggests that this is a two-sided test. A z value of 0.385 has an area of 0.350 in the upper tail of the normal distribution, therefore an area of 0.700 for a two-sided test.

Cheers, Garry

________________________________

From: owner-statalist@hsphsun2.harvard.edu on behalf of Andres Gonzalez Rangel
Sent: Fri 03/10/08 00:13
To: statalist@hsphsun2.harvard.edu
Subject: st: Two-sided P value for Wilcoxon (Mann-Whitney) rank-sum test

Dear Sirs,

It is possible to make a two-sided test in a non-parametric command like ranksum?  I know that signtest can, but it needs the format "signtest var1 = var2", and I need something like "signtest var, by(group)" which is only allowed with ranksum.

The problem is that, contrary to ttest which returns one-sided and two-sided tests of significance for alternative hypothesis, ranksum returns only one P value, which I suppose is a one-sided test of significance for the Ho.

. ranksum var, by(group)
Two-sample Wilcoxon rank-sum (Mann-Whitney) test
group  |      obs    rank sum    expected
-------------+---------------------------------
no |       39        1842        1794
yes |       52        2344        2392
-------------+---------------------------------
combined |       91        4186        4186
----------
Ho: tnfap(group==no) = tnfap(group==yes)
z =   0.385
Prob> |z| =   0.7003

I need the Pr of Ho against Ha: diff != 0, like ttest does

Best Regards,

Andrés González Rangel
Colombia
_________________________________________________________________
See how Windows Mobile brings your life together-at home, work, or on the go.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

```

<<winmail.dat>>