| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: How to avoid a break down when convergence is not achieved?
From |
"Benjamin M. Craig, Ph.D." <[email protected]> |
To |
[email protected] |
Subject |
Re: st: How to avoid a break down when convergence is not achieved? |
Date |
Wed, 01 Feb 2006 13:26:25 -0700 |
I found -capture- to be useful. However, if the ML completes the maximum
number of iterations without a break, _rc still equals 0. -capture-
avoids the breakdown, but _rc is a poor indicator of non convergence.
Instead, ML returns e(converge), which equals 1 if convergence is
achieved, otherwise 0. Therefore, if _rc+(e(converge)==0) is greater
than zero, the estimation failed to render the intended results.
The combination of these two pieces of information has worked very well
for my purposes. Thanks for all the feedback.
Ben
Tim Wade wrote:
Ben, check out the combination of -capture- and -noisily-, or the
nostop option of the -do- command, these might help.
On 1/31/06, Benjamin M. Craig, Ph.D. <[email protected]> wrote:
For those who use ML or any difficult optimum estimator, convergence can
break down for multiple reasons (e.g., poor initial conditions or
multicollinearity in a bootstrap sample). When it does, stata stops.
Is there a way of convincing stata to make a note and keep going?
In other words, can ML report an error in a manner which can be
identified without disabling the batch code?
For example, suppose I created a do loop through a five sets of initial
conditions such that if one set of conditions does not converge, the
others might. Or, to see whether each set arrives at the same optimum.
Currently this is not possible, because when "convergence not achieved;"
r(430), the batch stops running. This is a real annoyance for lazy
people like me who would like to run code over nights, weekends, etc.,
instead of setting up appropriate initial conditions.
Cheers,
Ben
*
* 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/