[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: problem of stratum with only one PSU

From   Deepankar Basu <>
Subject   st: problem of stratum with only one PSU
Date   Sun, 25 Nov 2007 14:07:08 -0500

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
(, 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.


*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index