How to change number of allowed iterations

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

How to change number of allowed iterations

Postby tmcdonald » Wed Aug 25, 2021 2:40 pm

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.
tmcdonald
 
Posts: 8
Joined: Wed Dec 05, 2007 3:41 pm
Location: Laramie, WY

Re: How to change number of allowed iterations

Postby murray.efford » Wed Aug 25, 2021 5:21 pm

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
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: How to change number of allowed iterations

Postby tmcdonald » Wed Aug 25, 2021 8:03 pm

Excellent. Thank you.
tmcdonald
 
Posts: 8
Joined: Wed Dec 05, 2007 3:41 pm
Location: Laramie, WY


Return to analysis help

Who is online

Users browsing this forum: No registered users and 14 guests