I estimate the following in STATA:
y=a+b_1*x1+b2*x1x2+b3*x2+FE, where x1 is a continuous variable, x2 is an indicator variable and x1x2 is the interaction between x1 and x2 FE is a set of fixed effects as controls.
I fist run the following command in STATA:
reg y c.x1##i.x2 FE.
I also construct the interaction term myself:
gen x1_x2=x1*x2, and run
reg y x1 x1_x2 x2 FE.
I got really different results for the main effects and interactions for these two methods of estimating. Am I missing something here? Thanks a lot!
y=a+b_1*x1+b2*x1x2+b3*x2+FE, where x1 is a continuous variable, x2 is an indicator variable and x1x2 is the interaction between x1 and x2 FE is a set of fixed effects as controls.
I fist run the following command in STATA:
reg y c.x1##i.x2 FE.
I also construct the interaction term myself:
gen x1_x2=x1*x2, and run
reg y x1 x1_x2 x2 FE.
I got really different results for the main effects and interactions for these two methods of estimating. Am I missing something here? Thanks a lot!
Comment