Dear Stata experts,
I have some problems understanding the regression outputs with interactions in Stata. I have 4 variables, 1 Dummy and 3 continuous, and want to interact them in a specific way (1 two-way and 1 three-way interaction). I always thought that it is the same to multiply the variables before the regression or to simply use the interaction command (#) in Stata. However, the following commands lead to completely different results:
Like I said, var_1, var_2 and var_3 are continous variables and D is a 0/1-dummy.
Does anyone know why this happens or what my mistake is?
Thank you!
I have some problems understanding the regression outputs with interactions in Stata. I have 4 variables, 1 Dummy and 3 continuous, and want to interact them in a specific way (1 two-way and 1 three-way interaction). I always thought that it is the same to multiply the variables before the regression or to simply use the interaction command (#) in Stata. However, the following commands lead to completely different results:
Code:
1) reg var_1 var_2 c.var_2#D c.var_2#D#c.var_3 2) gen int_1=var_2*D gen int_2=var_2*D*var_3 reg var_1 var_2 int_1 int_2
Does anyone know why this happens or what my mistake is?
Thank you!
Comment