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

From |
Deepankar Basu <basu.15@osu.edu> |

To |
statalist@hsphsun2.harvard.edu |

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

**Follow-Ups**:**Re: st: problem of stratum with only one PSU***From:*"Austin Nichols" <austinnichols@gmail.com>

- Prev by Date:
**st: Updated Venndiag.ado for Stata8-10** - Next by Date:
**Re: st: problem of stratum with only one PSU** - Previous by thread:
**st: Updated Venndiag.ado for Stata8-10** - Next by thread:
**Re: st: problem of stratum with only one PSU** - Index(es):

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