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

Carter T. Butts buttsc at uci.edu
Fri Dec 16 13:09:05 PST 2022


Not a direct fix, but if you are fitting that many models (I presume, in
a simulation study?), you may want to consider using stochastic
approximation instead of the default Geyer-Thompson-Hummel scheme.  (Use
main.method="Stochastic" in the control() list.)  SA converges more
readily in non-optimal cases, and fails more gracefully.  I've now
started using that as a go-to for simulation studies, or other
unsupervised settings where a small fraction of cases with very slow
convergence can cause problems.  (Just be sure to turn off the bridge
sampler if you don't need it, because its settings make it become very
slow if you tune up your MCMC settings with SA (which you should).)

Hope that helps!

-Carter

On 12/16/22 7:13 AM, James Moody 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

> https://urldefense.com/v3/__http://mailman13.u.washington.edu/mailman/listinfo/statnet_help__;!!CzAuKJ42GuquVTTmVmPViYEvSg!LXP3f4NLB_jyVjQCHg_Q1zgKAcSKpv5l-0jblx8QKgDuwNGlWrCWzt2x2Q6tieF4Jd_1y9Ln0YxeZ5oE$

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman13.u.washington.edu/pipermail/statnet_help/attachments/20221216/9dbfdb7a/attachment.html>


More information about the statnet_help mailing list