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

From |
Mandy fu <mandy.fu1@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: comparing the means of two variables(not groups) for survey data |

Date |
Wed, 19 Aug 2009 00:04:54 -0400 |

Hi all, Previous discussion of comparing means in survey data are focus on two groups. I am interested in comparing means of two variables in survey data. For example, in the following data set for students test scores, I'd like to compare the population means of "read" and "write". I was wondering , since the probability weight for each student is constant, if it is fine that I just use t test? If I need to use probability weight, how to do that after the survey mean estimation? I tried --svy:mean-- and then use--lincom--. But since there seems always some errors message. --------------------------------------------- use http://www.ats.ucla.edu/stat/stata/notes/hsb2, clear svyset [pw=socst], strata(ses) *** t test ttest read=write ***svy and lincom svy:mean read matrix B=e(b) svmat B svy:mean write matrix C=e(b) svmat C lincom B C **regressor B1 not found **r(111); ------------------------------------ Thanks for your help! Mandy * * 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/

**Follow-Ups**:**Re: st: comparing the means of two variables(not groups) for survey data***From:*sjsamuels@gmail.com

- Prev by Date:
**st: How to estimate Non Linear Trend of a variable** - Next by Date:
**Re: st: AW: Poisson and negative binomial regression** - Previous by thread:
**st: How to estimate Non Linear Trend of a variable** - Next by thread:
**Re: st: comparing the means of two variables(not groups) for survey data** - Index(es):

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