Bloque 2 Modelos ecológicos
Part 3 Spatial Capture-Recapture
© Bea Rubio

IREC, 14/05/2024
Valentin Lauret, Javi Fernandez-Lopez
\[~\] \[~\] \[~\] \[~\] \[~\] \[~\]

5/13/24

Spatial Capture Recapture - SCR

\[~\]

Program

  1. In theory: what is SCR for? what kind of data do we need? how does it work? (the equations)

  2. In practice: A case study with NIMBLE

  3. Some extensions

Spatial Capture Recapture - What for?

SCR provide a map of density of individuals to be estimated with the associated uncertainty, with or without spatial covariates.

\[~~\] \[~~\] \[~~\] \[~~\]

Density of Pyrenean brown bear, work from Maëlis Kervellec

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.

SCR - What do we need to fit SCR?

  • Individual identification.
  • Spatial location of sampling.
  • Multiple capture occasions.

\[~\]

Such data can come from multiple monitoring methods

  • Photo-identification, e.g. camera traps
  • Non-invasive genetic

Assumptions of SCR

Capture-Recapture assumptions

  1. animals do not lose their marks during the experiment.
  2. all marks are correctly noted and recorded at each trapping occasion.
  3. demographic and geographic closure, the number of individuals remain stable (no birth, no death, no emigration, no immigration).

Specific SCR assumptions

  1. Activity centers are randomly distributed.
  2. Detection is a function of distance.
  3. Independence of encounters among individuals.
  4. Independence of encounter of the same individual.

\[~~\]

Some of these assumptions can be relaxed with some modelling extensions, e.g. open population SCR, inhomogeneous Poisson point processes, accounting for movement and connectivity…

Understand SCR with Pyrenean Brown Bears

An history of Spatial Capture-Recapture with fictive Pyrenean Brown Bears

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.

What dataset?

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

Activity centers, density and detection

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

  1. Assign individual activity center near detections locations.

  2. Calculate the density of activity centers in the study area.

  3. Account for imperfect detection.

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.

Table 1: Low detection probability example

     [,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
Table 2: High detection probability example

     [,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:

  1. We define \(M\) an upper limit for the population size
  2. We need to create the \(M-I\) lines full of \(0\) in the data matrix for the indviduals that possibly exist and belongs to the pop.
  3. We consider \(z = 1\) for the \(N\) that really exist and belong to the pop, and \(z=0\) for the \(M-I\) individuals we do not exist. We estimate \(z\) as \(z \sim \mbox{Bernoulli}(\psi)\)
  4. We estimated the population as \(N = \sum_i^M z\)

Equations

Let’s look at the mathematical formulation of such model.

  1. An observation process that estimate \(p_{ij}\), the individual detection probability that 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}) 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.

  1. Generate activity centers locations over the study area \(S\).

\[s_i ∼ \mbox{Uniform}(S)\]

  1. A latent ecological process describing the density of activity centers per unit area.

\[y_{ij} ∼ \mbox{Poisson}(p_{i,j}K)\] We can consider homogeneous or inhomogeneous density.

Spatial Capture-Recapture in practice

Let’s go!

Let’s start - step 1

  • We created \(S\) a study area of dimensions \(100\) x \(100\).
  • We put \(J= 100\) traps.
xlim <- c(0, 100)
ylim <- c(0, 100)

tr <- seq(15, 85, length = 10)
traps <- data.frame(X = rep(tr, each = length(tr)),
                    Y = rep(tr, times = length(tr))) # 100 coord. traps

Let’s start - step 2

  • We created \(S\) a study area of dimensions \(100\) x \(100\).
  • We put \(T= 100\) traps.
  • We generate \(N=50\) individuals.

Individuals activity centers \(s_1, ... , s_n\) can be anywhere in the study area \(S\).

\[s_i \sim \mbox{Uniform(S)}\]

N <- 50 # nb of individuals

s <- data.frame(s.x = runif(N, xlim[1], xlim[2]), 
                s.y = runif(N, ylim[1], ylim[2]))

Let’s start - step 3

  • We put \(J= 100\) traps.
  • We generate \(I=50\) individuals.
  • We detected the individuals over \(K=5\) sampling occasions.

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.

