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

Re: st: Difference in Difference for Proportions

From   Austin Nichols <>
Subject   Re: st: Difference in Difference for Proportions
Date   Thu, 17 Sep 2009 17:26:12 -0400

Doesn't the interaction problem discussed in
also rear its ugly head here?

Probably also have to be careful of SEs--if the total populations are
summed weights from a survey, significance will likely be overstated.

I'd probably go to -svy:tab- first in that case...

sysuse psidextract, clear
keep if t>5
set seed 1
g f=ceil(uniform()*1000)
egen pop=total(f), by(south t)
svyset [pw=f], strata(t)
egen gp=group(t south), lab
svy:tab gp union if t>5, row ci
lincom _b[p42]-_b[p22]-(_b[p32]-_b[p12])
g txsouth=t*south
egen y=total(union*f), by(gp)
bys gp: replace y=. if _n<_N
li y t south pop if y<.
binreg y t south txsouth, n(pop)
binreg union t south txsouth [pw=f]
logit union t south txsouth [pw=f]
findit inteff

On Thu, Sep 17, 2009 at 4:53 PM, Jeph Herrin <> wrote:
> Not sure whether this helps you, but I would normally test this
> with an interaction term in a model. For instance
>  gen txsouth=t*south
>  binreg f t south txsouth, n(pop)
> Then testing the coefficient on -txsouth- is the same as
> testing whether there is a significant difference in differences.
> hth,
> Jeph
> Misha Spisok wrote:
>> Hello, Statalist,
>> In brief, how does one test a difference in difference of proportions?
>>  My question is re-stated briefly at the end with reference to the
>> variables I present.  A formula and/or reference would be appreciated
>> if no command exists.

*   For searches and help try:

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