Announcement

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

  • Error with outreg2 in Stata15

    I've always used outreg2 to output my regression results into excel. Using Stata15, the exact code that ran in Stata14 now gets an error:

    melogit binary age female i.time##i.category || id: , pweight(weight)
    outreg2 using "results.xls", dec(2) replace
    equation / not found
    r(303);


    I can confirm that outreg2 works when running OLS regression and output. Is there something that changed with Stata15 for mixed model output?

  • #2
    I have the exact same problem.

    I had run a program on Stata 14.2 that used outreg2 and it worked perfectly. It Stata 15.1, outreg2 worked fine on logit models; however, when switching to melogit, I got the following error message:

    equation / not found
    r(303);

    The help for this error is:
    You referred to a coefficient or stored result corresponding to
    an equation or outcome that cannot be found. For instance, you
    estimated an mlogit model and the outcome variable took on the
    values 1, 3, and 4. You referred to [2]_b[var] when perhaps you
    meant [#2]_b[var] or [3]_b[var].

    If anyone has any ideas on what went wrong specifically, I'd love to know.

    Comment


    • #3
      I note that the user-written outreg2 command installed from SSC has not been updated since 17 August 2014, well before the release of Stata 15.

      If outreg2 worked perfectly on Stata 14.2 with melogit, then the problem likely is a consequence of a change in Stata 15 in the naming conventions for free parameters. If this is the case, then melogit is now naming the free parameters in a way that outreg2 does not expect.

      It is possible that running melogit under version control will cause the results to match the expectations of outreg2. To do this, try
      Code:
      version 14.2: melogit ...
      outreg2 ...
      or perhaps you may need to run both commands under version control.

      You could also seek advice from the author of outreg2 at the email address given in
      Code:
      net describe outreg2, from(http://fmwww.bc.edu/RePEc/bocode/o)
      My apologies to Lauren Bailey - I had noticed the original post earlier, subscribed to it intending to hazard this guess if it didn't get a reply, and never got back to the post.

      Comment


      • #4
        Thank you, William. That ability to version control is not something I had used before. It seems useful here.

        I sent the author of outreg2 a note last week. If someone else wants to contact him, please feel free. I will likely send him another note in a couple of weeks if I don't hear anything back.

        Comment


        • #5
          A quick update: I have not heard back from the author.

          I will try a new email address if I don't hear soon.

          Comment

          Working...
          X