Hi Statalist users,
I am conducting an event study where the outcome variable is the total number of sick spells for region i in the year-month t (variable modate). In total I have 84 year-month observations for each of the 50 regions forming a balanced panel. The key explanatory variable is x. To conduct the event study, I have created eight leads and lags (as dummy 1-0 variables) and the "event" dummy. The problem is that I need to run the regression only within the lag 8 - lead 8 period, in other words drop everything after lead 8 and lag 8 (so that I can choose the event variable as the reference one), and I do not know how to do this.
This is the code I have so far:
xtset region modate
xtreg spells event L(1/38).event F(1/38).event i.month i.year, fe cluster(region)
This code gives me the estimates for all the observations, not only those within the ag 8 - lead 8 period.
I am using STATA version 15.
0 Response to Event study - Dropping observations within a leads-lags framework
Post a Comment