Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: ranksum test in Stata 12


From   Gwinyai Masukume <[email protected]>
To   statalist <[email protected]>
Subject   st: ranksum test in Stata 12
Date   Wed, 22 Jan 2014 10:09:16 +0200

Hello Stata list,

I have the variable a_score which can take the values 0, 1, 2 up to 9.
I have two groups and I want to compare if a_score is the same between
the two groups. Since a_score is not normally distributed I have used
a non-parametric test and the p-value shows that a_score is not
significantly different between the two groups if p < 0.05 is
considered significant.

. swilk a_score

                   Shapiro-Wilk W test for normal data

    Variable |    Obs       W           V         z       Prob>z
-------------+--------------------------------------------------
     a_score |   4610    0.99456     13.698     6.850    0.00000

.
. * non-parametric test
. ranksum a_score, by(group)

Two-sample Wilcoxon rank-sum (Mann-Whitney) test

       group |      obs    rank sum    expected
-------------+---------------------------------
     Group 1 |     4504    10338974    10352444
     Group 2 |       92    224932.5      211462
-------------+---------------------------------
    combined |     4596    10563906    10563906

unadjusted variance   1.587e+08
adjustment for ties  -2084329.2
                     ----------
adjusted variance     1.567e+08

Ho: a_score(group==Group 1) = a_score(group==Group 2)
             z =  -1.076
    Prob > |z| =   0.2818

Have I used the correct test?

Kind regards,
Gwinyai
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index