## generate some data & plot
detectors <- make.grid (nx = 10, ny = 10, spacing = 20,
detector = "multi")
plot(detectors, label = TRUE, border = 0, gridspace = 20)
detections <- sim.capthist (detectors, noccasions = 5,
popn = list(D = 5, buffer = 100),
detectpar = list(g0 = 0.2, sigma = 25))
session(detections) <- "Simulated data"
plot(detections, border = 20, tracks = TRUE, varycol = TRUE)
## generate habitat mask
mask <- make.mask (detectors, buffer = 100, nx = 48)
## fit model and display results
secr.model <- secr.fit (detections, model = g0~b, mask = mask)
secr.model
Run the code above in your browser using DataLab