Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I would like to compute the Wilcoxon rank-sum test in Stata for two countries of my sample with the dummyvalue 3 and 6.

Can anyone give the right code for Stata?

share|improve this question
1  
The on-line help for ranksum in Stata is pretty straightforward. What do you mean precisely by "dummyvalue 3 and 6": are countries coded in separate columns, or as one column? – chl Feb 25 '12 at 21:32

1 Answer

Something like:
. ranksum y if country==3 | country==6, by(country)
or, slightly more concisely,
. ranksum y if inlist(country,3,6), by(country)
(where y is the outcome variable you wish to test).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.