[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 suvey data |

Date |
Tue, 18 Aug 2009 21:49:10 -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 suvey data***From:*"Joao Ricardo F. Lima" <jricardofl@gmail.com>

- Prev by Date:
**RE: st: Stata 11 Random Effects--Std. Errors** - Next by Date:
**st: How to estimate Non Linear Trend of a variable** - Previous by thread:
**st: Stata 11 Random Effects--Std. Errors** - Next by thread:
**Re: st: comparing the means of two variables(not groups) for suvey data** - Index(es):

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