capthist
. Integration is by summation over the grid of points in
mask
.secr.fit (capthist, model = list(D~1, g0~1, sigma~1),
mask = NULL, buffer = NULL, CL = FALSE, detectfn = NULL,
binomN = NULL, start = NULL, link = list(), fixed = list(),
timecov = NULL, sessioncov = NULL, groups = NULL,
dframe = NULL, details = list(), method = "Newton-Raphson",
verify = TRUE, biasLimit = 0.01, trace = NULL, ncores = 1, ...)
capthist
object including capture data and detector (trap) layoutmask
objectmask
not specified
(default 100 m)secr
object from which they may be derivedformula
notationcovariates
attribute of capthist
.verify
secr.fit
returns an object of class secr. This has
componentssecr.design.MS
)secr.design.MS
)model
nlm
or
optim
)ncores > 1
secr.fit
fits a SECR model by maximizing the likelihood. The
likelihood depends on the detector type ("multi", "proximity", "count",
"polygon" etc.) of the traps
attribute of capthist
(Borchers and Efford 2008, Efford, Borchers and Byrom 2009, Efford,
Dawson and Borchers 2009, Efford 2011). The `multi' form of the
likelihood is also used, with a warning, when detector type = "single"
(see Efford et al. 2009 for justification). The default model
is
null (constant density and detection probability). The set of variables
available for use in linear predictors includes some that are
constructed automatically (t, T, b, B, bk, Bk, k, K), group (g), and
others that appear in the covariates
of the input data. See also
usage
for varying effort, timevaryingcov
to
construct other time-varying detector covariates, and secr models
and buffer
and mask
are alternative ways to define the region
of integration (see mask).
The length of timecov
should equal the number of sampling
occasions (ncol(capthist)
). Arguments timecov
,
sessioncov
and groups
are used only when needed for terms
in one of the model specifications. Default link
is list(D="log",
g0="logit", sigma="log")
.
If start
is missing then autoini
is used for D, g0
and sigma, and other beta parameters are set initially to arbitrary
values, mostly zero. start
may be a previously fitted nested
model. In this case, a vector of starting beta values is constructed
from the nested model and additional betas are set to zero. Mapping of
parameters follows the default in score.test
, but user
intervention is not allowed.
binomN
(previously a component of details
) determines the
distribution that is fitted for the number of detections of an individual
at a particular detector, on a particular occasion, when the detectors
are of type `count', `polygon' or `transect':
dnbinom
}AIC.secr
,
capthist
,
derived
,
mask
,
predict.secr
,
print.secr
,
region.N
,
troubleshooting
usage
,
vcov.secr
,
verify
,## construct test data (array of 48 `multi-catch' traps)
detectors <- make.grid (nx = 6, ny = 8, detector = "multi")
detections <- sim.capthist (detectors, popn = list(D = 10,
buffer = 100), detectpar = list(g0 = 0.2, sigma = 25))
## fit & print null (constant parameter) model
secr0 <- secr.fit (detections)
secr0 ## uses print method for secr
## compare fit of null model with learned-response model for g0
secrb <- secr.fit (detections, model = g0~b)
AIC (secr0, secrb)
## typical result
## model detectfn npar logLik AIC AICc dAICc AICwt
## secr0 D~1 g0~1 sigma~1 halfnormal 3 -347.1210 700.242 700.928 0.000 0.7733
## secrb D~1 g0~b sigma~1 halfnormal 4 -347.1026 702.205 703.382 2.454 0.2267
Run the code above in your browser using DataLab