[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Tomas Lind" <tomas.lind@ki.se> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
SV: st: Survey data |

Date |
Mon, 31 Aug 2009 14:30:16 +0200 |

Thanks Stas for your help with my survey data. It works fine. /Tomas -----Ursprungligt meddelande----- Från: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] För Stas Kolenikov Skickat: den 27 augusti 2009 18:56 Till: statalist@hsphsun2.harvard.edu Ämne: Re: st: Survey data Tomas, you would need to -append- these data sets (assuming the variables have the same name), and re-declare the survey design to have the super-strata of the year of data. So if you have psu, samplwt, strata, year on top of your variables, you could use data99 gen year = 1999 * unless it is already there append data07 replace year = 2007 if missing(year) * unless it is already there egen strataXyear = group(year strata) svyset psu [pw=samplwt], strata(strataXyear) svy: mean hearingstatus , over( year agegrp ) lincom whatever you need I am sure there are -table- analogues of that weird -svy: mean- followed by -lincom-, and you probably know them better than I do :). The above analysis assumes you have independent samples in 1999 and 2007. If you don't (e.g. you have longitudinal data), things are more complicated. But since you have different strata, you probably have independent samples. Check with your data collecting agency. On Thu, Aug 27, 2009 at 10:17 AM, Tomas Lind<tomas.lind@ki.se> wrote: > Dear Statalisters > > Comparing surveys from two different years with DIFFERENT pweight´s and > stratum each year. > > Does anyone have a Statasolution to this problem? > > Is there a difference in hearing between 1999 and 2007 (overall and for > specific agegroups)? > > The columns prop1999 and prop2007 show the proportion of people with > impaired hearing. > I have all the individual data behind this aggregated table in my dataset > (id, age, hearingstatus). > Table is constructed from two different datasets with different svyset (two > different analysis). > > Agecat Prop1999 Prop2007 > 18-29 0.09 0.10 > 30-39 0.10 0.11 > 40-49 0.15 0.16 > 50-59 0.23 0.27 > 60-65 0.33 0.35 > > > Tomas > > > * > * 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/ > -- Stas Kolenikov, also found at http://stas.kolenikov.name Small print: I use this email account for mailing lists only. * * 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/ * * 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/

**References**:**st: Survey data***From:*"Tomas Lind" <tomas.lind@ki.se>

**Re: st: Survey data***From:*Stas Kolenikov <skolenik@gmail.com>

- Prev by Date:
**st: RE: Decrease range of y axis** - Next by Date:
**st: AW: Decrease range of y axis** - Previous by thread:
**Re: st: Survey data** - Next by thread:
**st: Time to Event/Survival Analysis Question** - Index(es):

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