I am currently using a difference-in-differences model to study the impact of an event on 367 stocks.
I use treat to distinguish the treatment group from the control group.
Set time dummy variable:
I then used the following code to run the did model, controlling for time fixed effects. Normally, the time dummy variable should be absorbed by the time fixed effect, but why does my after variable coefficient still have a value?
y | Coefficient std. err. t P>|t| [95% conf. interval]
-------------- +----------------------------------------------------------------
1.after | -32.94548 6.969544 -4.73 0.000 -46.65085 -19.2401
1.treated | 0 (omitted)
|
after#treated |
1 1 | -8.712043 4.413733 -1.97 0.049 -17.3915 -.0325843
I hope anyone can give me some advice, I will be very grateful.
I use treat to distinguish the treatment group from the control group.
Set time dummy variable:
Code:
gen after = (date >= td(01feb2021))
Code:
encode ticker_f, generate(ticker_f2) encode created_day, generate(created_day2) xtset ticker_f2 created_day2 xtreg y i.after##i.treated i.created_day2, fe vce(robust)
-------------- +----------------------------------------------------------------
1.after | -32.94548 6.969544 -4.73 0.000 -46.65085 -19.2401
1.treated | 0 (omitted)
|
after#treated |
1 1 | -8.712043 4.413733 -1.97 0.049 -17.3915 -.0325843
I hope anyone can give me some advice, I will be very grateful.
Comment