data(stoatDNA)
capthist
object
`stoatCH'. Hair tubes are treated as `proximity' detectors which allow
an individual to be detected at multiple detectors on one occasion
(day), although there are no multiple detections in this dataset. Three
pre-fitted models are included: stoat.model.HN
,
stoat.model.HZ
, and stoat.model.EX
(with halfnormal,
hazard-rate and negative exponential detection functions,
respectively).
capthist
, detection functions
,
secr.fit
summary(stoatCH)
stoat.model.HN <- secr.fit(stoatCH, buffer = 1000, detectfn = 0)
# this generates an error unless we use biasLimit = NA
# to suppress the default bias check
stoat.model.HZ <- secr.fit(stoatCH, buffer = 1000, detectfn = 1,
biasLimit = NA)
stoat.model.EX <- secr.fit(stoatCH, buffer = 1000, detectfn = 2)
confint(stoat.model.HN, "D")
## Profile likelihood interval(s)...
## lcl ucl
## D 0.01275125 0.04055662
## plot fitted detection functions
xv <- seq(0,800,10)
plot(stoat.model.EX, xval = xv, ylim = c(0,0.12), limits = FALSE,
lty = 2)
plot(stoat.model.HN, xval = xv, limits = FALSE, lty = 1, add = TRUE)
plot(stoat.model.HZ, xval = xv, limits = FALSE, lty = 3, add = TRUE)
## review density estimates
collate(stoat.model.HZ, stoat.model.HN, stoat.model.EX,
realnames = "D", perm = c(2,3,4,1))
model.average(stoat.model.HN, stoat.model.EX,
realnames = "D")
Run the code above in your browser using DataLab