Announcement

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

  • Margins after ivregress 2sls

    Hi everyone,

    I am running an ivregress 2sls and then margins but I get an error.

    This is my code:
    ivregress 2sls lnmarketcap $controls decentralized#c.ceoyearsofexperienceasaceoorcoo c.ceoyearsofexperienceasaceoorcoo (decentralized = own_blockchain consensun_method_simple), vce(robust)

    Then I run:
    qui margins, at(decentralized =(0 1) c.ceoyearsofexperienceasaceoorcoo=(1 2.5 7.55)) atmeans

    But I get the error:
    "decentralized ambiguous abbreviation"

    Basically I have "decentralized" (dichotomous) as endogenous and I am trying to address that, but then I want to run the margins of the interaction and see how they interact in the second stage regression.

    Any suggestion?

    Thank you in advance,

    Cristiano

  • #2
    Originally posted by Cristiano Bellavitis View Post
    ]

    This is my code:
    ivregress 2sls lnmarketcap $controls decentralized#c.ceoyearsofexperienceasaceoorcoo c.ceoyearsofexperienceasaceoorcoo (decentralized = own_blockchain consensun_method_simple), vce(robust)
    Your endogenous variable is part of an interaction among the list of exogenous variables. You probably can bypass the error message by renaming the variable included in the interaction, but there should be some econometric issues with your specification. Also rename your variables "ceoyearsofexperienceasaceoorcoo" and "consensun_method_simple" so they are of reasonable length.

    Comment


    • #3
      Originally posted by Andrew Musau View Post

      Your endogenous variable is part of an interaction among the list of exogenous variables. You probably can bypass the error message by renaming the variable included in the interaction, but there should be some econometric issues with your specification. Also rename your variables "ceoyearsofexperienceasaceoorcoo" and "consensun_method_simple" so they are of reasonable length.
      Thank you, this actually works. But what is the econometric issue? I am trying to "control" for the non-random nature of "decentralized", but then I want to include it as an interaction. What would be the appropriate way to do it?

      Comment


      • #4
        The interaction between the endogenous variable and the exogenous variable will itself be endogenous, so you will have an endogenous variable in the second stage that you have not taken care of. You may try to instrument it as well.

        Code:
        ivregress 2sls lnmarketcap $controls experience  (decentralized decentralized#c.experience = ///
        own_blockchain consens instruments_for_interaction), vce(robust)

        Comment


        • #5
          Thank you Andrew Musau , that makes sense. I appreciate your help on this.

          Comment

          Working...
          X