I am trying to run an event study model, i.e. I want seperate coefficients of a continous treatment for each period relative to the base period when the event takes place.
Unfortunately, I cannot figure out how to make Stata omit the base period when using the factor variable notation.
If you are aware of a post that already clarified the issue, please let me know - I did not find it when searching statalist.
Here is a little example code:
Code:
sysuse xtline1.dta, clear gen drnks = . replace drnks = 10 if person==1 replace drnks = 1 if person==2 replace drnks = 25 if person==3 keep if inrange(day,15520,15530) // Event on 4th of july = 15525 reg calories i.person i.day io15525.day#c.drnks , nocons
I would like to get a seperate coefficient for drnks for each day, that gives me the effect of drnks on calories relative to the event date 15525. In addition I would like to include person and time fixed effects.
Here's the output, where there is a coefficient for 15525, although I thought this level of day should be omitted:
Array
How can I make Stata omit the coefficient for the event date?
Best regards
Boris
0 Response to Factor variable notation: How to omit the base period in event study?
Post a Comment