Page 1 of 1

Error message - integrate-

PostPosted: Mon Jan 09, 2012 9:44 am
by SHIBA
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

Re: Error message - integrate-

PostPosted: Mon Jan 09, 2012 3:01 pm
by murray.efford
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

Re: Error message - integrate-

PostPosted: Sat Jan 14, 2012 4:07 am
by SHIBA
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

Re: Error message - integrate-

PostPosted: Sat Jan 14, 2012 3:51 pm
by murray.efford
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