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.

Re: st: means compairison with weights and unequal variance

 From "Ariel Linden, DrPH" To Subject Re: st: means compairison with weights and unequal variance Date Wed, 23 Nov 2011 10:46:26 -0500

```I want to acknowledge that Nick's identical recommendation preceded mine in
the thread. I get the daily digest, so I am always a day late. One should
take notice when Nick comments, since his accuracy is about 99% . :-)

As for the question and original response posted, I fail to see the logic in
running -sum- with the weight, and then running ttesti, rather than going
straight to regression with the weight and robust se? Perhaps I am missing
something, but it seems like an unnecessary extra step.

Ariel

Date: Tue, 22 Nov 2011 08:40:22 +0000
From: Nick Cox <njcoxstata@gmail.com>
Subject: Re: st: means compairison with weights and unequal variance

http://stata.com/statalist/archive/2011-11/msg01010.html

Nick

On Tue, Nov 22, 2011 at 8:16 AM, Barbro Widerstedt <appoloniak@gmail.com>
wrote:
> Now I feel a bit stupid -- of course. It is what I do for other
> outcomes, and the strategy should be as valid in this case... I'll
> have a look and see if they give me the same conclusion at p<0.05
>
>
>
> On Mon, Nov 21, 2011 at 7:45 PM, Ariel Linden, DrPH
> <ariel.linden@gmail.com> wrote:
>> Why not simply use -regress- and the weight generated in -cem-
(cem_weights)
>> as the aweight with robust se? This is the approach suggested by the
>> authors. See:
>>
>> Stefano M. Iacus, Gary King, and Giuseppe Porro, "Matching for Causal
>> Inference Without Balance Checking", copy at
>> <http://gking.harvard.edu/files/abs/cem-abs.shtml>
>>
>> Ariel
>>
>>
>>
>> Date: Sun, 20 Nov 2011 21:40:40 -0800
>> From: John Luke Gallup <jlgallup@pdx.edu>
>> Subject: Re: st: means compairison with weights and unequal variance
>>
>> Barbro,
>>
>> A simple alternative is to calculate the means and standard deviations
for
>> each group using -summarize- with weights, and then run -ttesti ...,
>> unequal-:
>>
>> sysuse auto, clear
>>
>> sum mpg if foreign [aw=weight]
>> local N1 = r(N)
>> local av1 = r(mean)
>> local sd1 = r(sd)
>>
>> sum mpg if !foreign [aw=weight]
>> local N2 = r(N)
>> local av2 = r(mean)
>> local sd2 = r(sd)
>>
>> ttesti `N1' `av1' `sd1' `N2' `av2' `sd2', unequal
>>
>> John
>>
>> John Luke Gallup
>> Department of Economics
>> Portland State University
>>

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