Announcement

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

  • Trouble with -reghdfe- or -ivreg2-: "center not found - struct ms_vcvorthog contains no such member"

    Hi all,

    I have been working on a project for a few months that involves running some standard 2SLS regressions. I have a high-dimensional fixed effect that I want to control for, so I have been running (in Stata 13):

    reghdfe outcome covar (endog=iv), a(fe)

    This had been working fine for months, but today when I reran my code, I got the following error:

    center not found -- struct ms_vcvorthog contains no such member
    (798 lines skipped)

    (error occurred while loading ivreg2.ado)

    Like I said, this is the same code I was running without problem before, and if I try to run -reghdfe- for a simple regression with auto.dta, I get the same problem. So it doesn't seem to be an issue with the code, but rather it is like the command changed somehow.

    When I looked into the documentation of -ivreg2.ado- it says that the data must be a panel, which mine is not. So while this could explain why it is not working now, it does not explain why it worked previously. Are other people finding -reghdfe- is not working on cross-sectional data?

    If anyone has a suggestion for how I could fix this - or a different command that would allow me to run 2SLS with a high-dimensional fixed effect, I would really appreciate it.

    Josh
    Last edited by Josh Abel; 27 Aug 2015, 11:13.

  • #2
    Josh,

    This is related to a recent update we did for ivreg2 that added (long-overdue) support for centered moments. The Mata library livreg2.mlib that shared by ivreg2 and ranktest was affected, as were these programs. Updating all these to the latest versions from SSC, and exiting and reentering Stata, should solve the problem. (If it doesn't, maybe others can advise on how to convince Stata to forget the old mlib and use the new one?)

    Comment


    • #3
      BTW, you can tell if the mlib updated successfully by doing the following in Mata:

      Code:
      mata: whichlivreg2()
      It should report "livreg2 01.2.01 28july2015".

      Comment


      • #4
        Hi Mark,

        Thanks for the note. Sorry to ask you to be more explicit, but I'm a little new at this technical part of Stata. I am familiar with ado files and using -ssc install- to install them, but not much beyond that when it comes to managing these libraries.

        I did -ssc uninstall ivreg2- and successfully uninstalled ivreg2.ado, but now I cannot reinstall it, becuase livreg2.mlib already exists (?). And if I try uninstalling -livreg2- I'm told that it's not a package.

        I also tried looking into -adoupdate- but none of the packages you mentioned seem to be listed.

        I know I am not understanding something basic, but if you could give a little more guidance, that would help a lot. Thanks!

        Josh

        Comment


        • #5
          Never mind - I resolved it. Simply running the following worked:

          ssc install ivreg2, replace

          Thanks for the help!

          Josh

          Comment

          Working...
          X