Dear statalists,
I use -ranksum- in the stata to do the Wilcoxon rank-sum test, which is also known as the Mann-Whitney two-sample statistic.
My typing is as followings,
webuse fuel2,clear
ranksum mpg, by(treat) // the z statistic equals -1.279
replace treat=treat==0
ranksum mpg, by(treat) // the z statistic equals 1.279
My doubt is why the sign of z statistic is opposite. As far as I know, in the computation of z statistic the result should be the same no matter which group is compared with which group.
Any help will be appreciated!
Best regards,
Rose.
*
* 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/