Hi.
consider the following simplified OLS baseline regression:
y = ß0 + ß1X1+ß2X2+ß3X3 + e
In a second model, a dummy variable X4 is included which interacts with X1:
y = ß0+ß1X1++ß2X2+ß3X3+ß4X4+ß5(X1*X4) + e
The robustness of the findings of both models should be checked using a 2SLS model with an instrument Z. The potentially endogenous variable is X1.
The command for the baseline model, i.e., without the interaction term is:
I am not sure how to implement the interaction term in the -ivregress- command though. Do I have to build the interaction manually like so?
2sls with interaction:
I read through this thread which gives me the feeling that the ivregress command is correct, neverless my questions would be:
1.) Is there any mistake I made in the ivregress command?
2.) I was wondering if there is a way to directly implement the Interaction term in the ivregress command without the need to create the interaction manually.
Many thanks
consider the following simplified OLS baseline regression:
y = ß0 + ß1X1+ß2X2+ß3X3 + e
In a second model, a dummy variable X4 is included which interacts with X1:
y = ß0+ß1X1++ß2X2+ß3X3+ß4X4+ß5(X1*X4) + e
The robustness of the findings of both models should be checked using a 2SLS model with an instrument Z. The potentially endogenous variable is X1.
The command for the baseline model, i.e., without the interaction term is:
Code:
ivregress 2sls Y X2 X3 (X1 = Z), first vce(robust)
Code:
gen Interaction = X1*X4 gen Interaction_IV = X4*Z
Code:
ivregress 2sls Y X2 X3 (X1 Interaction = Z Interaction_IV), first vce(robust)
1.) Is there any mistake I made in the ivregress command?
2.) I was wondering if there is a way to directly implement the Interaction term in the ivregress command without the need to create the interaction manually.
Many thanks

Comment