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
RboundsHi, I have conducted propensity score matching using working hours as my treatment variable and the…
How to jump out a forvalue loop after finding a specific value ?cd "C:\Users\GagaLee\Desktop\ga" local ff : dir . files "*.dta" dis `"`ff'"' mat ga=J(48,2,.) local…
Scatter plotHello, I have a question regarding the scatter plot (Fitted line), Actually, I have 60 countries an…
I have a problem with reshaping my dataHi everyone! I have data that after changing it from Long to Wide looks like this: ID Fullscore1 …
Error with tab2xlHi, I am using tab2xl command in Stata 15 and would want to save the excel file using today's date.…
Subscribe to:
Post Comments (Atom)
0 Response to Difference in differences (DID) before and after an event
Post a Comment