Compute the expected number of detections as a function of location (Lambda
), and the expected total numbers of individuals \(n\), recaptures \(r\) and movements \(m\) for a population sampled with an array of detectors (Enrm
) or the number of individuals detected at two or more detectors (En2
).
Lambda(traps, mask, detectpar, noccasions, detectfn = c("HHN", "HHR", "HEX",
"HAN", "HCG", 'HN', 'HR', 'EX'))
Enrm(D, ...)minnrRSE(D, ..., CF = 1.0, distribution = c("poisson","binomial"))
En2(D, traps, mask, detectpar, noccasions, detectfn = c("HHN", "HHR", "HEX",
"HAN", "HCG", "HN", "HR", "EX"))
Qpm(D, traps, mask, detectpar, noccasions, detectfn = c("HHN", "HHR", "HEX",
"HAN", "HCG", "HN", "HR", "EX"))
Lambda
--
mask object with covariates `Lambda' (\(\Lambda(x)\)), `sumpk' and `sumq2' (intermediate values for computation of expected counts - see ../doc/expectedcounts.pdf)
Enrm
--
numeric vector of length 3, the values of E(\(n\)), E(\(r\)) and E(\(m\))
minnrRSE
-- rule-of-thumb RSE(D-hat) Efford and Boulanger (2019)
En2
-- numeric vector comprising the values E(\(n\)) and E(number of animals detected at 2 or more sites)
Qpm
-- numeric vector comprising the criteria \(Q_p\) and \(Q_{p_m}\) of Dupont et al. (2021)
traps
object
mask
object
a named list giving a value for each parameter of detection function
integer number of sampling occasions
integer code or character string for shape of detection function -- see detectfn
population density animals / hectare; may be scalar or vector of length nrow(mask)
arguments passed to Lambda
numeric correction factor
character distribution of \(n\)
The detector attribute of traps
may be `multi', `proximity' or `count'. It is assumed that detectpar and detector type do not differ among occasions.
The calculation is based on an additive hazard model. If detectfn
is not a hazard function (`HHN', `HEX', `HHR', `HAN' and `HCG') then an attempt is made to approximate one of the hazard functions (HN -> HHN, HR -> HHR, EX -> HEX). The default is `HHN'.
For hazard function \(\lambda(d)\) and \(S\) occasions, we define \(\Lambda(x) = \sum_s \sum_k \lambda(d_k(x))\).
Formulae for expected counts are given in secrdesign-Enrm.pdf.
minnrRSE
has mostly the same inputs as Enrm
but returns sqrt(CF/min(n,r)). The correction factor CF may be used to adjust for systematic bias (e.g., for a line of detectors CF = 1.4 may be appropriate). The default distribution = 'poisson'
is for Poisson-distributed \(N\) and \(n\). To adjust the prediction for fixed \(N\) (binomial \(n\)) use distribution = 'binomial'
(see ../doc/secrdesign-tools.pdf Appendix 2).
From 2.7.0, the first argument of minnrRSE
may also be the output from GAoptim
.
En2
is defined for detectors `multi', `proximity' and `count'.
Qpm
returns the optimisation criteria \(Q_p\) and \(Q_{p_m}\) of Dupont et al. (2021), defined only for `proximity' and `count' detectors. The criteria are mask-dependent, and En2
is generally preferred. For `proximity' and `count' detectors the following expressions give the same result:
En2(D, trp, msk, dp)
Qpm(D, trp, msk, dp) * maskarea(msk) * D
given constant density `D', detectors `trp', mask `msk' and detection parameters `dp'.
Dupont, G., Royle, J. A., Nawaz, M. A. and Sutherland, C. (2021) Optimal sampling design for spatial capture--recapture. Ecology 102 e03262.
Efford, M. G., and Boulanger, J. (2019) Fast evaluation of study designs for spatially explicit capture--recapture. Methods in Ecology and Evolution, 10, 1529--1535. DOI: 10.1111/2041-210X.13239
getdetectpar
,
optimalSpacing
,
scenarioSummary
,
GAoptim
tr <- traps(captdata)
detector(tr) <- "multi"
msk <- make.mask(tr, buffer = 100, type = 'trapbuffer')
L <- Lambda(tr, msk, list(lambda0 = 0.2, sigma = 20), 5)
nrm <- Enrm(D = 5, tr, msk, list(lambda0 = 0.2, sigma = 20), 5)
nrm
En2(D = 5, tr, msk, list(lambda0 = 0.2, sigma = 20), 5)
plot(L, cov = "Lambda", dots = FALSE)
plot(tr, add = TRUE)
mtext(side = 3, paste(paste(names(nrm), round(nrm,1)), collapse = ", "))
Run the code above in your browser using DataLab