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
Related Posts with Difference in differences (DID) before and after an event
graph stata HR and tertilesArray Good morning, I'm trying to make a graph as follows after a cox model but I have never used st…
Constrained Nonlinear RegressionHi all, I am trying to estimate the parameter delta using the nl command in Stata 15.1, as follows:…
Histogram with log scale both below and above 0Dear Statalisters. I have been puzzling over what I would have thought would be a simple challenge.…
Working with large Panels (regressions)Hi, I have a large wide panel dataset: t=804 months. N=45464 individuals. In long form, this equals…
why i can't convert from yyyy/mm/dd to timehello i have variable for time like this : Day (variable name) 2011/12/01 2011/12/02 2011/12/03 . .…
Subscribe to:
Post Comments (Atom)
0 Response to Difference in differences (DID) before and after an event
Post a Comment