Hi all smart folks!
I am trying to replicate a figure from the code I got from the authors of a paper.
I want to use didregress command in Stata to replicate the table. However, I could not figure it out. Could someone help? Thanks!
The original code is below:
*TABLE 2 -- D-in-D;
sum logrealsales if cc==1 & year<2000
sum logrealsales if cc==1 & year>1999
sum logrealsales if lc==1 & year<2000
sum logrealsales if lc==1 & year>1999
gen did=0
replace did=1 if cc==1 & year>1999
gen tafter=0
replace tafter=1 if year>1999
regress logrealsales cc tafter did
drop tafter did
Here is the table for the results after using the difference in difference.
I am trying to replicate a figure from the code I got from the authors of a paper.
I want to use didregress command in Stata to replicate the table. However, I could not figure it out. Could someone help? Thanks!
The original code is below:
*TABLE 2 -- D-in-D;
sum logrealsales if cc==1 & year<2000
sum logrealsales if cc==1 & year>1999
sum logrealsales if lc==1 & year<2000
sum logrealsales if lc==1 & year>1999
gen did=0
replace did=1 if cc==1 & year>1999
gen tafter=0
replace tafter=1 if year>1999
regress logrealsales cc tafter did
drop tafter did
Here is the table for the results after using the difference in difference.
Comment