sigma <- 5 
p0 <- 0.4
J <- nrow(traps) # nb of traps
K <- 5 # nb capture occasions
yy <- array(NA, c(N, J, K))

for(j in 1:J) {
  dist <- sqrt((traps$X[j] - s$s.x)^2 + (traps$Y[j] - s$s.y)^2)
  p <- p0 * exp(-dist^2 / (2 * sigma^2))
  for(k in 1:K) {
    yy[,j,k] <- rpois(N, p)
  }
}

n <- apply(yy, c(1,2), sum) 
n 
      [,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     0
[26,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[27,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[28,]    0    0    0    0    0    0    0    0    0     0     0     1     0
[29,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[30,]    0    0    0    0    1    0    0    0    0     0     0     0     0
[31,]    0    4    1    0    0    0    0    0    0     0     0     2     0
[32,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[33,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[34,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[35,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[36,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[37,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[38,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[39,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[40,]    0    0    0    0    0    0    0    0    1     0     0     0     0
[41,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[42,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[43,]    0    0    1    0    0    0    0    0    0     0     0     0     1
[44,]    0    0    0    0    0    0    0    0    0     2     0     0     0
[45,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[46,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[47,]    0    0    0    0    0    0    0    0    1     0     0     0     0
[48,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[49,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[50,]    0    0    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]     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
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     0     0     1     5     1     0     0     0     0     0     0     0
 [5,]     0     3     0     0     0     0     0     0     0     0     1     2
 [6,]     0     0     0     0     0     0     0     0     0     0     0     1
 [7,]     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
 [9,]     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
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     1     0     0     0     0     0     0     0     2     2
[17,]     0     0     0     0     0     0     0     1     0     0     0     0
[18,]     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
[20,]     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
[22,]     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
[24,]     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
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     1     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
[39,]     0     1     2     0     0     0     0     0     0     0     0     6
[40,]     0     0     0     0     3     1     0     0     0     0     0     0
[41,]     0     0     0     0     0     0     0     0     0     0     0     0
[42,]     0     0     0     0     0     0     0     0     0     0     0     0
[43,]     3     1     0     0     0     0     0     0     0     0     2     0
[44,]     0     0     0     0     0     1     2     0     0     0     0     0
[45,]     0     0     0     0     0     0     0     0     0     0     0     0
[46,]     0     0     0     0     0     0     0     0     0     0     0     0
[47,]     0     0     0     0     0     0     0     0     0     0     0     0
[48,]     0     0     0     0     0     0     0     0     0     0     0     0
[49,]     0     0     0     0     0     0     0     0     0     2     0     0
[50,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37]
 [1,]     0     0     0     0     0     1     1     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     0     1     0     0     0     0     0     0     0     0     0     0
 [5,]     1     0     0     0     0     0     0     0     0     0     0     0
 [6,]     2     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0     0     0     2     1     0
 [9,]     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
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     0     1     0     0     0     0     0     0
[18,]     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
[20,]     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
[22,]     3     0     0     0     0     0     0     0     0     0     2     0
[23,]     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
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     1     4     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
[39,]     1     0     0     0     0     0     0     0     0     0     0     0
[40,]     0     0     2     0     0     0     0     0     0     0     0     0
[41,]     0     0     0     0     0     0     0     0     0     0     0     0
[42,]     0     0     0     0     0     0     0     0     0     0     0     0
[43,]     0     0     0     0     0     0     0     0     0     0     0     0
[44,]     0     0     0     0     0     0     0     0     0     0     0     0
[45,]     0     0     0     0     0     0     0     0     0     0     0     0
[46,]     0     0     0     0     0     0     0     0     0     0     0     0
[47,]     0     0     0     0     0     0     0     0     0     0     0     0
[48,]     0     0     0     0     0     0     0     0     0     0     0     0
[49,]     0     0     0     0     0     0     0     1     2     0     0     0
[50,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49]
 [1,]     0     0     0     0     1     1     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     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
 [8,]     0     0     0     0     0     0     0     2     3     0     0     0
 [9,]     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
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     0     0     0     0     0     0     0     0     0     0     0     0
[13,]     0     1     1     0     0     0     0     0     0     0     0     0
[14,]     2     3     0     0     0     0     0     0     0     0     2     0
[15,]     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
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     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
[20,]     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
[22,]     0     0     0     0     0     0     0     0     1     0     0     0
[23,]     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
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     1     3     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     1     0     0     0     0     0     0     0
[39,]     0     0     0     0     0     0     0     0     0     0     0     0
[40,]     0     0     0     0     0     0     0     0     0     0     0     0
[41,]     0     0     0     0     0     0     0     0     0     0     0     0
[42,]     0     0     0     0     0     0     0     0     0     0     0     0
[43,]     0     0     0     0     0     0     0     0     0     0     0     0
[44,]     0     0     0     0     0     0     0     0     0     0     0     0
[45,]     0     0     0     0     0     0     0     0     0     0     0     0
[46,]     0     0     0     0     0     0     0     0     1     0     0     0
[47,]     0     0     0     0     0     0     0     0     0     0     0     0
[48,]     0     0     0     0     0     0     0     0     0     0     0     0
[49,]     0     0     0     0     0     1     0     0     0     0     0     0
[50,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61]
 [1,]     0     0     1     0     0     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     0     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     0     0     0     2     0     0     0     0     0     0     0
 [8,]     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
[10,]     0     1     0     0     0     0     0     0     0     0     0     0
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     0     0     0     0     0     2     0     0     0     0     0     0
[13,]     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
[15,]     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
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     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
[20,]     0     0     0     0     0     0     1     0     0     0     0     0
[21,]     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
[23,]     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
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     1     0     0     0     0     0     0     0     0     1
[38,]     0     1     1     0     0     0     0     0     0     0     0     0
[39,]     0     0     0     0     0     0     0     0     0     0     0     0
[40,]     0     0     0     0     0     0     0     0     0     0     0     0
[41,]     0     0     0     0     0     0     0     0     0     0     0     0
[42,]     0     0     0     0     0     0     0     0     0     0     0     0
[43,]     0     0     0     0     0     0     0     0     0     0     0     0
[44,]     0     0     0     0     0     0     0     0     0     0     0     0
[45,]     0     0     0     0     0     0     0     0     0     0     0     0
[46,]     0     0     0     0     0     1     2     0     0     0     0     0
[47,]     0     0     0     0     0     0     0     0     0     0     0     0
[48,]     0     0     0     0     0     0     0     0     0     0     0     0
[49,]     0     0     0     0     0     0     0     0     0     0     0     0
[50,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [,73]
 [1,]     0     0     0     0     0     0     0     0     0     0     0     0
 [2,]     0     0     1     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     0     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     0     2     1     0     0     0     0     0     0     0     0
 [8,]     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
[10,]     0     0     0     0     0     0     0     0     0     0     0     0
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     0     1     3     1     0     0     0     0     0     0     0     0
[13,]     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
[15,]     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
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     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
[20,]     0     0     0     0     4     0     1     0     0     0     0     0
[21,]     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
[23,]     0     0     0     0     0     0     0     0     0     0     0     0
[24,]     0     0     1     0     0     1     0     0     0     0     0     0
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     1     0     0     0     0     0     0     0     0     0     0     0
[39,]     0     0     0     0     0     0     0     0     0     0     0     0
[40,]     0     0     0     0     0     0     0     0     0     0     0     0
[41,]     0     0     0     0     0     0     0     0     0     0     0     0
[42,]     0     0     0     0     0     0     0     0     0     0     0     0
[43,]     0     0     0     0     0     0     0     0     0     0     0     0
[44,]     0     0     0     0     0     0     0     0     0     0     0     0
[45,]     0     0     0     0     0     0     0     0     0     0     0     0
[46,]     0     0     0     0     0     0     0     0     0     0     0     0
[47,]     0     0     0     0     0     0     0     0     0     0     0     0
[48,]     0     0     0     0     0     0     0     0     0     0     0     0
[49,]     0     0     0     0     0     0     0     0     0     0     0     0
[50,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,74] [,75] [,76] [,77] [,78] [,79] [,80] [,81] [,82] [,83] [,84] [,85]
 [1,]     0     0     0     0     0     0     0     0     0     0     0     0
 [2,]     1     2     0     0     0     0     0     0     0     0     1     1
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     0     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     2     0     0     0     0     0     0     0     0     0     0
 [8,]     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
[10,]     0     0     0     0     0     0     0     0     0     0     0     0
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     0     0     0     0     0     0     0     1     1     1     0     0
[19,]     0     0     0     0     0     0     0     0     0     0     0     0
[20,]     0     0     1     0     0     0     0     0     0     0     0     0
[21,]     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
[23,]     0     0     0     0     0     0     0     0     0     0     0     0
[24,]     0     0     1     1     0     0     0     0     0     0     0     0
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     1     0     1     1     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     2     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
[39,]     0     0     0     0     0     0     0     0     0     0     0     0
[40,]     0     0     0     0     0     0     0     0     0     0     0     0
[41,]     0     0     0     0     0     0     0     0     0     0     0     0
[42,]     0     0     2     0     0     0     0     0     0     0     0     1
[43,]     0     0     0     0     0     0     0     0     0     0     0     0
[44,]     0     0     0     0     0     0     0     0     0     0     0     0
[45,]     0     0     0     0     0     0     0     0     0     0     0     0
[46,]     0     0     0     0     0     0     0     0     0     0     0     0
[47,]     0     0     0     0     0     0     0     0     0     0     0     0
[48,]     0     0     0     0     0     0     0     0     0     0     0     0
[49,]     0     0     0     0     0     0     0     0     0     0     0     0
[50,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,86] [,87] [,88] [,89] [,90] [,91] [,92] [,93] [,94] [,95] [,96] [,97]
 [1,]     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
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     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
 [8,]     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
[10,]     0     0     0     0     0     0     0     0     0     0     0     0
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     0     0     0     0     0     0     2     0     0     0     0     0
[19,]     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
[21,]     0     1     0     0     0     0     0     0     0     0     0     0
[22,]     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
[24,]     2     0     0     0     0     0     0     0     0     0     0     0
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     3     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     1     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
[39,]     0     0     0     0     0     0     0     0     0     0     0     0
[40,]     0     0     0     0     0     0     0     0     0     0     0     0
[41,]     0     0     0     0     0     0     0     0     0     0     0     0
[42,]     5     0     0     0     0     0     0     0     0     0     0     0
[43,]     0     0     0     0     0     0     0     0     0     0     0     0
[44,]     0     0     0     0     0     0     0     0     0     0     0     0
[45,]     0     0     0     0     0     0     0     0     0     0     0     0
[46,]     0     0     0     0     0     0     0     0     0     0     0     0
[47,]     0     0     0     0     0     0     0     0     0     0     0     0
[48,]     0     0     0     0     0     0     0     0     0     0     0     0
[49,]     0     0     0     0     0     0     0     0     0     0     0     0
[50,]     0     0     0     0     0     1     0     0     0     0     0     0
      [,98] [,99] [,100]
 [1,]     0     0      0
 [2,]     0     0      0
 [3,]     0     0      0
 [4,]     0     0      0
 [5,]     0     0      0
 [6,]     0     0      0
 [7,]     0     0      0
 [8,]     0     0      0
 [9,]     0     0      0
[10,]     0     0      0
[11,]     0     0      0
[12,]     0     0      0
[13,]     0     0      0
[14,]     0     0      0
[15,]     0     0      0
[16,]     0     0      0
[17,]     0     0      0
[18,]     0     0      0
[19,]     0     0      0
[20,]     0     0      0
[21,]     0     0      0
[22,]     0     0      0
[23,]     0     0      0
[24,]     0     0      0
[25,]     0     0      0
[26,]     0     0      0
[27,]     0     0      0
[28,]     0     0      0
[29,]     0     0      0
[30,]     0     0      0
[31,]     0     0      0
[32,]     0     0      0
[33,]     0     0      0
[34,]     0     0      0
[35,]     0     2      3
[36,]     0     0      0
[37,]     0     0      0
[38,]     0     0      0
[39,]     0     0      0
[40,]     0     0      0
[41,]     0     0      0
[42,]     0     0      0
[43,]     0     0      0
[44,]     0     0      0
[45,]     0     0      0
[46,]     0     0      0
[47,]     0     0      0
[48,]     0     0      0
[49,]     0     0      0
[50,]     0     0      0
nobs <- n[apply(n,1,sum)!=0,] # remove undetected individuals
nobs
      [,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    2    0    0    0    0     0     0     0     0
[11,]    0    0    0    0    0    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     1     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     0     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     1     0
[23,]    0    0    0    0    1    0    0    0    0     0     0     0     0
[24,]    0    4    1    0    0    0    0    0    0     0     0     2     0
[25,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[26,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[27,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[28,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[29,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[30,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[31,]    0    0    0    0    0    0    0    0    1     0     0     0     0
[32,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[33,]    0    0    1    0    0    0    0    0    0     0     0     0     1
[34,]    0    0    0    0    0    0    0    0    0     2     0     0     0
[35,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[36,]    0    0    0    0    0    0    0    0    1     0     0     0     0
[37,]    0    0    0    0    0    0    0    0    0     0     0     0     0
[38,]    0    0    0    0    0    0    0    0    0     0     0     0     0
      [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
 [1,]     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
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     0     0     1     5     1     0     0     0     0     0     0     0
 [5,]     0     3     0     0     0     0     0     0     0     0     1     2
 [6,]     0     0     0     0     0     0     0     0     0     0     0     1
 [7,]     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
 [9,]     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
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     0     0     1     0     0     0     0     0     0     0     2     2
[15,]     0     0     0     0     0     0     0     1     0     0     0     0
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     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
[20,]     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
[22,]     0     0     0     0     0     0     0     0     1     0     0     0
[23,]     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
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     1     2     0     0     0     0     0     0     0     0     6
[31,]     0     0     0     0     3     1     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     3     1     0     0     0     0     0     0     0     0     2     0
[34,]     0     0     0     0     0     1     2     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     2     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37]
 [1,]     0     0     0     0     0     1     1     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     0     1     0     0     0     0     0     0     0     0     0     0
 [5,]     1     0     0     0     0     0     0     0     0     0     0     0
 [6,]     2     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     0     0     0     0     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0     0     0     2     1     0
 [9,]     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
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     0     0     0     0     0     0     0     0     0     0     0     0
[15,]     0     0     0     0     0     1     0     0     0     0     0     0
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     0     0     0     0     0     0     0     0     0     0     0     0
[19,]     3     0     0     0     0     0     0     0     0     0     2     0
[20,]     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
[22,]     0     0     0     0     0     1     4     0     0     0     0     0
[23,]     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
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     1     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     2     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     1     2     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,38] [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49]
 [1,]     0     0     0     0     1     1     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     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
 [8,]     0     0     0     0     0     0     0     2     3     0     0     0
 [9,]     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
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     0     1     1     0     0     0     0     0     0     0     0     0
[13,]     2     3     0     0     0     0     0     0     0     0     2     0
[14,]     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
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     0     0     0     0     0     0     0     0     0     0     0     0
[19,]     0     0     0     0     0     0     0     0     1     0     0     0
[20,]     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
[22,]     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
[24,]     0     0     0     0     0     0     0     0     0     0     0     0
[25,]     0     0     0     1     3     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     1     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     1     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     1     0     0     0     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,50] [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61]
 [1,]     0     0     1     0     0     0     0     0     0     0     0     0
 [2,]     0     0     0     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     0     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     0     0     0     2     0     0     0     0     0     0     0
 [8,]     0     0     0     0     0     0     0     0     0     0     0     0
 [9,]     0     1     0     0     0     0     0     0     0     0     0     0
[10,]     0     0     0     0     0     0     0     0     0     0     0     0
[11,]     0     0     0     0     0     2     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     0     0     1     0     0     0     0     0
[18,]     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
[20,]     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
[22,]     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
[24,]     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
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     1     0     0     0     0     0     0     0     0     1
[29,]     0     1     1     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     1     2     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,62] [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [,73]
 [1,]     0     0     0     0     0     0     0     0     0     0     0     0
 [2,]     0     0     1     0     0     0     0     0     0     0     0     0
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     0     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     0     2     1     0     0     0     0     0     0     0     0
 [8,]     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
[10,]     0     0     0     0     0     0     0     0     0     0     0     0
[11,]     0     1     3     1     0     0     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     0     0     0     0     0     0     0     0     0     0
[17,]     0     0     0     0     4     0     1     0     0     0     0     0
[18,]     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
[20,]     0     0     1     0     0     1     0     0     0     0     0     0
[21,]     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
[23,]     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
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     1     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,74] [,75] [,76] [,77] [,78] [,79] [,80] [,81] [,82] [,83] [,84] [,85]
 [1,]     0     0     0     0     0     0     0     0     0     0     0     0
 [2,]     1     2     0     0     0     0     0     0     0     0     1     1
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     0     0     0     0     0     0     0     0     0     0     0     0
 [7,]     0     2     0     0     0     0     0     0     0     0     0     0
 [8,]     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
[10,]     0     0     0     0     0     0     0     0     0     0     0     0
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     0     0     0     0     0     1     1     1     0     0
[17,]     0     0     1     0     0     0     0     0     0     0     0     0
[18,]     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
[20,]     0     0     1     1     0     0     0     0     0     0     0     0
[21,]     0     0     0     0     0     0     0     1     0     1     1     0
[22,]     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
[24,]     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
[26,]     0     0     0     0     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     0     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     2     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     0     0     2     0     0     0     0     0     0     0     0     1
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     0     0     0     0     0     0     0     0
      [,86] [,87] [,88] [,89] [,90] [,91] [,92] [,93] [,94] [,95] [,96] [,97]
 [1,]     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
 [3,]     0     0     0     0     0     0     0     0     0     0     0     0
 [4,]     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
 [6,]     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
 [8,]     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
[10,]     0     0     0     0     0     0     0     0     0     0     0     0
[11,]     0     0     0     0     0     0     0     0     0     0     0     0
[12,]     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
[14,]     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
[16,]     0     0     0     0     0     0     2     0     0     0     0     0
[17,]     0     0     0     0     0     0     0     0     0     0     0     0
[18,]     0     1     0     0     0     0     0     0     0     0     0     0
[19,]     0     0     0     0     0     0     0     0     0     0     0     0
[20,]     2     0     0     0     0     0     0     0     0     0     0     0
[21,]     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
[23,]     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
[25,]     0     0     0     0     0     0     0     0     0     0     0     0
[26,]     0     0     0     3     0     0     0     0     0     0     0     0
[27,]     0     0     0     0     0     0     0     1     0     0     0     0
[28,]     0     0     0     0     0     0     0     0     0     0     0     0
[29,]     0     0     0     0     0     0     0     0     0     0     0     0
[30,]     0     0     0     0     0     0     0     0     0     0     0     0
[31,]     0     0     0     0     0     0     0     0     0     0     0     0
[32,]     5     0     0     0     0     0     0     0     0     0     0     0
[33,]     0     0     0     0     0     0     0     0     0     0     0     0
[34,]     0     0     0     0     0     0     0     0     0     0     0     0
[35,]     0     0     0     0     0     0     0     0     0     0     0     0
[36,]     0     0     0     0     0     0     0     0     0     0     0     0
[37,]     0     0     0     0     0     0     0     0     0     0     0     0
[38,]     0     0     0     0     0     1     0     0     0     0     0     0
      [,98] [,99] [,100]
 [1,]     0     0      0
 [2,]     0     0      0
 [3,]     0     0      0
 [4,]     0     0      0
 [5,]     0     0      0
 [6,]     0     0      0
 [7,]     0     0      0
 [8,]     0     0      0
 [9,]     0     0      0
[10,]     0     0      0
[11,]     0     0      0
[12,]     0     0      0
[13,]     0     0      0
[14,]     0     0      0
[15,]     0     0      0
[16,]     0     0      0
[17,]     0     0      0
[18,]     0     0      0
[19,]     0     0      0
[20,]     0     0      0
[21,]     0     0      0
[22,]     0     0      0
[23,]     0     0      0
[24,]     0     0      0
[25,]     0     0      0
[26,]     0     2      3
[27,]     0     0      0
[28,]     0     0      0
[29,]     0     0      0
[30,]     0     0      0
[31,]     0     0      0
[32,]     0     0      0
[33,]     0     0      0
[34,]     0     0      0
[35,]     0     0      0
[36,]     0     0      0
[37,]     0     0      0
[38,]     0     0      0

Now we fit!

In frequentist

  • {oSCR} open sources SCR package, easy and flexible to manipulate and modify codes.
  • {SECR} faster, simpler for classical uses.

\[~~\]

In Bayesian

  • Advantages of Bayesian approach: flexible, integrable with others datasets, modify whatever you want!

Let’s go Bayesian

library(nimble)

Let’s go Bayesian

Code

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])
})

Prepare the data

# 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)

Run the model

  • All-in-one function.
samples <- nimbleMCMC(code = scr,     
           data = data,  
           constants = constants,
           inits = inits,
           monitors =  c("N", "sigma", "p0"),
           niter = 5000, 
           nburnin = 1000, 
           nchains = 2)
  • Step by step process
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)

Check the results

library(MCMCvis)
MCMCtrace(samples, pdf = F)
MCMCsummary(samples, round = 2)
       mean   sd  2.5%   50% 97.5% Rhat n.eff
N     47.48 4.85 37.00 48.00 57.00 1.00  1012
p0     0.41 0.13  0.03  0.44  0.57 1.03   232
sigma  6.92 6.38  4.60  5.05 34.59 1.02   213

Add burnin

samplesBind <- rbind(samples$chain1[1001:(niter- nburnin),],
                     samples$chain2[1001:(niter- nburnin),])

Extract activity centers

  • Add s and z as a parameter to save
conf2 <- configureMCMC(Rmodel,
                       monitors = c("N", "sigma", "p0", "s", "z"))
 
Rmcmc2 <- buildMCMC(conf2)
 
Cmcmc2 <- compileNimble(Rmcmc2, project = Cmodel)
 
 
 # ART 5 min
 
samples2 <- runMCMC(Cmcmc2,
                        niter = 5000,
                        nburnin = 1000,
                        nchains = 2)

\[~~\]

str(samples2)
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]" ...

Straightforward extension w/ dolphins

Straightforward extension w/ dolphins

Straightforward extension w/ dolphins - Inhomogeneous Poisson point process

  • Assume that density of individuals is not homogeneous in space (often true).
  • Estimate density as a function of covariates (e.g. habitat, forest cover).

\[\mbox{log}(\lambda_s)= \beta_0 + \beta_1 \mbox{Bathymetry}_s\]

  • Assign the activity center as a Categorical draw in the density of each site \(\lambda_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}]\]

Straightforward extension w/ dolphins - Inhomogeneous Poisson point process

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]) 
})

Straightforward extension w/ dolphins - Inhomogeneous Poisson point process

  • We obtain \(\beta_0\) and \(\beta_1\) from \(\log(\lambda) = \beta0 + \beta_1 \mbox{Bathymetry}\)
  • We can predict the expected density of dolphin in all the study area.
  • or map the activity centers

Less straightforward extension w/ dolphins - Detection heterogeneity

  • In many situation, detection is not constant and vary between \(K\) sampling occasions.
  • In the most complex form, we can consider

\[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}\)

  • Then our dataset has three dimensions

\[y_{i,j,k} \sim \mbox{Bernoulli}(p_{ijk})\]

Less straightforward extension w/ dolphins - Detection heterogeneity

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]) 
})

Programming tricks

  • More complicated models require more data to converge (and are sometimes useless 😎 see also here)
  • Many trick exist to ease the convergence and optimize computation time.
  • For example {nimbleSCR} package and this paper.

\[~~\]

Codes and data to run the full dolphin 🐬 example –> here.

Even less straightforward extension w/ dolphins - Data integration

  • It is possible to combine different datsets.
  • For example SCR and N-mixture-like models.

\[~~\]

\[~~\]

\[~~\] \[~~\]

  • Or SCR and Distance Sampling (w/ 🐬) here

Extensions

Fast growing (and very welcoming) community.

  • Open Spatial Capture-Recapture - Ana Sanz-Pérez, Instituto Mixto de Investigación en Biodiversidad, Mieres, Asturias.
  • Include connectivity - Maëlis Kervellec CEFE, Montpellier.
  • Account for movement - Beth Gardner, Mahdieh Tourani.
  • Random thinning to deal with unassigned samples - local Pepe Jimenez.
  • Nimble tricks to speed up computation time - Cyril Milleret & Pierre Dupont & Daniel Turek.

\[~~~\]

Resources

  • Andy Royle SCR book.
  • Royle and Kéry, Applied Hierarchial Modeling in Ecology volumes 1 and 2, here

Mañana

Come as you are!

  • Bring your own data.
  • Use simulated data.
  • Use real data.
  • 😴