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

From |
"Sayer, Bryan" <BSayer@s-3.com> |

To |
"'AMIDON, CARRIE '" <camidon@ersgroup.com>, "'statalist@hsphsun2.harvard.edu '" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: RE: repeating the same analysis for each stratum |

Date |
Tue, 29 Jul 2003 13:06:16 -0400 |

Actually, this is one of the types of cases where sub-setting the data is ok, provided that the term "stratum" means literally the sampling stratum. The reason is that the calculations are stratum specific, so if you subset to all observations for a stratum or collection of strata, then it still works ok. Bryan Sayer Statistician, SSS Inc. -----Original Message----- From: AMIDON, CARRIE To: statalist@hsphsun2.harvard.edu Sent: 7/29/03 8:39 AM Subject: st: RE: RE: repeating the same analysis for each stratum That would potentially cause a problem with your standard errors since you are trying to examine a subset. Read the portion of the svy commands in the manual that deals with subsets of samples in analysis. C. Amidon -----Original Message----- From: Ngo,PT (pgr) [mailto:P.T.Ngo@lse.ac.uk] Sent: Tuesday, July 29, 2003 7:38 AM To: statalist@hsphsun2.harvard.edu Subject: st: RE: repeating the same analysis for each stratum Hello Phung, Would this work ? keep only the data for each stratum, and call your do file. svyset, clear allows to clear the survey variable which I suppose you have specified in your main analysis.do file. forvalues k = 1 (1) 26 { drop if strata~=`k' svyset, clear do analysis.do } Thi Minh Ngo -----Original Message----- From: Phung Lang [mailto:plang@ifspm.unizh.ch] Sent: 29 July 2003 12:44 To: statalist@hsphsun2.harvard.edu Subject: st: repeating the same analysis for each stratum Dear Statalist I have a database for a complex survey with 26 strata and 100 PSUs. I have done the analysis using the svy components for the entire database, and now would like to repeat the same analysis for each of the 26 strata. The planned analysis is already a do.file. I have not been able to figure out how run this do.file for each stratum efficiently as I am not a programmer. I have tried "by", but it does not work with the svymean or do command. Can someone give me some advice? I am using stata 7.0. Gratefully yours, Phung * * 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/ * * 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/ * * 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/ * * 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/

- Prev by Date:
**st: xtivreg instruments** - Next by Date:
**st: Question about cummulative summatories** - Previous by thread:
**st: RE: RE: RE: repeating the same analysis for each stratum** - Next by thread:
**st: RE: RE: RE: repeating the same analysis for each stratum** - Index(es):

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