Hi,
I am little confuse about the way stata handle and designate interaction variables. To me (and to all textbooks), an interaction variable is X*W. But in stata language, interaction variables are coded X#W but they are not equivalent to X*W in a regression framework.
As an example, I would have expected that:
gives the same results than
But they do not. The coefficients for the interaction term are the same but not the main effect (south). How do you interpret both south coefficients then?
Thanks for your help
I am little confuse about the way stata handle and designate interaction variables. To me (and to all textbooks), an interaction variable is X*W. But in stata language, interaction variables are coded X#W but they are not equivalent to X*W in a regression framework.
As an example, I would have expected that:
Code:
sysuse nlsw88.dta gen south_married=south*married reg wage south south_married
Code:
reg wage i.south i.south#i.married
Thanks for your help
Comment