
Last chance! 50% off unlimited learning
Sale ends in
trapXY
,
captXY
), and as a combined capthist
object
(captdata
) ready for input to secr.fit
.
The fitted models are objects of class secr
formed by
secrdemo.0 <- secr.fit (captdata)
secrdemo.b <- secr.fit (captdata, model = list(g0 = ~b))
secrdemo.CL <- secr.fit (captdata, CL = TRUE)
data(secrdemo)
trapXY
contains the data from the Density input file
`trap.txt', and captXY
contains the data from `capt.txt' (Efford
2007).
The fitted models use a halfnormal detection function and the likelihood
for multi-catch traps (expect estimates of g0 to be biased because of
trap saturation Efford et al. 2009). The first is a null model
(i.e. parameters constant) and the second fits a learned trap response.
capthist
, read.capthist
## navigate to folder with raw data files
olddir <- setwd (system.file("extdata", package="secr"))
## construct capthist object from raw data
captdata <- read.capthist ('capt.txt', 'trap.txt', fmt = 'XY')
## generate demonstration fits
secrdemo.0 <- secr.fit (captdata)
secrdemo.CL <- secr.fit (captdata, CL = TRUE)
secrdemo.b <- secr.fit (captdata, model = list(g0 = ~b))
## restore previous setting
setwd(olddir)
## display the null model fit, using the print method for secr
secrdemo.0
## compare fit of models
AIC(secrdemo.0, secrdemo.b)
## display estimates for the two models (single session)
collate(secrdemo.0, secrdemo.b)[1,,,]
Run the code above in your browser using DataLab