timevaryingcov
.
The full design matrix for each detection submodel has one row for each
combination of $i$, $s$ and $k$ (animal, occasion and trap).
Allowing a distinct probability for each animal (the `$n$'
dimension) may seem excessive, as continuous individual-specific
covariates are feasible only when a model is fitted by maximizing the
conditional likelihood (cf Huggins 1989). However, the full $n.S.K$
array is convenient for coding both group membership (Lebreton et al.
1992, Cooch and White 2008) and experience of capture, even when
individual-level heterogeneity cannot be modelled.
Variation between `sessions' and between latent classes in a finite
mixture adds two further dimensions: in principle there is an
$n.S.K$ array for each latent class (classes are numbered
1..$M$), and an $n.S.K.M$ array for each session (sessions are
numbered 1..$R$). The full design matrix has $n.S.K.M.R$
rows. We do not expand on this here.formula
).
capthist
$n.S$
B transient (Markovian) response capthist
$n.S$
bk animal x site learned response capthist
$n.S.K$
Bk animal x site transient response capthist
$n.S.K$
k site learned response capthist
$S.K$
K site transient response capthist
$S.K$
g group see below $n$
h2 2-class mixture -- 2
h3 3-class mixture -- 2
session session factor (one level for each session) automatic $R$
Session session number 0:(R-1) automatic $R$
[user] individual covariate covariates (capthist)
$n$
[user] session covariate sessioncov
$R$
[user] time covariate timecov
$S$
[user] detector covariate covariates (traps)
$K$
}
The classic `learned response' is a step change following first
detection; this is implemented with the predictor variable `b' which is
FALSE up to and including the time of first capture and TRUE afterwards.
An alternative is a response that depends only on detection at the last
opportunity (`B').
The site-specific learned and transient responses `bk' and `Bk' imply
that an individual becomes trap happy or trap shy in relation to a
particular detector, as in the wolverine example of Royle et al. (2011).
Groups (`g') are defined by the interaction of the capthist
categorical (factor) individual covariates identified in secr.fit
argument `groups'. Groups are redundant with conditional likelihood
because individual covariates of whatever sort (continuous or
categorical) may be included freely in the model.
Individual heterogeneity (`h' in the notation of Otis et al. 1978) may
modelled by treating any detection parameter as a 2-part or 3-part
finite mixture e.g. g0 $\sim{~}$ h2. See
dframe
. This feature requires some care and is
better avoided.
The submodels for `g0', `sigma' and `z' are named components of the
model
argument of secr.fit
. They are expressed in Rformula notation by appending terms to $\sim{~}$.
The name of the response may optionally appear on the left hand side of
the formula (e.g. g0$\sim{~}$b).secr models
, secr density models
, secr.fit
## constant (null) model
list(g0 = ~1, sigma = ~1)
## both detection parameters change after first capture
list(g0 = ~b, sigma = ~b)
## group-specific parameters; additive time effect on g0
## groups are defined via the '`groups' argument of secr.fit
list(g0 = ~ g + t, sigma = ~ g)
## g0 depends on trap-specific covariate
list(g0 = ~ kcov)
Run the code above in your browser using DataLab