Hello Stataforum,
I'm working on a generalized difference difference model with multiple groups and multiple treatment dates:
ln_sales = alpai + lambdat + d*treatmentit
Coded in stata as:
xtreg ln_sales i.week i.store treatment
The variable treatment is an interaction term takes the value 0 if a treatment has happened for store in week t.
I want to see if the treatment effect on sales that happens at night/ the weekends is different from the effect on sales during at daytime an the weekdays.
I have split the sample in two groups, one for daytime and one for nighttime, and run the regression on the two samples.
I want to test wether the effects differ by including the dummy night inn my original dataset and code something like this:
reg ln_sales i.week i.store night treatment treatment#night
And then run the test command:
test treatment = treatment#night
However, as I figured, night must interact with all the variables in my model if I want to obtain the same coefficients using interaction terms as when I ran separate models. The results obtained by running separate regressions make sense in theory, and the results obtained by including the dummy night do do not make much sense. As much as I wish my initial approach is the best one, it feels odd to interact time and individual fixed effects with the dummy variable.
My question is wether it is wrong to run a regression like this:
reg ln_treatment i.week i.store i.week#night i.week#night treatment night treatment#night
It certainly feels like I'm "cheating" in order to obtain the results I want. However, I have never seen an interaction term included in a model with two way fixed effects. Can someone help me understand wether and why it is ok or not to do this?
Related Posts with Two way fixed effects and interaction terms
Marginal effect and confidence interval of the model with an interaction termDear all, I am reading a paper that analyses a panel data model with an interaction term. I wonder …
Why does my logistic regression model fail the Homer and Lemeshow's test?Hello everyone, I apologize in advance if my questions seem incredibly dull. Trying to teach myself …
Accounting Research suggestions!Sorry this might be a little bit long post and not related to the forum at all. I do not know. I am …
"Convergence not achieved" - xtlogitHi all, I have a problem when performing an xtlogit regression (I've gone through a couple of threa…
Exporting results of tabulate to excelHi Statalist, Please consider the following data: Code: * Example generated by -dataex-. To instal…
Subscribe to:
Post Comments (Atom)
0 Response to Two way fixed effects and interaction terms
Post a Comment