[statnet_help] Any way to bump out when error detected?

Michał Bojanowski michal2992 at gmail.com
Fri Dec 16 07:27:51 PST 2022


Hello Jim,

AFAIK we don't have a control parameter like that at this moment.
However, there is a harmless hack that could essentially stop ergm()
at the very point of estimation you are referring to, namely before
following with fallback methods of optimizing log-likelihood if the
first method fails. Would that work for you?

Best, Michał

On Fri, Dec 16, 2022 at 4:13 PM James Moody <jmoody77 at duke.edu> wrote:

>

> Hey Folks –

>

> Hope you are well.

>

> Is there a control parameter or similar that would change the behavior when the model detects an error? I.e. I’m seeing this:

>

>

>

> Error in check.objfun.output(out, minimize, d) :

>

> objfun returned value that is NA or NaN

>

> MLE could not be found. Trying Nelder-Mead...

>

>

>

> Then it goes on and iterates/searches for a (in my case) hopeless solution, which is *very* slow.

>

>

>

> Is there any way to get it to just bump out when this (or similar) happens? Would like to set it up so if it detects anything like this, it just stops trying.

>

>

>

> If it were just one case, I would just interrupt it by hand … but this is embedded in a set of 100s of such models, so running unobserved, and when it hits one of these it slows the process down to a crawl…

>

>

>

> Thanks in advance,

>

> Peaceful Thoughts,

>

> Jim

>

>

>

>

>

> James Moody

>

> Professor of Sociology

>

> Director, Duke Network Analysis Center

>

>

>

>

>

>

>

> _______________________________________________

> statnet_help mailing list

> statnet_help at u.washington.edu

> http://mailman13.u.washington.edu/mailman/listinfo/statnet_help




More information about the statnet_help mailing list