# NOT RUN {
summary(stoatCH)
# }
# NOT RUN {
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
# }
# NOT RUN {
## 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))
## use secr:: in case of conflicting model.average from RMark
secr::model.average(stoat.model.HN, stoat.model.EX,
realnames = "D")
# }
Run the code above in your browser using DataLab