I am working with Stata 8. While testing for the equality of means with
survey data using:
.svymean alive, by(sxch)
I run up against the very common problem of several strata with
singleton PSUs. As suggested in the Stata FAQ
(http://www.stata.com/support/faqs/stat/stratum.html), I can deal with
this problem by:
.svydes alive
(to identify the strata with singleton PSUs; for example let us say that
strata 10 has a single PSU)
. list strata psu if strata==10
(to identify the corresponding observations; say the observations are
110 to 154)
. drop in 110/154
I am working with data from several countries (about 70) and I want to
avoid doing this manually for all the countries; doing this manually
would take me several days. Can somebody suggest how to write a do file
that reads the dataset for each country and:
(a) identifies all the strata with singleton PSUs;
(b) identifies the corresponding observations (for the above strata) and
drops those observations.
Deepankar
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/