Error message - integrate-

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

Error message - integrate-

Postby SHIBA » Mon Jan 09, 2012 9:44 am

Dear all,

I've got some error messages when I run secr.fit of secr package.

Error messages;
integrate (integrand2, lower = trapspacing/2^0.5, upper = Inf) :
the integral is probably divergent,
In secr.fit (captdata, buffer = buffer) :
possible maximization error: nlm returned code 3. See ?nlm

Do those messages mean trap space i.e. detector space in secr, is too close to each other?
How can I fix it?

Thank you in advance

Regards,
SHIBA
SHIBA
 
Posts: 2
Joined: Sun Jan 08, 2012 11:39 pm

Re: Error message - integrate-

Postby murray.efford » Mon Jan 09, 2012 3:01 pm

This error is from the buffer check that is done after a model is fitted. Usually it means the model is grossly inappropriate in some way, but it's not possible to tell what's causing it from the information we have (but it's unlikely to be due to trap spacing). I suggest you turn off the check (verify = FALSE is one way, because this suppresses the check as well as input data checking) and see what happens. Make sure you are using a reasonable buffer width.
Murray
murray.efford
 
Posts: 712
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: Error message - integrate-

Postby SHIBA » Sat Jan 14, 2012 4:07 am

Dear Dr. Murray Efford,

murray.efford wrote: I suggest you turn off the check (verify = FALSE is one way, because this suppresses the check as well as input data checking) and see what happens. Make sure you are using a reasonable buffer width.
Murray

As I turned off the check (verify = FALSE), following warning message appeared:
In secr.fit(captdata, buffer = buffer, verify = FALSE) :
possible maximization error: nlm returned code 3. See ?nlm.

According to nlm help, code 3 means "last global step failed to locate a point lower than estimate. Either estimate is an approximate local minimum of the function or steptol is too small."

Then, I changed steptol from 1e-6 to 1e-3 and re-run secr.fit, a error message appeared:
match(x, table, nomatch = 0L) :
object '.localstuff' can not be found.

Regards,
SHIBA
SHIBA
 
Posts: 2
Joined: Sun Jan 08, 2012 11:39 pm

Re: Error message - integrate-

Postby murray.efford » Sat Jan 14, 2012 3:51 pm

It looks like your dataset is 'difficult' in some sense. I can give a more precise diagnosis if you send it to me offline (or paste the text input files into a post - I'm guessing they're small). Otherwise, you may have more success with another maximization method e.g. set method = 'Nelder-Mead' in the call to secr.fit (this seems to be more robust, but it is not the default because it's slower).
Murray
murray.efford
 
Posts: 712
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand


Return to analysis help

Who is online

Users browsing this forum: No registered users and 2 guests