7

Under which conditions should we expect the difference-in-difference estimate to be equal to the equivalent panel data model?

Strictly speaking, whenever we have a experiment that offers a well defined treated and control groups in two periods of time, for using difference-in-difference methods, people recommend running OLS of models such as:

Stata:

reg y post treatment postXtreatment

and the coefficient on "postXtreatment" would represent the treatment effect 

At the same time, in case we have panel data for two periods we can run:

xi: xtreg y i.year postXtreatment, fe 

When exactly should we expect equivalence? Does it have anything to do with the panel being balanced?

Just one more question, in case we have more years available is the fixed effect model in the fashion the described above a good way to infer the treatment effect?

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650
user30474
  • 71
  • 1
  • 2
  • 5
    Should be completely identical with two treatment groups and two time periods. – ilprincipe Sep 26 '13 at 15:10
  • The xtreg command is missing the main effect for treatment. Also, Stata can handle creating the interaction term. For example, "reg y post##treatment" would be the Stata way of doing the first model and "xtreg y post##treatment, fe" would be Stata way of doing the second. – dbwilson Jul 23 '20 at 14:08
  • Also, neither of these are accounting for the dependent (clustered) nature of the data given repeated measurement. This is what xtreg or mixed help you do that reg doesn't do. However, you need to specify the cluster variable (person id). – dbwilson Jul 23 '20 at 14:13
  • See http://errickson.net/stats-notes/xtsetvsmixed.html – dbwilson Jul 23 '20 at 14:14

1 Answers1

0

You would expect equivalence when T = 2. If you have more than 2 years, use the latter approach (the one that relies on fixed effects). Please see http://econ.lse.ac.uk/staff/spischke/ec533/did.pdf for more. Note: xi: is redundant in the newer versions of Stata.

user26750
  • 201
  • 1
  • 6