Error: In log(1 - default$g0) : NaNs produced

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

Error: In log(1 - default$g0) : NaNs produced

Postby bear16 » Tue Dec 08, 2015 2:25 pm

Hello,

For some of the models that I am running recently, I get the following error message:

In log(1 - default$g0) : NaNs produced

However, there is still an estimate after this error is produced. Sometimes if I adjust buffer width, the error resolves, but at other times I can't get it to resolve.

What are potential causes of this error? Areas to troubleshoot?

I have been assuming that the estimates coming from a model with such errors should not be used. Is this correct?

Thank you very much for your help!
bear16
 
Posts: 20
Joined: Thu Oct 14, 2010 11:18 am

Re: Error: In log(1 - default$g0) : NaNs produced

Postby murray.efford » Tue Dec 08, 2015 4:55 pm

Strangely, my search doesn't find code like that in the current version of 'secr', so it's hard to troubleshoot. I do find that there is a teeny bug in the default initial value for g0 with polygon and transect detectors (someone typed 'lambda' instead of 'lambda0'), which I'll fix in the provisional version 2.10.1 ASAP.

It is quite possible that during numerical maximization the algorithm tries and rejects impossible values. I think if a likelihood can be calculated at the final values and the estimates and variances are plausible then you should trust them.

Murray
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Error: In log(1 - default$g0) : NaNs produced

Postby murray.efford » Tue Dec 08, 2015 5:33 pm

Revised 2.10.1 now at http://www.otago.ac.nz/density/SECRinR.html. Not sure this will remove the message - maybe.
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Error: In log(1 - default$g0) : NaNs produced

Postby bear16 » Wed Dec 09, 2015 9:36 am

Thank you very much! I was worried that there was something wrong with how I was writing the model or that I did not have enough data.

I am using polygon detectors and re-ran one of the models that was producing the error with the new version of secr you posted and it no longer produces an error.
bear16
 
Posts: 20
Joined: Thu Oct 14, 2010 11:18 am


Return to analysis help

Who is online

Users browsing this forum: No registered users and 10 guests