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
Reshape data from time intervals to panel dataDear Statalisters, I have a dataset which records the change of a variable X over time for differen…
Appending data sets with the same variable names that have different content failsDear Statas, I have 7 datasets of the same study with the same variable names but differing content…
Cofusion between pooled Tobit and xttobitHi Everyone! I'm using Stata/SE 15.1 I have an unbalanced panel data I wanted to compare coeffici…
STATA commands for Factor analysis with robust covariance matrixHi Statalist members Does anyone know what STATA commands/ set of commands can be used to run a fac…
Explaining Experimental data with EUT or PT: Using Structural Equation modeling or Fixed Mixture model?Dear All, I will try to be as clear as possible. Some background: I am doing experiments in economi…
Subscribe to:
Post Comments (Atom)
0 Response to Two way fixed effects and interaction terms
Post a Comment