Spatial-Capture Recapture Modeling
Overview
Teaching: 60 min
Exercises: 30 minQuestions
How to setup and run oSCR models?
How to interpret the model outputs?
Objectives
Perform single session spatial capture recapture modeling tasks
Read outputs for density, abundance, detectability and sigma
Use the oSCR.fit function with no covariates, use the scrFrame and alltraps_df that we generated earlier.
Then use predict.oSCR onto the same data to get our predictions.
Note that this will take around 5 minutes to run.
snowLeopard.1<- oSCR.fit(list(D ~ 1, p0 ~ 1, sig ~ 1), scrFrame, list(alltraps_df))
pred<-predict.oSCR(snowLeopard.1, scrFrame,list(alltraps_df), override.trim =TRUE )
We can plot the estimates for density across the study area to see how it looks
library(viridis)
myCol = viridis(7)
RasterValues_1<-as.matrix(pred$r[[1]])
MaxRaS<-max(RasterValues_1, na.rm=TRUE)
MinRaS<-min(RasterValues_1,na.rm=TRUE)
plot(pred$r[[1]], col=myCol,
main="Realized density",
xlab = "UTM Westing Coordinate (m)",
ylab = "UTM Northing Coordinate (m)")
points(tdf2[,3:4], pch=20)
Backtransforming the estimates to be in the 100km2 units for density that we want using ht emu
pred.df.dens <- data.frame(Session = factor(1))
#make predictions on the real scale
(pred.dens <- get.real(snowLeopard.1, type = "dens", newdata = pred.df.dens, d.factor = multiplicationfactor))
Get the abundance, detection, and sigma parameters
(total.abundance <- get.real(snowLeopard.1, type = "dens", newdata = pred.df.dens, d.factor=nrow(snowLeopard.1$ssDF[[1]])))
(pred.det <- get.real(snowLeopard.1, type = "det", newdata = pred.df.dens))
(pred.sig <- get.real(snowLeopard.1, type = "sig", newdata = pred.df.dens))
Key Points