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
title for y axisDear all, I need some help with Y axis title of scatter plots. i am creating a scatter plot by gende…
poisson model and ppml modeldear all I hope to use gravity ppm model but I can't use it with fixed effect because of collineari…
Save correlation results as variableHello, I have several datasets with each 1500 observations and 30,000 variables. For each, I want to…
When operate RIF-QR, does the command 'rifhdreg' contain a Gaussian kernel distribution?Generally, the Gaussian kernel distribution is recommended for RIF quantile regression. When I use …
Stata Date Format from a Fraction YearAfter extinguishing all efforts, I am reaching out to you to perhaps have a bit of Stata help regard…
Subscribe to:
Post Comments (Atom)
0 Response to Event study - Dropping observations within a leads-lags framework
Post a Comment