Failed to fit, returning Error in fasthistoriescpp : Error in function ibeta_derivative

105 views
Skip to first unread message

Manoon Pliosungnoen

unread,
Feb 15, 2022, 12:14:02 AM2/15/22
to secr
Dear all,

After I have successfully run my codes on my PC couple times before transferring to my M1 Mac. I then believe the code should work fine, none of error so far until this model fitting. I have got this error while I trying to fit my data to a simple model:

LPRDfitEx2019 <- secr.fit(capthist=spatDetectHistLPRDidentified2019,
                      detectfn='EX',  buffer=10*initialsigma2019,  trace=FALSE )

I keep getting this error message: 
Error in fasthistoriescpp(as.integer(m), as.integer(nc), as.integer(nrow(realparval)), : Error in function ibeta_derivative<long double>(long double,long double,long double): Overflow Error
I have tried different method, i.e.  method="Newton-Raphson" , "BFGS", but none of this works.

I would greatly appreciate it if anyone could help.

Best regards,
Manoon

Murray Efford

unread,
Feb 15, 2022, 2:27:21 PM2/15/22
to secr
I haven't seen that before, and can't imagine why it would differ between platforms. I guess there is something odd about your data to trigger this, so a summary would be helpful. Also what version are you using?  It seems ibeta_derivative is called internally by a Boost distribution function used by 'secr'. You might get around it by setting details = list(fastproximity = FALSE).Murray

Manoon Pliosungnoen

unread,
Mar 1, 2022, 1:12:42 AM3/1/22
to secr
Dear Murray,

Thank you for your kind response. It must be 4.4XX version but I have recent updated to 4.5.1. I will re-run them again with the code you have suggested and get back to you whether the issue is gone.

Best regards,
Manoon

Lee Deutsch

unread,
Feb 16, 2023, 5:12:24 AM2/16/23
to secr
Hi,

Did either of you find a working solution? I am currently encountering the same error messages on an M1 MacBook Pro...

Thanks!

Lee

Murray Efford

unread,
Feb 16, 2023, 5:20:47 PM2/16/23
to secr
Hi Lee
I didn't see a follow up from Manoon, and haven't pursued this further. I found a separate M1 issue with random number generation in 'ipsecr' that I could work around.  Boost will be harder. I don't have that system so troubleshooting is hard. Are you able to construct a small example? Which secr version?
Murray

Manoon Pliosungnoen

unread,
Feb 18, 2023, 2:49:54 PM2/18/23
to Murray Efford, secr
Dear Lee and Murray,

I have not seen this issues from my latest run couple months ago. So, I guess the issue has been fixed or maybe my data/codes has been improved along my analyses.
I must apologize for not reporting back sooner.

Best regards,
Manoon


-- 
You received this message because you are subscribed to a topic in the Google Groups "secr" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/secrgroup/3DyLZgxiMug/unsubscribe.
To unsubscribe from this group and all its topics, send an email to secrgroup+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/secrgroup/f6bf9df2-11c5-475b-8fca-f8a4245d2f03n%40googlegroups.com.

Murray Efford

unread,
Feb 18, 2023, 4:28:22 PM2/18/23
to secr
Thanks. Perhaps we can relax about that issue, but I would still like to hear from people who have trouble running secr on M1, especially if accompanied by a simple example.

Manoon Pliosungnoen

unread,
Feb 18, 2023, 6:02:00 PM2/18/23
to Murray Efford, secr
Dear Murray,

I have completed many analyses in my Mac Mini M1 using secr and openCR in RStudio for my PhD research for over a year now and I have never entered with any serious issues. I have not tried too many complex models though.

Best regards,
Manoon

On 18 Feb BE 2566, at 16:28, Murray Efford <murray...@gmail.com> wrote:

Thanks. Perhaps we can relax about that issue, but I would still like to hear from people who have trouble running secr on M1, especially if accompanied by a simple example.
You received this message because you are subscribed to the Google Groups "secr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to secrgroup+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/secrgroup/d5003433-06fc-4e4d-9b16-396cc4be231fn%40googlegroups.com.

Elizabeth Zhang

unread,
Apr 17, 2023, 3:43:46 PM4/17/23
to secr
Hi all, 

I wanted to jump in and note that I was running into a similar error using secr on my MacBook Pro M1. I am using secr version 4.5.8. Some models ran, but others produced this error. It tended to show up more often when I estimated more parameters in the model, but overall it is unpredictable. 

For example, this model would run: 
m9W <- secr.fit(capthistW, model = list(D~1, g0~1, sigma~session), buffer = 10000, CL = FALSE, detectfn = 0, method = "Newton-Raphson")
But this model would produce an error:
m6W <- secr.fit(capthistW, model = list(D~1, g0~1, sigma~h2), buffer = 10000, CL = FALSE, detectfn = 0, method = "Newton-Raphson")

Following Murray's earlier suggestion, specifying details = list(fastproximity = FALSE) solved the problem. So luckily there is a workaround, but it did significantly increase the run time. Happy to provide more information if helpful. 

Best, 
Elizabeth
Reply all
Reply to author
Forward
0 new messages