Announcement

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

  • IV methods for models having endogenous interaction terms

    Hi,

    I have a problem with using IV methods for my models having endogenous interaction terms.

    Let's say, Y is dv, Z is exogenous iv, and X is endogenous iv.
    Then, my model is
    Y= b0+b1X+b2Z+b3XZ

    If I have an appropriate instrument variable for X, then how can I use IV methods to get unbiased estimator of b3? And, what would be the Stata codes?

    Now, I am just thinking of predicting Xhat by regressing X on the instrument first and make a new interaction term XhatZ, which is Xhat multiplied by Z.
    Then, regress Y on Xhat, Z, and XhatZ.
    But, I think it has a problem with standard errors. I will greatly appreciate your help.

    Best,

    Eunkwang
    Last edited by Eunkwang Seo; 18 Jan 2016, 00:28.

  • #2
    Eunkwang:
    can't you go -ivregress-?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thanks Carlo,

      If X is exogenous, Z is endogenous, and Z2 is IV for this endogenous variable, then my question is whether my instruments used in ivregress would be just X, Z2, X times Z or X, Z2, X times Z2.
      Last edited by Eunkwang Seo; 29 Jul 2016, 11:03.

      Comment


      • #4
        Eunkwang:
        I would go X, Z2, X times Z2.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Carlo, I appreciate for your comment. If I have more than one instruments (let's say Z2, Z3), then instruments would be X, Z2, Z3, X times Z2 and X times Z3?

          Comment


          • #6
            I am not an expert but I would say that you should use as instrument (X, Z2, X*Z2), you cannot use X*Z as instrument since your Z is endogenous. You can check Wooldridge "econometric analysis of cross section and panel data" chapter 6.

            Comment


            • #7
              Thanks Damian

              Comment


              • #8
                What you want to do is very similar to the forbidden regression, where you replace a nonlinear function of an endogenous explanatory variables with the same function of fitted values from the first-stage. This yields inconsistent estimates expectations are a linear operator.

                Also, IV will always be biased in finite samples. The hope is that, with strong instruments, it will be consistent, and the bias is better than with OLS.

                Here's an example of how to accomplish this correctly. In this data, housing value and its square are endogenous. Family income is the exogenous instrument. Percent Urban is also exogenous, but it is interacted with the endogenous variable in the outcome equation. Obviously, if the instrument is binary, this won't work since z=z^2.

                Code:
                /* IV */
                webuse hsng2, clear
                ivregress 2sls rent c.pcturban (c.hsngval##c.hsngval c.hsngval#c.pcturban = c.faminc##c.faminc c.faminc#c.pcturban), first
                margins, dydx(hsngval)
                Compare that with OLS and the Forbidden IV:

                Code:
                /* OLS */
                reg rent c.pcturban c.hsngval##c.hsngval c.hsngval#c.pcturban
                margins, dydx(hsngval)
                
                /* Forbidden IV */
                regress hsngval c.faminc#c.faminc c.faminc##c.pcturban
                predict hsngvalhat
                regress rent c.pcturban c.hsngvalhat##c.hsngvalhat c.hsngvalhat#c.pcturban
                margins, dydx(hsngval)
                Note how OLS and FIV are very close and the IV AME is half the size.

                Comment


                • #9
                  Try:
                  HTML Code:
                  gen XZ = X*Z
                  gen Z2Z = Z2*Z
                  gen Z3Z = Z3*Z
                  ivreg2 Y Z (X XZ = Z2 Z2Z Z3Z), robust
                  Ho-Chuan (River) Huang
                  Stata 17.0, MP(4)

                  Comment


                  • #10
                    Originally posted by Carlo Lazzaro View Post
                    Eunkwang:
                    I would go X, Z2, X times Z2.
                    Hi, Carlo,

                    My question is on similar lines for the control function approach.

                    Suppose
                    y = f(x1, x1^2, x1z, x2, x^2, x2z)
                    Here x1, x2 are endogenous variables and z is a moderator.

                    If there was just a linear term, then the instrument for x1 is M1 and that for x2 is M2 (based on averages of similar observations except the one under consideration). According to the paper by Haans et al.(2015) https://onlinelibrary.wiley.com/doi/....1002/smj.2399, the instruments for both the linear and quadratic terms of x1 should be M1 and M1^2 and for the linear and quadratic terms of x2 they should be M2 and M2^2.

                    However, I have an interaction term also. So, should there be three instruments for each of the linear, quadratic and interaction terms - M1, M1^2 and M1z & M2, M2^2 and M2z?

                    Also, how can we test for the exogeneity of instruments in a control function approach? I read in the Sharma et al. (2020) [https://onlinelibrary.wiley.com/doi/...002/joom.1067] that they performed modified sargan's test for their control function model. Could you please tell how is it done in STATA?

                    Thanks.

                    Comment

                    Working...
                    X