Hi, I want to estimate a regression with a dummy variable, say D. My dependent variable is Y. My exogeneous indenpendent variables are X, Z and my dummy D. I have an endogenous variable W. My dummy variable is both intercept and slope dummy which means I have to multiply D with W (my endogenous variable.). My data is time series. Without endogeneity problem the code would be:
I have two instruments for W: T and H. Now, my question is whether I wrote the code properly for 2SLS. My code is:
Thank you.
Demet
Code:
reg Y D X Z i.D#c.W
Code:
ivreg2 Y X Z D ( i.D#c.W = i.D#c.T i.D#c.H )
Demet
Comment