Announcement

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

  • Parentheses unbalanced - ivregress with interaction instrumented term

    Hello all,

    I am trying to estimate the following equation where the variable S is instrumented by Z :
    Log(y) on t t*S and a constant, where S is a binary variable potentially endogenous and that is why it is instrumented by Z.

    To proceed, I would like to run a 2SLS by estimating first S_hat through a first stage : S on Z
    And then replace S by S_hat, thus running this 2nd stage regression :
    Log(y) on t t*S_hat and a constant.

    To do so, I am trying to use the "ivregress 2sls" command :
    ivregress 2sls y t c.t#(c.S=c.E), vce(robust)

    Yet, I am getting the following error "parentheses unbalanced r(132);".
    I looked at the documentation but could not manage to fix the problem.

    Anyone can help ?
    Thanks in advance !

    Matthieu

  • #2
    Welcome to Statalist, Matthieu.

    My reading of help ivregress does not suggest that your factor variable interaction notation is permitted in the way you have used it.
    Code:
    Syntax
    
            ivregress estimator depvar [varlist1] (varlist2 = varlist_iv) [if] [in] [weight] [, options]
    
        varlist1 is the list of exogenous variables.
    
        varlist2 is the list of endogenous variables.
    
        varlist_iv is the list of exogenous variables used with varlist1 as instruments for varlist2.
    It does not appear to support an interaction (#) connecting an exogenous variable and the parenthesized list defining the first stage models for the endogenous variables.

    Thus, the misleading syntax error you receive is a result of your syntax being far enough from what the designers of ivregress expected to receive that the program did not handle it correctly - I'm guessing that when the command parsing reached the equal sign the program became totally confused.

    Perhaps with this syntatical question out of the way someone more knowledgeable than I will address the more interesting methodological question of how to run two-stage least squares when an endogenous variable interacts with an exogenous variable.

    Comment


    • #3
      Hello William,

      Thank you for your answer which helps a lot to clarify the problem. You are right, my syntax is too far away from the ivregress proper syntax. The question is thus: how to perform a 2SLS when an endogenous variable -that has to be instrumented- interacts with an exogenous variable? Maybe I should proceed "by hand" running both regression successively but I know the standard errors that I will get doing so will be false and I need to infer on the results I will get from this 2SLS regression. I am also more interested in finding a "direct" and neat way of doing it since I am sure it must exist.

      Anyone has any clue ?

      Comment


      • #4
        You can create the interaction manually using generate and then include it in the variables to be instrumented.

        Comment


        • #5
          Hello Phil,

          Thank you for the suggestion. However, I don't want to instrument the interaction itself, but only the right-hand side of the interaction. To be clear, in the following regression, log(y) on t t*S and a constant, I would like to instrument S on Z and not the whole interaction t*S on Z.

          Comment


          • #6
            The following discussion seems to support Phil's general recommendation that you instrument the interaction.

            http://www.stata.com/statalist/archi.../msg01165.html

            It references a text by Jeff Wooldridge; perhaps he and other methodologists have overlooked this discussion since the title suggests syntax problems rather than methodological issues.

            A search of the Statalist archives, or more generally a Google search of the web, for
            interact endogenous and exogenous variable
            finds much more on this topic.

            Comment

            Working...
            X