Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: wilcoxons rank sum in data set with three groups


From   Lars Folkestad <lfolkestad@health.sdu.dk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: wilcoxons rank sum in data set with three groups
Date   Tue, 27 Mar 2012 20:30:55 +0200

Dear List

I have a data set of 10 variables, continuous and 1 grouping variable.
The grouping variable groups the data into three groups. I want to:

1. Test if there is a difference between group 1 and 2
2. Test if there is a difference between group 1 and 3
3. Its not necessary or interesting for me if there is a difference
between group 2 and 3.

I've done the following

. preserve
. drop if group == 3
. ranksum var1, by(group)
. restore

Is there a smarter way to do this?

lars


*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index