Statalist


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

st: help creating a table of means and diffs with svy data


From   Sergio I Prada <[email protected]>
To   [email protected]
Subject   st: help creating a table of means and diffs with svy data
Date   Tue, 26 Jan 2010 11:54:52 -0500 (EST)

Hi, I am looking for help in automating a rather tedious task.

I want to have a table comparing the means for some variables for two
subpopulations in my survey data, including a test on the diff btw the
means.

For instance, according to the SVY Manual the right way to get the numbers
is:

use http://www.stata-press.com/data/r11/nhanes2f
svyset psuid [pweight=finalwgt], strata(stratid)
svy: mean height, over(sex)
lincom [height]Male - [height]Female
svy: mean weight, over(sex)
lincom [weight]Male - [weight]Female


The table I'd like to have looks like

                  Male       Female     Diff
                mena/sd   mean/sd

Height      175.58       161.90      13.67***
                 (0.17)       (0.13)
Weight       78.63      65.71        12.92***
                 (0.21)      (0.27)


Thanks in advance for your help

-- 
Sergio


*
*   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/



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