Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Maria E. Montez Rath" <maria.rath@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: using several years of survey data |
Date | Tue, 1 Mar 2011 13:22:50 -0800 |
Hello, I'm using 10 years of the National Inpatient Sample (NIS) and have a question on how to define the strata. The NIS is a stratified, single-stage cluster sample of hospitals. Every year, about 20% of US community hospitals are sampled. Sixty strata are defined depending on things like geographical region and teaching status, and from each a random sample of hospitals is taken. For each hospital all discharges are then selected. The data provided includes the strata and weights. I set the data by svyset hospid [pweight=discwt], strata (nis_stratum) When using several years, shouldn't I create a new strata variable that incorporates the year so that the strata is different per year? gen str yearstratum=string(year,"%04.0f") + string( nis_stratum,"%04.0f") svyset hospid [pweight=discwt], strata (yearstratum) I think this is necessary in order to obtain the correct standard errors. Can anyone correct me if I'm wrong or confirm that what I'm doing is right? Thank you, Maria * * 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/