The P-value given by -ranksum- is in fact 2-sided. That is why it is given as
Prob> |z| = 0.7003
where z is the asymptotically standard Normal test statistic and |z| is its modulus (or absolute value). Most people prefer a 2-valued P-value, and a lot of people are confused by the multiple P-values given by -ttest-.
If you want to calculate confidence intervals (as well as P-values) for rank statistics, then you might use the -somersd- package, which you can download from SSC, and which calculates confidence intervals for a range of rank statistics, such as Kendall's tau-a, Somers' D, and median slopes, differences and ratios. A few documents, papers and presentations on the -somersd- package can be downloaded from my website. (See my signature below.)
I hope this helps.
Best wishes
Roger
Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Andres Gonzalez Rangel
Sent: 02 October 2008 15:13
To: [email protected]
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
unadjusted variance 15548.00
adjustment for ties -1.98
----------
adjusted variance 15546.02
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
Thanks in advance for your kind help.
Best Regards,
Andr�s Gonz�lez Rangel
Epidemiology Graduate Student
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/
*
* 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/