Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Equivalent of estpost ttest with sampling weights?


From   Rob Fuller <robf.nospam@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Equivalent of estpost ttest with sampling weights?
Date   Fri, 15 Jun 2012 15:03:40 +0100

Hello,

I am using estpost ttest to produce tables of summary statistics,
looking for significant differences between treatment and control
variables (preferably showing t-statistics and p-values). I have a
case where I need to do this with sampling weights, but the ttest
command does not take weights.

I know I can use the following sequence to find the differences, F
stats and p-values:

svyset [pw=weight]
svy : mean var, over(intervention)
test [var]0 = [var]1
lincom [var]0 - [var]1

and I can even save the resulting r() values as scalars using (e.g.)
eststo, add(difference r(estimate)). But I'm having trouble using
those scalars with esttab to generate a results table in a sensible
format.

Is there a better way to do this?

Thanks in advance,
Rob
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index