Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: error 3998 - stack overflow


From   Krishna Naidoo <krishna.naidoo@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: error 3998 - stack overflow
Date   Thu, 8 Jun 2006 05:09:34 -0700 (PDT)

Dear Statalist members

I am running regressions using the xtabond2 command.
Sometimes the program stops almost immediately and I
receive the following error message:

editmissing():  3998  stack overflow
xtabond2_mata():     -  function returned error
<istmt>:     -  function returned error
r(3998);

Further information provided in the help file was as
follows:

"[M-2]   error . . . . . . . . . . . . . . . . . . . .
. . . . Return code 3998
        stack overflow
Your program nested too deeply.  For instance, imagine
calculating the factorial of n by recursively calling
yourself, and then requesting the factorial of 1e+100.
 Functions that call themselves in an infinite loop
invariably cause this error."

Can anyone explain what exactly the problem here is
and how I might resolve it?

An example of the command that I used which prompted
this error is:
xi:xtabond2 depvar l.depvar i.date var1 var2 var3 var4
var5 var6 var7, iv(i.date var1) gmm(l.depvar var2 var3
var4 var5 var6 var7, lag(0 4)) robust

I am using a large and unbalanced panel dataset (t=40,
N=650). The error seems to occur mostly when I have a
specification with many regressors, if I cut some out
it sometimes runs without a problem.

Gratefully,
Krishna



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index