I have an outcome which I measure between two dates for three different cohorts. The treatment whose effect I want to measure is COVID-19.
My control group is observed in 2016 (t=0) and 2019 (t=1), my first treatment group is observed in 2017 (t=0) and 2020 (t=1), and my second control group in 2018 (t=0) and 2021 (t=1).
Group | t=0 | t=1 |
Control | 2016 | 2019 |
Treated 1 | 2017 | 2020 |
Treated 2 | 2018 | 2021 |
I tried to apply a triple difference regression using the following code, but I seem to be specifying something wrong...
Code:
clear set obs 9999 egen id = seq(), from(1) to(9999) block(1) gen outcome = 1 + rnormal() generate year=2016 if id<=3333 replace year=2017 if id>3333 & id <=6666 replace year=2018 if id>6666 & id <=9999 generate t=0 save samplet0, replace replace year=2019 if id<=3333 replace year=2020 if id>3333 & id <=6666 replace year=2021 if id>6666 & id <=9999 replace t=1 append using samplet0 generate treated1=0 replace treated1=1 if year==2020 generate treated2=0 replace treated2=1 if year==2021 reg outcome t##treated1##treated2
0 Response to Specification of triple difference-in-differences with 2 treatment groups and 1 control group
Post a Comment