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
Using r() with recodeI am trying to recode a variable using the values from the return list but from the error message I …
Problem with predicting survival probabilities from stpm2 model with TVC in external dataI have built a prognostic model using stpm2 which includes a tvc (all covariates in model are center…
Calculation of frequency and ratiosHi Everyone, Bellow in the -dataex- example, I have a zipcode, date (month_year) and name of an ins…
Creating variable out of conditional values in another one (GDELT)Hello everyone. Let me first describe my data and purpose of analysis for the sake of context. I hav…
Obtaining relative excess risk due to interaction (RERI) with weighted dataHi all, I am familiar with using the ic command in STATA to obtain RERI. However, I need to obtain …
Subscribe to:
Post Comments (Atom)
0 Response to Difference in differences (DID) before and after an event
Post a Comment