Announcement

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

  • ivreg2 first stage results

    Dear STATA experts,

    I re-downloaded the ivreg2 command and the version I have is 02.2.08.

    I ran the command for the first stage results:

    xi: ivreg2 y endovar x_1 x_2 x_k i.year (endovar=z1_instr) , first savefirst

    where y is outcome variable, endovar is the endogenous variable, x_1 - x_k are controls and z1_instr is the instrument for endovar. i.year is for incorporating year dummies.

    When I try to retrieve my first stage results by:

    esttab _ivreg2_endovar, keep(_cons z1_instr x_1 x_2 x_k) order(_cons z1_instr x_1 x_2 x_k) b(3) se(3) r2 star(* 0.10 ** 0.05 *** 0.01)

    I don't get the estimates. The reasons are following:

    Unable to display first-stage estimates; macro e(first) is missing

    Unable to display summary of first-stage estimates; macro e(first) is missing

    It is the first time I am getting this issue. I have used the command several times in the past and everything went fine. I am not sure what to do. Is it due to some mistake I am making or there is some version issue?

    I will highly appreciate some guidance.

    Thank you.

    Kind regards,
    Mg

  • #2
    Have a look at the the user written command ivregress2 (SSC). Also see the following thread

    https://www.statalist.org/forums/for...eg2-by-outreg2

    Comment


    • #3
      Dear Andrew,
      Thank you very much for the pointer.
      kind regards,
      Mg

      Comment


      • #4
        MG,

        The latest version of ivreg2 is 4.1.10, so you are using a very old version. If you update using the SSC install command, it may fix the problem.

        Comment


        • #5
          Dear Mark,

          Thank you. I installed the latest version, 4.1.10, as you had suggested and ran the following commands:

          xi: ivreg2 y endovar x_1 x_2 x_k i.year (endovar=z1_instr) , first savefirst

          where y is outcome variable, endovar is the endogenous variable, x_1 - x_k are controls and z1_instr is the instrument for endovar. i.year is for incorporating year dummies.

          When I try to retrieve my first stage results by:

          esttab _ivreg2_endovar, keep(_cons z1_instr x_1 x_2 x_k) order(_cons z1_instr x_1 x_2 x_k) b(3) se(3) r2 star(* 0.10 ** 0.05 *** 0.01)

          It keeps saying:

          estimation result _ivreg2_endovar not found

          I also tried saving it before esttab command by running:

          estimates restore _ivreg2_endovar

          but still the response:

          estimation result _ivreg2_endovar not found

          Please let me know what could be done. I had been using this command in the past with no problem at all, I dont why I am having this issue this time. By the way, the second stage results work just fine as before.

          Kind regards,
          Manish

          Comment


          • #6
            Sorted! Works fine now. Thank you again Mark and Andrew!

            Comment


            • #7
              You would do a service to future readers if you could indicate how you sorted it out.

              Comment


              • #8
                Yes Eric, you are right.

                The problem was that there was a mistake in my code -- I had included the endogenous variable in the list of regressors as well as in the IV list, that is why I was not getting the desired results. The mistake was so silly that I was embarrassed and thought of not mentioning at all. But you are right that it is unfair to those who helped me out and also to those who are facing similar circumstances.

                That goes beyond saying that I had a dated version of ivreg2 so I did learn something out of it!

                Comment


                • #9
                  Hi Gupta,

                  Try ivreg2 code as shown below:
                  ivreg2 y x_1 x_2 x_k i.year (endovar=z1_instr) , first

                  For the ivreg2, you cannot put endovar (which is your endogenous variable) in the second-step regression).


                  Comment

                  Working...
                  X