Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • IV estimation (2SLS) with slope dummy variable interacting with endogenous variable.

    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:

    Code:
    reg Y D X Z  i.D#c.W
    I have two instruments for W: T and H. Now, my question is whether I wrote the code properly for 2SLS. My code is:
    Code:
     ivreg2 Y  X Z D  ( i.D#c.W =  i.D#c.T  i.D#c.H )
    Thank you.

    Demet

  • #2
    We usually control for both main effects while including interactions.

    Code:
    reg Y D X Z W c.D#c.W
    ivregress 2sls Y D X Z (W c.D#c.W = T H c.D#c.(T H))

    Comment


    • #3
      Originally posted by Fei Wang View Post
      We usually control for both main effects while including interactions.

      Code:
      reg Y D X Z W c.D#c.W
      ivregress 2sls Y D X Z (W c.D#c.W = T H c.D#c.(T H))
      Thank you for the comment and sorry for my late reply. Indeed, they both gave the same results, with slightly different table outputs.

      Comment

      Working...
      X