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
Issue running xtreg commands with scalarI am using Stata version 15.1 and I have 47 variables and 1,010 observations in my dataset. I am doi…
Loop with the command usespss in Stata 16Hi. I have to do the same calculations with some data sets in format .sav. I did this lines but they…
loopHello everybody, I am a beginner in stata programming. However, I am looking for help in programming…
Outputting data in Word with formatting, preferably with longer labels.Hello Listers, I have a client who is taxing my skills when it comes to formatting tables for publi…
Summary statistics for 2 dimensionsHi, I would like to do the following: I have a panel dataset with x groups and y years. For each yea…
Subscribe to:
Post Comments (Atom)
0 Response to Event study - Dropping observations within a leads-lags framework
Post a Comment