Hi all, I'm learning about the staggered difference in difference methods with regards to treatment timing and want to estimate a staggered policy's effect on a variable over the years of 1994-2017. The data is in panel form. The variables are:
- country_num is panel id
- year goes from 1994 - 2017
- country is country name
- t_year is year of treatment
- Y is the variable of interest
I want to run the baseline staggered two-way fixed effects model based on the year of treatment without accounting for heterogeneity, but need to know if I need to create the dummy variables for year of treatment or for country. I'll be looking at the bacon decomposition after along with comparing to recent DiD estimators that account for heterogenous timing.
I'm using the xtevent command and displaying it with xteventplot:
I don't have the policy() portion of the command. The treatment timing is staggered from 2002-2022 across different countries. How do I generate a dummy variable that implements the staggered treatment timing of the policy? And is this specification correct? The "t_year" variable is also repeated in every observation so I'm assuming I do something with that.
Code:
country_num year country t_year Y
- year goes from 1994 - 2017
- country is country name
- t_year is year of treatment
- Y is the variable of interest
I want to run the baseline staggered two-way fixed effects model based on the year of treatment without accounting for heterogeneity, but need to know if I need to create the dummy variables for year of treatment or for country. I'll be looking at the bacon decomposition after along with comparing to recent DiD estimators that account for heterogenous timing.
I'm using the xtevent command and displaying it with xteventplot:
Code:
xtevent Y, panelvar(country_num) timevar(year) window(5) policy(i dont have this) cluster(country_num) nofe note impute(stag)