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, 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 <>
Subject   st: Equivalent of estpost ttest with sampling weights?
Date   Fri, 15 Jun 2012 15:03:40 +0100


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

Is there a better way to do this?

Thanks in advance,
*   For searches and help try:

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