IREC, 14/05/2024
Valentin Lauret, Javi Fernandez-Lopez
\[~\] \[~\] \[~\] \[~\] \[~\] \[~\]
5/13/24
\[~\]
In theory: what is SCR for? what kind of data do we need? how does it work? (the equations)
In practice: A case study with NIMBLE
Some extensions
SCR provide a map of density of individuals to be estimated with the associated uncertainty, with or without spatial covariates.
\[~~\] \[~~\] \[~~\] \[~~\]
SCR incorporates spatial information associated with individual detections into population models like capture–recapture models.
Capture–recapture methods taking into account that animals closer to detection devices are more likely to be detected.
\[~\]
Such data can come from multiple monitoring methods
Capture-Recapture assumptions
Specific SCR assumptions
\[~~\]
A landscape
with 2 individuals
and a grid of traps (e.g. genetic traps)
We collect (genetic) samples each month
After 3 months, we stopped the study
We obtained these data.
\[~\]
We want to estimate bear density in the landscape.
knowing that detection probability in each trap depend on individual activity center.
We obtained \(Y\), a matrix of 2 dimensions that store the number of detections during the \(K\) sampling occasions, for each individual \(i\) in \(I\), for each trap \(j\) in \(J\).
\[~~\]
Let’s say \(I=10\), \(K=5\), \(J=10\)
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 1 2 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 2 0 0 0 0 0
[3,] 0 0 0 0 1 0 0 0 0 0
[4,] 0 4 1 0 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 1 0
[6,] 0 0 1 0 0 0 0 0 0 0
[7,] 0 0 0 0 0 0 0 0 0 2
[8,] 0 0 0 0 0 0 0 0 1 0
Detection probability as a function of distance \(D_{i,j}\) between the trap \(j\) and the location of individual activity centers \(i\).
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 1 2 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 2 0 0 0 0 0
[3,] 0 0 0 0 1 0 0 0 0 0
[4,] 0 4 1 0 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 1 0
[6,] 0 0 1 0 0 0 0 0 0 0
[7,] 0 0 0 0 0 0 0 0 0 2
[8,] 0 0 0 0 0 0 0 0 1 0
In a nutshell
Assign individual activity center near detections locations.
Calculate the density of activity centers in the study area.
Account for imperfect detection.
Similar to capture-recapture (or occupancy or N-mixture), the repeated visits allow to estimate the imperfect detection, and hence the number of individuals we might have missed.
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 0 1 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 1 0 0 0 0 0
[3,] 0 0 0 0 0 0 0 0 0 0
[4,] 0 1 0 0 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 0 0
[6,] 0 0 0 0 0 0 0 0 0 0
[7,] 0 0 0 0 0 0 0 0 0 1
[8,] 0 0 0 0 0 0 0 0 0 0
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 4 5 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 5 0 0 0 0 0
[3,] 0 0 0 0 4 0 0 0 0 0
[4,] 0 7 4 0 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 4 0
[6,] 0 0 4 0 0 0 0 0 0 0
[7,] 0 0 0 0 0 0 0 0 0 5
[8,] 0 0 0 0 0 0 0 0 4 0
SCR use a Data augmentation process to account for imperfect detection also used in Capture-Recapture and similar to Occupancy models:
Let’s look at the mathematical formulation of such model.
Then, for individual \(i\), and trap \(j\):
\[p_{i,j} = p_0 \mbox{exp}(\frac{-D_{i,j}}{2 \sigma ^2}) z_i \] with \(D_{i,j} = \sqrt{(AC_i^x- \mbox{trap}_j^x)^2+ (AC_i^y- \mbox{trap}_j^y)^2}\), and \(\sigma\) a parameter of the shape of the detection function.
\[s_i ∼ \mbox{Uniform}(S)\]
\[y_{ij} ∼ \mbox{Poisson}(p_{i,j}K)\] We can consider homogeneous or inhomogeneous density.
Individuals activity centers \(s_1, ... , s_n\) can be anywhere in the study area \(S\).
\[s_i \sim \mbox{Uniform(S)}\]
Accounting that \(p_{ij}\), the individual detection probability changes with \(D_{i,j}\) the distance between activity center (home range center) \(s_i\) and trap location \(x_j\).
Then, for individual \(i\), and trap \(j\):
\[p_{i,j} = p_0 \mbox{exp}(\frac{-D_{i,j}}{2 \sigma ^2}) \] with \(D_{i,j} = \sqrt{(AC_i^x- \mbox{trap}_j^x)^2+ (AC_i^y- \mbox{trap}_j^y)^2}\), and \(\sigma\) a parameter of the shape of the detection function.
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
[1,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[2,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[3,] 1 2 0 0 0 0 0 0 0 0 0 0 0
[4,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[6,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[7,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[8,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[9,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[10,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[11,] 0 0 0 0 2 0 0 0 0 0 0 0 0
[12,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[13,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[14,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[15,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[16,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[17,] 0 0 0 0 0 0 0 0 0 0 1 0 0
[18,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[19,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[20,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[21,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[22,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[23,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[24,] 0 0 0 0 0 0 0 0 0 0 0 0 0
[25,] 0 0 0 0 0 0 0 0 0 0 0 0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 0 0
[35,] 0 0 0
[36,] 0 0 0
[37,] 0 0 0
[38,] 0 0 0
{oSCR}
open sources SCR package, easy and flexible to manipulate and modify codes.{SECR}
faster, simpler for classical uses.\[~~\]
scr <- nimbleCode({
# priors
sigma ~ dunif(0, 10000)
p0 ~ dunif(0, 1)
psi ~ dunif(0, 1)
for(i in 1:M) { # for each possible individuak
z[i] ~ dbern(psi) # decide if it is real or ghost
# assign ACs to individual i
s[i,1] ~ dunif(xlim[1], xlim[2])
s[i,2] ~ dunif(ylim[1], ylim[2])
# calculate distance btw AC and each trap
dist[i,1:J] <- sqrt((s[i,1] - X[1:J,1])^2 + (s[i,2] - X[1:J,2])^2)
# calculate detection probability as an half-normal function
p[i,1:J] <- p0*exp(-dist[i,1:J]^2 / (2 * sigma^2)) * z[i]
# likelihood
for(j in 1:J){ # for each trap
n[i,j] ~ dpois(p[i,j]*K)
}
}
# calculate population size as a derived parameter
N <- sum(z[1:M])
})
# data augmentation parameters
M <- 200
# a matrix of 0 for potential individuals
n0 <- matrix(0,nrow = M-nrow(nobs), ncol = ncol(nobs))
ndata <- rbind(nobs, n0)
# constants
constants <- list(M = M,
K = K,
J = J)
# data
data <- list(n = ndata,
X = traps,
xlim = xlim,
ylim = ylim)
# initial values
s <- cbind(runif(M, xlim[1], xlim[2]),
runif(M, ylim[1], ylim[2]))
z <- rep(1, M)
inits <- list(sigma = 1000,
p0 = 0.6,
s = s,
z = z,
psi = 0.5)
Rmodel <- nimbleModel(code = code,
constants = constants,
data = data,
inits = inits)
Rmodel$initializeInfo()
Rmodel$calculate()
Cmodel <- compileNimble(Rmodel)
calculate(Cmodel)
conf <- configureMCMC(Rmodel,
monitors = c("N", "sigma", "p0"))
Rmcmc <- buildMCMC(conf)
Cmcmc <- compileNimble(Rmcmc, project = Cmodel)
# Approximate Running Time 5 min
niter = 5000
nburnin = 1000
nchains = 2
samples <- runMCMC(Cmcmc,
niter = niter,
nburnin = nburnin,
nchains = nchains)
s
and z
as a parameter to save\[~~\]
List of 2
$ chain1: num [1:4000, 1:603] 47 51 52 51 52 52 51 51 46 56 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr [1:603] "N" "p0" "s[1, 1]" "s[2, 1]" ...
$ chain2: num [1:4000, 1:603] 48 42 42 49 45 53 46 49 47 45 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr [1:603] "N" "p0" "s[1, 1]" "s[2, 1]" ...
\[\mbox{log}(\lambda_s)= \beta_0 + \beta_1 \mbox{Bathymetry}_s\]
\[s_i \sim \mbox{Categorical}(\pi) \text{ or } s_i \sim \mbox{Multinomial}(1, \pi)\] \[\pi = [\frac{\lambda_1}{\sum_s\lambda}, \frac{\lambda_2}{\sum_s\lambda}, ... , \frac{\lambda_S}{\sum_s\lambda}]\]
scr.ipp <- nimbleCode({
# priors
b0 ~ dnorm(0,1) # Intercept of lambda-density regression
b1 ~ dnorm(0,1) # slope of bathymetry
# priors for the sigma
sigma ~ dunif(10,10^5)
sig2 <- 2*sigma*sigma
# priors for the p0
p0 ~ dnorm(0,1)
# Intensity process
log(lam[1:nsites]) <- b0 + b1 * bathymetry[1:nsites] # abundance model via IPP
# Population size
EN <- sum(mu[1:nsites]) # expected number of individual for the study area
psi <- EN/M # parameter for data augmentation
# cell prob
probs[1:nsites] <- lam[1:nsites]/EN
# data augmentation
for(i in 1:M) {
z[i] ~ dbern(psi) # is i alive or not ?
# induce the uniform distribution of activity centers over the discrete set 1:nsites
id[i] ~ dmulti(size = 1, probs[1:nsites])
# id[i] ~ dmulti(size = 1, lam[1:nsites]) # also works
# location of AC
SX[i] <- sites[round(id[i]),1]
SY[i] <- sites[round(id[i]),2]
dist[i, 1:ntrap] <- sqrt((traps[1:ntrap,1] - SX[i])^2 + (traps[1:ntrap,2] - SY[i])^2)
p[i, 1:ntrap] <- p0 * exp( - dist[i, 1:ntrap]^2 / sig2) * z[i]
for(j in 1:ntrap){
y.scr[i, j] ~ dpois(p[i,j]*K)
}
}
N <- sum(z[1:M])
})
\[p_{i,j,k}=p_{0,jk} \mbox{exp}(\frac{-\mbox{Dist}_{ij}}{2\sigma_{jk}})\]
with for example \(p_{0,jk}= \alpha_{0} + \alpha_1\mbox{Sampling effort}_{jk}\)
\[y_{i,j,k} \sim \mbox{Bernoulli}(p_{ijk})\]
scr.ipp2 <- nimbleCode({
# priors
b0 ~ dnorm(0,1) # Intercept of mu-density regression
b1 ~ dnorm(0,1) # slope of bathymetry
# priors for the sigma
sigma ~ dunif(10,10^5)
sig2 <- 2*sigma*sigma
# priors for the p0
a0 ~ dnorm(0,1)
a1 ~ dnorm(0,1)
# logit regression of pbar
logit(p0[1:ntrap, 1:nocc]) <- a0 + a1 * seff[1:ntrap,1:nocc]
# Intensity process
log(lam[1:nsites]) <- b0 + b1 * bathymetry[1:nsites] # abundance model via IPP
# Population size
EN <- sum(mu[1:nsites]) # expected number of individual for the study area
psi <- EN/M # parameter for data augmentation
# cell prob
probs[1:nsites] <- lam[1:nsites]/EN
# data augmentation
for(i in 1:M) {
z[i] ~ dbern(psi) # is i alive or not ?
# induce the uniform distribution of activity centers over the discrete set 1:nsites
id[i] ~ dmulti(size = 1, probs[1:nsites])
# id[i] ~ dmulti(size = 1, mu[1:nsites]) # also works
# location of AC
SX[i] <- sites[round(id[i]),1]
SY[i] <- sites[round(id[i]),2]
dist[i, 1:ntrap] <- sqrt((traps[1:ntrap,1] - SX[i])^2 + (traps[1:ntrap,2] - SY[i])^2)
for(j in 1:ntrap){
for(k in 1:ntrap){
p[i,j,k] <- p0[j,k] * exp( - dist[i, 1:ntrap]^2 / sig2) * z[i]
y.scr[i,j,k] ~ dbern(p[i,j,k])
}
}
}
N <- sum(z[1:M])
})
{nimbleSCR}
package and this paper.\[~~\]
Codes and data to run the full dolphin 🐬 example –> here.
\[~~\]
\[~~\]
\[~~\] \[~~\]
Fast growing (and very welcoming) community.
\[~~~\]
Come as you are!
IBER - Bayesian and Nimble