I have a panel dataset with "id", "year" (1970 to 2000), and "post" a dummy which takes a value=1 if year > 1985. The treatment variable ("treatment") is a continuous variable measured in 1985. A control variable ("control") is a continuous variable measured in 1985. To calculate TWFE I used the following code:
res = feols(dep_var ~ treatment*post + control*post | id + year, df)
summary(res)
Assuming I specified the TWFE correctly, to do the event study I do the following:
res = feols(dep_var ~ treatment*post + i(year, treatment, 1985) | id + year + control*post, df)
summary(res)
coefplot(res,ci_level = 0.95)
I am not sure if this is the right way to do the event study. Can someone comment on the syntax of the event study.