grid <- make.grid(7, 7) # default multi-catch detector
optimalSpacing(D = 5, traps = grid, detectpar = list(lambda0 = 0.2, sigma = 20),
noccasions = 5, plt = TRUE)
if (FALSE) {
optimalSpacing(D = 5, traps = grid, detectpar = list(lambda0 = 0.4, sigma = 20),
detectfn = 'HEX', R = seq(1,6,0.4), noccasions = 10, plt = TRUE, col = "blue")
## with simulations
grid <- make.grid(8, 8, spacing = 20, detector = 'proximity')
optimalSpacing(D = 5, traps = grid, detectfn = "HHN", detectpar =
list(lambda0 = 0.2, sigma = 20), noccasions = 5, nrepl = 20, nx = 32,
fit.function = "secr.fit", ncores = 4, plt = TRUE, col = "blue")
## manual check
grid <- make.grid(8, 8, spacing = 60, detector = 'proximity')
scen <- make.scenarios(D = 5, detectfn = 14, lambda0 = 0.2, sigma = 20,
noccasions = 5)
sim1 <- run.scenarios(nrepl = 20, scen, trapset = list(grid), fit = TRUE,
fit.args = list(detectfn = 14), ncores = 4, byscenario = FALSE)
summary(sim1)
}
Run the code above in your browser using DataLab