Page 1 of 1

How to change number of allowed iterations

PostPosted: Wed Aug 25, 2021 2:40 pm
by tmcdonald
I am using 'openCR.fit' to fit a JSSAsecrb model. I understand the optimization is performed by stats::nlm. stats::nlm has the `iterlim` parameter set at 100. Hence, by default, `openCR.fit` stops after 100 iterations.

My problem is taking considerably more iterations to converge. At present, values at iteration 100 become starting values for the next run, and one model took 6 restarts to converge. Is there a way to increase the number of allowed iterations?

Passing `iterlim = 500` to `openCR.fit` does not do it. This is not a critical issue as I have the restart-with-starting-values work around, but it would be convenient and save time overall.

Re: How to change number of allowed iterations

PostPosted: Wed Aug 25, 2021 5:21 pm
by murray.efford
I have been hitting the same problem and increased the default iterlim to 300 in the new version 2.1.0 released last week. Also, in openCR.fit() you can now change arguments of nlm() with details=list(control = list(iterlim = 500)).
Murray

Re: How to change number of allowed iterations

PostPosted: Wed Aug 25, 2021 8:03 pm
by tmcdonald
Excellent. Thank you.