mask.check() and secr.fit() - Error and warning messages

177 views
Skip to first unread message

Elsa Bussiere

unread,
Oct 11, 2016, 11:31:35 AM10/11/16
to secr...@googlegroups.com
Hello, 

I have two quick questions about error and warning messages I get when running mask.check() and secr.fit().

1. To try use a sensible buffer, I tried to run mask.check() without the usage matrix and it did not work, I got:
"Error in mask.check(), specify 'buffers' if detector(s) on edge".
The only thing I gave was the trapfile + captfile, nothing else.

2. When running secr.fit(), I sometimes (depending on the session and on the buffer size) get this warning message:
Warning messages:
In bias.D(buffer, temptrps, detectfn = output$detectfn, detectpar = dpar,  :
  bias.D() does not allow for variable effort (detector usage)

I am not sure why I get the error message, and should I be concerned about the warning message?

Thanks very much
Kind regards, 
Elsa

Elsa Bussiere PhD student

Animal Demography Unit | John Day Zoology Building 
Department of Biological Sciences | Upper Campus | University of Cape Town
Rondebosch 7701 | South Africa

Murray Efford

unread,
Oct 11, 2016, 1:25:47 PM10/11/16
to Elsa Bussiere, secr...@googlegroups.com
Hi Elsa
1. I don't understand what you were doing when you got the first message. Maybe you could show the code you used.
2. The 'bias check' is an optional extra that computes an ad hoc 'guesstimate' of the bias due to truncation of the (automatic) mask at the given buffer radius. This is only a warning that it cannot be computed in the case of varying detector usage. Use bias.limit = NA to suppress the check and message.
Murray

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Elsa Bussiere

unread,
Oct 13, 2016, 8:41:17 AM10/13/16
to Murray Efford, secr...@googlegroups.com

Hi Murray,

Thanks for getting back to me so quickly.

From what I understood, mask.check() allows the mask buffer width to vary and calculates the associated likelihood; which I wanted to use to find out the mask buffer width value, from which the likelihood stabilises.

Here is the code:

secr.species.A <- read.capthist("leopard_captfile_survey A.txt", "leopard_trapfile_survey A.txt", detector = "proximity", noccasions = occ[which(occ$SU == "A"),2])

secr0.A <- secr.fit(secr.species.A, model = g0 ~ 1, trace = TRUE)

mask.check(secr0.A)

Error in mask.check(secr0.A) : specify 'buffers' if detector(s) on edge

Does this make sense?

Thanks, Elsa

Murray Efford

unread,
Oct 13, 2016, 5:43:18 PM10/13/16
to secr, murray...@gmail.com
Hi Elsa

mask.check() tries a model with new masks formed by buffering different distances around the detectors. You can either specify these with the 'buffers' argument or rely on default multiples of the buffer used for the original mask. Unfortunately, the original buffer width is not saved as such and must be inferred from the mask saved with the fitted model. That is where the code is tripping up: it is inferring a near-to-zero original buffer, which is useless (multiples of zero are also zero); recognising this it tells you to specify the buffers argument rather than rely on the automatic default.

You have used the default 100-m buffer in secr.fit. This is too small for leopards. I cannot quite see why 'secr' thinks 100 m is effectively zero - probably because it is less than the mask cell size (spacing). I predict the problem will go away if you specify a more plausible mask (via the buffer argument).

As an aside - I find there are quicker ways to assess buffer adequacy e.g. esa.plot(). See also suggest.buffer() or for halfnormal detection functions just use buffer = 4 * RPSV(CH, CC=TRUE).

Sorry for the slightly delayed response - blame the time zones.
Murray

Reply all
Reply to author
Forward
0 new messages