Statalist


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

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


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: help creating a table of means and diffs with svy data
Date   Tue, 26 Jan 2010 18:14:06 +0100

<> 


Have you had a look at -ssc d estout-, in particular -estpost- and -estadd-?
At the top of the respective help files, there is a link to a website with
further comprehensive information.



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Sergio I Prada
Gesendet: Dienstag, 26. Januar 2010 17:55
An: [email protected]
Betreff: st: help creating a table of means and diffs with svy data

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/


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