I'm doing a diff-in-diff with multiple years in the pre-and post periods, and where membership in the treatment group varies over time. I have an dummy variable indicating whether a municipality is in the treatment group for each year. What I want to do is fix the list of all municipalities that were in the treatment group during the pre-period, so that I have a fixed treatment group during the treatment period itself.
Specifically, I have an indicator variable `treatment` that equals 1 if a municipality is in the treatment group for each of the years 2010-2013. I want to add to `treatment` the following indicator function for the each of the years 2014 and 2015:
In matlab I could just define treatment(2014:2015) = fixed_treatment, but I don't know how to do that in Stata.
Specifically, I have an indicator variable `treatment` that equals 1 if a municipality is in the treatment group for each of the years 2010-2013. I want to add to `treatment` the following indicator function for the each of the years 2014 and 2015:
Code:
fixed_treatment = 1{treatment(2010)==1 or treatment(2011)==1 or treatment(2012)==1 or treatment(2013)==1}
Comment