Announcement

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

  • Difference in differences (DID) before and after an event

    Hi everyone,
    I'm new to stata. I was trying to do a diff-in-diff test for a list of firms before 2005 and after 2005 as there is an even accused which I think changed the firms' performance. the code I found is (diff depvar, t(treatmentgroup) p(postevent)
    the problem I don't have treatment and control groups
    Q1: are all firms before the event are considered control and after the event are treated? if I used it like this the did results are empty. or each firm is compared to itself before and after 2005?
    Q2: is there another code to test for DiD?

    DIFFERENCE-IN-DIFFERENCES ESTIMATION RESULTS
    Number of observations in the DIFF-IN-DIFF: 471279
    Before After
    Control: 166330 0 166330
    Treated: 0 304949 304949
    166330 304949

    Outcome var. depvar S. Err. t P>t

    Before
    Control 0.550
    Treated 0.558
    Diff (T-C) 0.008 0.001 9.28 0.000***
    After
    Control 0.558
    Treated 0.566
    Diff (T-C) 0.008 0.001 9.28 0.000***

    Diff-in-Diff 0.000 . . .

    R-square: 0.36
    * Means and Standard Errors are estimated by linear regression
    **Inference: *** p<0.01; ** p<0.05; * p<0.1

    Thanks for your help

  • #2
    If there is no control group, it is not possible to do a difference-in-differences analysis. Either you must find a suitable control group, or you must use a weaker design that is not as good for identifying causal effects, such as a simple pre-post comparison.

    Specifically, your designation of all firms as controls before the event and treatment after does not overcome this problem and the results you show are not valid.

    Comment

    Working...
    X