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.
Related Posts with Event study - Dropping observations within a leads-lags framework
Using xtile for a subset of casesI tried to use xtile with the if statement, but received the message, "option if not allowed". Is th…
ZINB on pooled panelHello, I am running a ZINB on a pooled panel using the vce (cluster ID) option, yet I have been adv…
(daily pannel data) i want to create time dummy variable for the weekHello everyone. I can not speak English very well. So I use Google Translator. I have unbalanced dai…
Outreg2 after a loopHi, I am using Stata 15 and I am having trouble getting estimates of a series of regressions with O…
Interaction Terms in 2slsDear Users, This is my first post in Statalist. I am trying to use 2sls with a Dummy Interaction Te…
Subscribe to:
Post Comments (Atom)
0 Response to Event study - Dropping observations within a leads-lags framework
Post a Comment