Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Diff-in-Diff with Stata

    Hi!

    I'm working on Stata13/MP from a Mac.

    I am trying to use difference-in-difference with stata. I am testing whether a given policy increased insurance rates in the treatment group. My treatment group is defined by the respondents' age (people aged 25 and above are treated, people above 25 are not). The policy was passed in 2011.

    This is what I did:
    gen interaction = (age <= 25 & year >= 2011)
    xi: reg insured interaction i.age i.year i.sex i.race [pw=pwgtp], robust cluster(household)
    I get a coefficient of 3.82 for the interaction variable.

    Here is my problem. I get a different coefficient (3.92) when I use the following regression, while I think I should get exactly the same result:
    gen treatment = (age <= 25)
    gen post = (year >=2011)
    eststo: xi: reg insured interaction treatment post i.sex i.race [pw=pwgtp], robust cluster(household)
    => Here, I have "treatment" and "post" because I am neither including age fixed effects (age determining whether people are treated) nor year fixed effects (year determining whether you are in the treatment period).
    => I am pretty sure I should be getting the exact same coefficient with this method (and different standard errors) but it is not the case... Does anyone know if it is normal to have some degree of difference?

    Thanks in advance!



  • #2
    Just some more detail:

    When instead I include household fixed effects, the difference between the two estimates becomes smaller: (1) areg insured interaction i.age i.year i.sex i.race [pw=pwgtp], absorb(household) => Coefficient of 3.80
    (2) areg insured interaction treatment post i.sex i.race [pw=pwgtp], absorb(serialno) => Coefficient of 3.82

    So specification (2) gives me exactly the same as "xi: reg insured interaction i.age i.year i.sex i.race [pw=pwgtp], robust cluster(household)" in my previous post. Could anyone give me a hint on what is going on?

    Thanks in advance!

    Comment

    Working...
    X