summary(blackbearCH)
# \donttest{
# GSM is the approximate boundary of Great Smoky Mountains National Park
# Make a habitat mask restricted to the park
tr <- traps(blackbearCH)
msk <- make.mask(tr, buffer = 6000, type = 'trapbuffer', poly = GSM)
# Plot
plot(GSM)
plot(msk, add = TRUE)
plot(blackbearCH, tracks = TRUE, add = TRUE)
plot(tr, add = TRUE)
# Fit models
# suppress fastproximity to allow learned response
setNumThreads() # as appropriate
# null model
blackbear.0 <- secr.fit(blackbearCH, detectfn = 'EX', hcov = 'sex',
mask = msk, details = list(fastproximity = FALSE), trace = FALSE)
# sex differences and site-specific behavioural response
blackbear.h2bk <- secr.fit(blackbearCH, detectfn = 'EX', hcov = 'sex',
model = list(g0~bk+h2, sigma~h2), mask = msk,
details = list(fastproximity = FALSE), trace = FALSE)
AIC(blackbear.0, blackbear.h2bk)
summary(blackbear.h2bk)
# How many if we extrapolate to GSM NP?
region.N(blackbear.h2bk, region = GSM)
# }
Run the code above in your browser using DataLab