I have a panel datatset for 15 years and 6721 villages. The years are from 2000 to 2014. I am trying to do a difference in differences analysis to evaluate the impact of my treatment variable (treatment) on the outcome variable (y).
The treatment started in different years for different villages. Some started in 2009, some in 2010 and others in 2011. I have defined my treatment group as those villages that received the treatment in 2009 or 2010. The rest of the villages are control. (I have already tested the parallel trends assumption)
Since there are multiple pre treatment and post treatment time periods, I don't know how to define my post treatment indicator variable.
This is what I have used so far:
Is this specification correct?
Is there an alternative way to do this, that would incorporate the fact that there are multiple time periods? Perhaps by creating a continuous variable for time that takes values from 1 to 15 for the different years, and then taking the interaction?
Also, Is there a way that I can capture the fact that different villages received treatment for different number of years. i.e The ones that were treated in 2009, received treatment for 5 years, but the ones that were treated in 2010 received treatment for 4 years.
I would be grateful for any help!
Kuhu
The treatment started in different years for different villages. Some started in 2009, some in 2010 and others in 2011. I have defined my treatment group as those villages that received the treatment in 2009 or 2010. The rest of the villages are control. (I have already tested the parallel trends assumption)
Since there are multiple pre treatment and post treatment time periods, I don't know how to define my post treatment indicator variable.
This is what I have used so far:
Code:
gen post = 1 if time>=2009 replace post=0 if time<2009 gen postXtreatment = post*treatment reg y post treatment postXtreatment, r
Is there an alternative way to do this, that would incorporate the fact that there are multiple time periods? Perhaps by creating a continuous variable for time that takes values from 1 to 15 for the different years, and then taking the interaction?
Also, Is there a way that I can capture the fact that different villages received treatment for different number of years. i.e The ones that were treated in 2009, received treatment for 5 years, but the ones that were treated in 2010 received treatment for 4 years.
I would be grateful for any help!
Kuhu
Comment