Activity centres may be clumped (overdispersed) relative to a Poisson distribution,
the model used in secr.fit
(Borchers and Efford 2008). This causes
the sampling variance of density estimates to be understated. The problem is
addressed with a variance inflation factor, essentially a measure of overdispersion.
Functions described here compute the expected number of individuals detected at each detector (Enk) and use that to compute Fletcher's \(\hat c\) estimate of overdispersion for use as a variance inflation factor.
adjustVarD
adjusts the SE and confidence limits of density estimates
using Fletcher's \(\hat c\).
See Cooch and White (2022) for an introduction to measurement of overdispersion in capture--recapture. The focus here is on overdispersion of activity centres relative to a Poisson distribution, rather than on non-independence in the spatial detection process.
Enk(D, mask, traps, detectfn = 0, detectpar = list(g0 = 0.2,
sigma = 25, z = 1), noccasions = NULL, binomN = NULL,
userdist = NULL, ncores = NULL) chat.nk(object)
adjustVarD(object, chatmin = 1, alpha = 0.05)
For Enk
, a vector of expected counts, one for each detector in traps
.
For chat.nk
, a list comprising --
expected number at each detector
observed number at each detector
vector of summary statistics: mean(expected.nk), var(expected.nk), mean(nk), var(nk), nu (=df), X2/nu
Fletcher's \(\hat c\)
For adjustVarD
, a dataframe with one row for each session, based on predict.secr
or derived.secr
, with extra column `c-hat'.
numeric density, either scalar or vector of length nrow(mask)
single-session habitat mask
traps
object
integer code for detection function q.v.
a named list giving a value for each parameter of detection function
number of sampling intervals (occasions)
integer code for discrete distribution (see
secr.fit
)
user-defined distance function or matrix (see userdist)
integer number of threads
fitted secr model (see Warnings for restrictions)
minimum value of Fletcher's \(\hat c\)
alpha level for confidence intervals
These functions are experimental in secr 4.5.8, and do not work with polygon-like detectors. No allowance is made for modelled variation in detection parameters with respect to occasion, detector or animal.
If traps
has a usage attribute then noccasions
is
set accordingly; otherwise it must be provided.
The environment variable RCPP_PARALLEL_NUM_THREADS determines the number of
parallel threads. It is set to the value of ncores
, unless that is NULL
(see setNumThreads
).
The conventional lack-of-fit statistic is \(\hat c_X = X^2/(K-p)\) where \(K\) is the number of detectors, \(p\) is the number of estimated parameters, and $$X^2 = \sum_k (n_k - E (n_k))^2/ E(n_k).$$
Fletcher's \(\hat c\) is an improvement on \(\hat c_X\) that is less affected by small expected counts. It is defined by $$\hat c = c_X / (1+ \bar s),$$ where \(\bar s = \sum_k s_k / K\) and \(s_k = (n_k - E(n_k)) / E(n_k)\).
No adjustment is made by adjustVarD
when \(\hat c\) is less than the
minimum.
Cooch, E. and White, G. (eds) (2022) Program MARK: A Gentle Introduction. 22nd edition. Available online at http://www.phidot.org/software/mark/docs/book/.
Fletcher, D. (2012) Estimating overdispersion when fitting a generalized linear model to sparse data. Biometrika 99, 230--237.
secr
,
make.mask
,
Detection functions
,
pdot
# \donttest{
temptrap <- make.grid()
msk <- make.mask(temptrap)
## expected number of individuals per detector.
Enk (D = 5, msk, temptrap, detectpar = list(g0 = 0.2, sigma = 25),
noccasions = 5)
chat.nk(secrdemo.0)
# }
Run the code above in your browser using DataLab