Announcement

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

  • Quadratic Terms and Instrumental Variables

    Here's the issue. I have a model with a predictor that has been well-established to be endogenous. I have a series of instruments that I'm using to gradually strip away that endogeneity. There is reason to believe that the coefficient on the endogenous predictor (and by extension, the IV) might have a quadratic form.

    But I'm not sure how to implement the quadratic form of the IV along with the linear form in the same model. That is, the model would have two endogenous predictors and two instruments. Is that possible? I've read some posts discussing this topic, as well as the MHE blog post saying not to do it. If this really is not recommended, what would be an alternative? Just running the quadratic term?

    Thanks!


  • #2
    As far as I know you can use the instrument and its squared term .
    May be if you use for the endogenous var. and its squared term the following syntax: c.var##c.var (assuming your variable is continuous) you can use only the instrument in it's original form.
    I would be happy if someone else could also comment.

    Comment


    • #3
      You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, Stata output, and sample data using dataex.

      As I understand the problem, you probably want to include both the linear and squared term in the instrument equation: ivregress y x1 (x2 x2square=z1 z2)
      I think you have to generate the square before the ivreg - factor notation is wonderful but I don't think it works here.

      Phil

      Comment


      • #4
        If your independent variables include x (which is endogenous) and x-squared, and you have an instrument z for x, then you still need another instrument. This instrument is provided by z-squared.

        Comment


        • #5
          Originally posted by Phil Bromiley View Post
          You'll increase your chances of a useful answer by following the FAQ on asking questions - provide Stata code in code delimiters, Stata output, and sample data using dataex.

          As I understand the problem, you probably want to include both the linear and squared term in the instrument equation: ivregress y x1 (x2 x2square=z1 z2)
          I think you have to generate the square before the ivreg - factor notation is wonderful but I don't think it works here.

          Phil
          Apologies.

          Here's the code I'm going to try. X is endogenous, Z is the instrument. Does this do what I think it does? That is, it instruments for X with Z and for X2 with Z2. (Note: I'm using panel data that has already been xtset.

          Code:
          xtivreg y x x2 (x x2=z z2), fe
          I have a follow-up question as well actually. Is there some approach using the -margins- command to identify the maximum or minimum of the quadratic curve?

          Comment


          • #6
            Members following a thread titled "quadratic terms and instrumental variables" are not necessarily those member most knowledgeable about the margins command. If you don't get an answer to your follow-up question here, you should start a new topic, following Phil's advice to review the Statalist FAQ linked to from the top of the page, especially sections 9-12 on how to best pose your question. The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

            Comment


            • #7
              you don't have to use the -margins- command, if you results are say, y=a+b1X+b2X2 then the max/min is simply: b2/-(2*b1)

              Comment


              • #8
                Ah, right. That makes sense. Thank you!

                Comment


                • #9
                  You may also be interested in how y varies with x. A "stupid" example follows. The dataset can be found at https://ideas.repec.org/p/boc/bocins/mroz.html
                  Code:
                  use mroz.dta
                  ivregress 2sls lwage (c.exper##c.exper = c.age##c.age)
                  margins, at(exper=(2(5)40))
                  marginsplot

                  Comment

                  Working...
                  X