Announcement

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

  • Xtabond2

    Hi,

    I have panel of 200 panels for abour 5 year daily data. The total number is observations are abour 2 hundred thousand.
    I want to run a recursive panel dynamic model, so i tried xtabond
    but it is showing the following error:

    . xtabond2 dep_var ind_var1 ind_var2 l(1/2).dep_var, gmm(dep_var, lag(3 4)) robust twostep
    Favoring speed over space. To switch, type or click on mata: mata set matafavor space, perm.
    J(): 3900 unable to allocate real <tmp>[9632321,50431]
    _Explode(): - function returned error
    _ParseInsts(): - function returned error
    xtabond2_mata(): - function returned error
    <istmt>: - function returned error
    r(3900);

    What should I do? Stata says: Mata is out of memory; the operating system refused to supply
    what Mata requested. There is no Mata or Stata setting that
    affects this, and so nothing in Mata or Stata to reset in order
    to get more memory. You must take up the problem with your
    operating system.

    But when i try to set the memory it says it sets automatically.
    Do I have to use some other software?

    Thanks!

  • #2
    Have you tried the suggested
    Code:
    mata set matafavor space
    ?

    Comment


    • #3
      Your time series dimension is essentially huge given 5 years of annual data. The GMM estimators implemented in xtabond2 are designed for short-T panels. The option gmm(dep_var, lag(3 4)) will generate a large number of instruments that increases (in your case) linearly with T. The least thing you should do is specifying the collapse suboption. However, with such a large time dimension, such a GMM procedure is not necessary at all. In your simple case, you can just ran a plain-vanilla fixed-effects regression with xtreg. If you need to instrument some variables, you can use xtivreg. There is no need for an instrumentation of the lagged dependent variable because the bias in such dynamic panel models vanishes with increasing T. In your case it is essentially non-existent.
      https://www.kripfganz.de/stata/

      Comment


      • #4
        Thanks a lot both. It helps a lot.

        Comment


        • #5
          Originally posted by Sebastian Kripfganz View Post
          Your time series dimension is essentially huge given 5 years of annual data. The GMM estimators implemented in xtabond2 are designed for short-T panels. The option gmm(dep_var, lag(3 4)) will generate a large number of instruments that increases (in your case) linearly with T. The least thing you should do is specifying the collapse suboption. However, with such a large time dimension, such a GMM procedure is not necessary at all. In your simple case, you can just ran a plain-vanilla fixed-effects regression with xtreg. If you need to instrument some variables, you can use xtivreg. There is no need for an instrumentation of the lagged dependent variable because the bias in such dynamic panel models vanishes with increasing T. In your case it is essentially non-existent.
          I'm reviving this topic because I encountered the same error. I also have panel data with time periods exceeding 100 observations. I was wondering if there is a proof that the bias will decrease with increasing T with dynamic panels.

          Thanks in advance!

          Comment

          Working...
          X