if (FALSE) {
## compare timing of combined model with separate single-session models
## for 5-session ovenbird mistnetting data: 2977/78 = 38-fold difference
setNumThreads(7)
system.time(fit1 <- secr.fit(ovenCH, buffer = 300, trace = FALSE,
model = list(D ~ session, g0 ~ session, sigma ~ session)))
## user system elapsed
## 1837.71 31.81 730.56
system.time(fit2 <- lapply (ovenCH, secr.fit, buffer = 300, trace = FALSE))
## user system elapsed
## 43.74 0.46 11.13
## ratio of density estimates
collate(fit1)[,1,1,"D"] / sapply(fit2, function(x) predict(x)["D","estimate"])
## session=2005 session=2006 session=2007 session=2008 session=2009
## 1.0000198 1.0000603 0.9999761 0.9999737 0.9999539
}
Run the code above in your browser using DataLab