# A local evaluation of the individual state-space to scale up Bayesian spatial capture-recapture

Cyril Milleret, Pierre Dupont, Christophe Bonenfant, Henrik Brøseth, Øystein Flagstad, Chris Sutherland, Richard Bischof

► To cite this version:

Cyril Milleret, Pierre Dupont, Christophe Bonenfant, Henrik Brøseth, Øystein Flagstad, et al. A local evaluation of the individual state-space to scale up Bayesian spatial capture-recapture. Ecology and Evolution, 2019, 9 (1), pp.352-363. 10.1002/ece3.4751. hal-02328706

HAL Id: hal-02328706

https://hal.science/hal-02328706v1

Submitted on 27 Feb 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
ORIGINAL RESEARCH

WILEY Ecology and Evolution
Open-Access

# A local evaluation of the individual state-space to scale up Bayesian spatial capture-recapture

Cyril Milleret<fnref n="1" /> ID | Pierre Dupont<fnref n="1" /> ID | Christophe Bonenfant<fnref n="2" /> ID | Henrik Brøseth<fnref n="3" /> ID | Øystein Flagstad<fnref n="3" /> | Chris Sutherland<fnref n="4" /> ID | Richard Bischof<fnref n="1" /> ID

## Correspondence

Cyril Milleret, Faculty of Environmental Sciences and Natural Resource Management, Norwegian University of Life Sciences, Ås, Norway.
Email: cyril.milleret@gmail.com

## Funding information

Norwegian Environment Agency; Swedish Environmental Protection Agency

## Abstract

Spatial capture-recapture models (SCR) are used to estimate animal density and to investigate a range of problems in spatial ecology that cannot be addressed with traditional nonspatial methods. Bayesian approaches in particular offer tremendous flexibility for SCR modeling. Increasingly, SCR data are being collected over very large spatial extents making analysis computational intensive, sometimes prohibitively so. To mitigate the computational burden of large-scale SCR models, we developed an improved formulation of the Bayesian SCR model that uses local evaluation of the individual state-space (LESS). Based on prior knowledge about a species' home range size, we created square evaluation windows that restrict the spatial domain in which an individual's detection probability (detector window) and activity center location (AC window) are estimated. We used simulations and empirical data analyses to assess the performance and bias of SCR with LESS. LESS produced unbiased estimates of SCR parameters when the AC window width was ≥5σ (σ: the scale parameter of the half-normal detection function), and when the detector window extended beyond the edge of the AC window by 2σ. Importantly, LESS considerably decreased the computation time needed for fitting SCR models. In our simulations, LESS increased the computation speed of SCR models up to 57-fold. We demonstrate the power of this new approach by mapping the density of an elusive large carnivore—the wolverine (Gulo gulo)—with an unprecedented resolution and across the species' entire range in Norway (> 200,000 km<fnref n="2" />). Our approach helps overcome a major computational obstacle to population and landscape-level SCR analyses. The LESS implementation in a Bayesian framework makes the customization and fitting of SCR accessible for practitioners working at scales that are relevant for conservation and management.

## KEYWORDS

computation speed, local evaluation of the state-space, spatial capture-recapture, wolverines

<footnote n="1">¹Faculty of Environmental Sciences and Natural Resource Management, Norwegian University of Life Sciences, Ås, Norway</footnote>

<footnote n="2">²Centre National de la Recherche Scientifique (CNRS), Unité Mixte de Recherche (UMR) 5558, Laboratoire de Biométrie et Biologie Évolutives, Université Lyon 1, Villeurbanne, France</footnote>

<footnote n="3">³Norwegian Institute for Nature Research, Trondheim, Norway</footnote>

<footnote n="4">⁴Department of Environmental Conservation, University of Massachusetts, Amherst, Massachusetts, USA</footnote>
# 1 | INTRODUCTION

Spatial capture-recapture (SCR) models are now routinely used in ecological studies to estimate density of animal populations using encounter history data from recognizable individuals (Borchers & Efford, 2008; Efford, 2004; Royle & Young, 2008). More recently, extensions of SCR have been used to investigate many aspects of spatial ecology (Royle, Fuller, & Sutherland, 2018), including dispersal and survival (Ergon & Gardner, 2014; Schaub & Royle, 2014), landscape connectivity (Sutherland, Fuller, & Royle, 2015), habitat fragmentation (Bischof, Steyaert, & Kindberg, 2017), landscape conservation management (Morin, Fuller, Royle, & Sutherland, 2017), and epidemiology (Muneza et al., 2017). The basic principle of SCR models is the use of spatial patterns of individual detection/non-detections to estimate detection probability as a function of the distance from individual activity centers. The activity center positions are themselves latent variables which are estimated using a spatial point process model.

A growing number of studies employ noninvasive methods, such as camera trapping and noninvasive genetic sampling, for monitoring wildlife. These approaches allow the collection of data suitable for SCR analysis at the level of populations and landscapes (Bischof, Brøseth, & Gimenez, 2016). The greatest hurdle to scaling up inferences to increasingly large spatial domains is the computational burden associated with fitting spatially explicit model and individual-based model to data collected over a large spatial extent. Point process models offer flexibility and are an important strength of the state-space formulation of SCR; however, they can quickly become computationally intensive or even prohibitive with increasing size of the spatial domain (Milleret, Dupont, et al., 2018).

Here, we motivate the need for improved computational efficiency of SCR models using our own challenge attempting to estimate population densities of three large carnivores species (wolves *Canis lupus*, Brown bears *Ursus arctos*, and wolverine *Gulo gulo*) using noninvasive genetic sampling (NGS) data collected across their entire range in two countries (Norway and Sweden). For example, fitting a classical formulation of the SCR model to wolverines NGS data collected over its entire range in Norway using a Bayesian analysis (Royle & Young, 2008) was not possible on a standard desktop computer due to memory constraints.

A typical SCR model assumes that the study area is large enough to contain several individuals representing the population of interest. This implies that, during the study period, individuals occur within smaller subsets (i.e., windows) of the study area defined by the home range size. Therefore, the spatial pattern of observations of known individuals will be restricted to areas defined by their space use and ranging behavior over the study duration. This is explicitly accounted for in SCR by modeling detection probability as a decreasing function of the distance between an individual's activity center (AC) and a detector (e.g., device: camera and hair snare; observer: NGS transsects). As the size of the study area (hereafter named spatial domain) increases relative to the species home range size, the fraction of the spatial domain not used by a given individual (i.e., where its detection probability is effectively 0) increases. In the current SCR

formulation, all detectors are included in the likelihood optimization when fitting models, which is both inefficient and useless because null detection probability is non-informative. Therefore, removing likelihood calculations for an individual in parts of the spatial domain where its detection probability is close to 0, which we refer to as "local evaluation," should result in improved computational efficiency without affecting SCR parameter estimates.

Prior information on the study species' ranging behavior can be used to inform the spatial scale of the localized likelihood evaluation, which essentially produces individual level state-spaces that are nested within the entire state-space of SCR models. In other words, local evaluation restricts the spatial domain available to each individual. While the local evaluation approach is implemented in oSCR (Sutherland, Royle, & Linden, 2017), a package for fitting SCR models using integrated likelihood, the approach has not been implemented for more time-intensive and widely applied Bayesian analyses of SCR models. In addition, frequentist implementation of SCR does not offer the same flexibility and accessibility to build complex models that have made Bayesian SCR models popular with many ecologists.

Here, we describe an approach for local evaluation of the individual state-space (LESS) for computationally efficient fitting of large-scale SCR models in a Bayesian framework. We use simulations to assess the performance of the LESS approach, both in terms of computation speed and the performance of the estimators. We then use the LESS approach to estimate wolverine density throughout Norway using non-invasive genetic sampling data from the national monitoring program (Figure 1) on a standard desktop computer, a task that we were unable to execute using SCR without LESS. We provide example R codes and functions for implementing our approach in JAGS (Plummer, 2003).

# 2 | MATERIAL AND METHODS

## 2.1 | Bayesian formulation of SCR models

In SCR, the spatial locations of detections and non-detections at a set of detectors are used to estimate the latent locations of individual activity centers (ACs). SCR models are hierarchical state-space

<figure><img src="image_2.png" /><figcaption>**FIGURE 1** Photography of a wolverine (*Gulo gulo*) © Roy Andersen, Rovdata</figcaption></figure>
models that combine a spatial point process model describing the spatial distribution of individual ACs, and an observation model, describing the relationship between individual detection probability and distance to its AC. The classical half-normal detection model assumes that the probability p of detecting individual i at detector j decreases with distance between the detector and the AC ($D_{ij}$):

$$p_{ij} = p_0 \cdot \exp\left(\frac{-D_{ij}^2}{2\sigma^2}\right) \quad (1)$$

where $p_0$ and $\sigma$ are the magnitude and scale parameters, respectively. While $p_0$ represents the detection probability at the location of the AC, $\sigma$ is directly related to the width of the utilization distribution, that is, a function of home range size (Royle, Chandler, Sollmann, & Gardner, 2013). More generally, $\sigma$ is related to the extent of space used over the period of study (see Royle et al. (2013) to relate $\sigma$ to area used).

Standard SCR models assume that location of ACs ($s_i$) is uniformly distributed across the spatial domain ($S$) which is modeled as a homogeneous point process:

$$s_i \sim \text{Uniform}(S) \quad (2)$$

In order to constrain the location of ACs within suitable habitat (e.g., irregularly shaped study area), we used the “ones tricks” (Chandler, 2015; Meredith, 2016; Spiegelhalter, Thomas, Best, & Lunn, 2003). This trick consists of determining whether an individual AC was located within suitable habitat or not $pOK_i$ (1/0) and rejecting the proposed AC location if $pOK_i = 0$ using:

$$OK_i \sim \text{Bernoulli}(pOK_i) \quad (3)$$

where OK is a set of ones.

<figure><img src="image_3.png" /><figcaption>FIGURE 2 (a) Illustration of the half-normal detection function (Eq. (1)) representing a declining detection probability ($p$) of an individual with increasing distance from its activity center (AC) in spatial capture-recapture models. Values for $\sigma$ and $p_0$ were set to 2 and 0.07, respectively. A restriction window with a width of $9\sigma$ centered on the AC covers 99.9993% of the total range of $p$. (b) Spatial illustration of the detection probability distribution of an individual using the half-normal detection function. Black shading illustrates the increasing detection probability of an individual around its AC (white dot). The white circle corresponds to a circular area with a radius equal to $\sigma$. The white square represents a restriction window with a width of $9\sigma$ centered on the AC</figcaption></figure>

Bayesian analysis by Markov Chain Monte Carlo (MCMC) with data augmentation can be used to analyze SCR models (Royle, Dorazio, & Link, 2007; Royle, Karanth, Gopalaswamy, & Kumar, 2009). Data augmentation involves (a) augmentation of the dataset with an arbitrary (but sufficiently large) number of individuals that were never detected, and (b) use of a latent binary variable $z_i$ reflecting the realization of the inclusion probability $\psi$, which is an estimate of the proportion of individuals truly present in the population. Estimated abundance ($\hat{N}$) is then derived by summing over the inclusion vector $z$, and density $d$ is derived by dividing $\hat{N}$ by the area of S.

## 2.2 | Local evaluation of the state-space

Local evaluation involves restricting the spatial domain over which detection probabilities are estimated and activity center locations are assumed to occur. To restrict the spatial domain of each individual, we used “evaluation windows” centered on the centroid of individual detection locations. Individual windows should be large enough to ensure all plausible activity center locations and to ensure that the detection function falls to approximately zero. At the same time, the evaluation window should be small enough to remove most of the unnecessary computation in large parts of the spatial domain where $p = 0$ or where AC locations are not likely (Figure 2). Because of the state-space formulation of SCR models, we refer to this approach as the local evaluation of the state-space (LESS).

The local evaluation of the state-space was performed using an inner square evaluation window assigned to each individual to restrict the placement of their AC (hereafter the AC evaluation window) and a larger one to restrict the window within which their associated detection can occur (hereafter the detector evaluation window; Figure 3a). For each detected individual, we centered the AC and detector evaluation windows on the centroid of all its detections (Figure 3a–b).
In contrast to the frequentist local evaluation approach implemented by Sutherland et al. (2017), Bayesian formulation of SCR involves data augmentation (Royle et al., 2007, 2009). Therefore, it is necessary to define AC and detector evaluation windows for the unobserved (augmented) individuals. To do so, we juxtaposed AC evaluation windows of augmented individuals over the full extent of the study area (Figure 3c), thus generating a constant density of augmented ACs within the spatial domain. As a result, the width of the AC window relative to the size of the study area dictates the number of augmented individuals. If a larger number of augmented individuals is needed, it is possible to superimpose layers of juxtaposed squared windows (Figure 3d). Depending on their location, AC windows of both detected and augmented individuals may include non-suitable habitat (i.e., rejection of AC location if in non-suitable habitat; Figure 3b-c). In such cases, the size of the area available to locate ACs differs among individuals. We therefore defined the inclusion parameter $\psi$ for each individual i as a function of the proportion of suitable habitat (prop.habitat) within their AC window to obtain unbiased density estimates:

$$ \psi_i = 1 - (1 - \psi_0)^{prop.habitat_i} \quad (4) $$

Where

$$ \psi_0 \sim \text{Uniform}(0,1) \quad (5) $$

The formulation of a Bayesian SCR model with LESS relies on proper indexing to specify the extent of AC and detector windows (Figure 4). R code for generating the indexes necessary to implement a SCR model with a LESS is provided in the Supporting Information Appendix S1 and S2.

## 2.3 | Simulation scenarios

### 2.3.1 | Population and survey characteristics

We used a 50 × 50 detector array (2,500 detectors located one distance unit (du) apart from each other). The spatial domain was defined as the area including the detectors and a buffer of 4 du (2σ, see below). We simulated two different population sizes (50 and 100 individuals) and assumed demographic closure (i.e., no recruitment emigration/immigration or death). Individual AC locations were drawn as a uniform random sample from the spatial domain. Following the recommendation by (Sun, Fuller, & Royle, 2014) for the choice of detector spacing relative to σ, we simulated binary detection data y using Eq. (6) with σ = 2, and $p_0 = 0.07$ leading to an average detection rate of 66% (range: 57%-78%) of alive individuals (N):

$$ y_{ij} \sim \text{Bernoulli} \left( p_0 \cdot \exp \left( \frac{-D_{ij}^2}{2\sigma^2} \right) \right) \quad (6) $$

<figure><img src="image_4.png" /><figcaption>FIGURE 3 Illustration of the local evaluation of the individual state-space (LESS) procedure in spatial capture-recapture (SCR). SCR with LESS involves using evaluation windows to restrict the area of the spatial domain used by each individual. The black area and small white dots represent the spatial domain and detectors, respectively. (a) Example of the placement of the activity center (AC) evaluation window (inner dark red square) and detector (outer paler red square) evaluation window centered on the centroid (triangle) of all detections of one individual. “Extension” represents the distance by which the detector window extends beyond the edge of the AC window. (b) Darker inner square evaluation windows delineate the areas within which ACs are located and lighter outer evaluation windows delineate the additional areas within which detections are considered. (c) A grid of AC and associated detector evaluation windows is established to accommodate a layer of augmented individuals. AC windows and associated detector window are shown in lighter shading for three example individuals. (d) Additional layers of AC and detector windows grids are superimposed to reach a desired level of augmentation</figcaption></figure>
<figure><img src="image_5.png" /></figure>

**FIGURE 4** JAGS model specification for the local evaluation of the individual state-space. The indexing allowing the local evaluation is highlighted in light gray. *xy.bounds* defines the AC evaluation window with an array of x and y coordinates for each individual. *n-detectors* is a vector of the number of detectors within the detector evaluation window associated with each individual. *detector.index* is a matrix representing the detector indexes included within the detector evaluation window of each individual. In practice, such local evaluation of the individual state-space requires constraining of: (1) the area within which *s*<sub>j</sub>, the individual AC, can be located, and (2) the detectors used to estimate the detection curve from the observed pattern of detections/non-detections (Figures 2 and 3). In addition to reducing the number of detectors where individual detections are considered possible, the local evaluation approach also reduces the domain over which individual ACs are likely to occur, further increasing computational efficiency

## 2.3.2 | Local evaluation of the state-space

We investigated the performance (see below) of SCR with LESS using different AC and detector evaluation windows widths. We used 3σ (6 du) and 5σ (10 du) as the width of the AC window (Figure 5). We then sequentially increased the width of the detector evaluation window, so that the detector window extended beyond the edge of the AC window by 1, 2, 3, and 4 times σ. This resulted in detector windows of different width according to the AC window chosen (Figure 5). We adjusted the number of layers of AC windows (corresponding to augmented individuals) to obtain >4× number of simulated individuals.

## 2.4 | Evaluation of model performance

### 2.4.1 | SCR key parameters

For reference, we fitted an SCR model without local evaluation. We then ran 100 simulations of each scenario and calculated the relative bias ($\text{RB} = \frac{1}{\hat{\theta}} \sum_{i=1}^{n} (\hat{\theta}_i - \theta)$) and the precision of $\hat{N}$, $\hat{\sigma}$ and $\hat{\rho}_0$ for each simulation scenario using the coefficient of variation

($CV = \frac{SD(\hat{\theta})}{\hat{\theta}} \times 100$) (Walther & Moore, 2005), where *n* is the number of iterations, *SD* is the standard deviation, *θ* is the true parameter value, and $\hat{\theta}$ the estimate of the parameter obtained from MCMC. In addition, we calculated the 95% credible interval coverage as the percentage of simulations where the 95% credible interval contained the true parameter value. We also recorded the computing time for each model fit (i.e., time necessary to run three MCMC chains in series on a single computer core). Because we used cores with different characteristics to run the different SCR models, computing times reported only serve as a crude estimate of the time used for model fitting.

### 2.4.2 | Density predictions

One of the main advantage of SCR methods is to derive spatially explicit estimates of density. We therefore quantified the deviation between the simulated and realized density maps produced using SCR (Milleret, Dupont, et al., 2018) models with and without LESS. We constructed true density maps by applying Eq. (1) (excluding $p_0$) to the true simulated AC locations of individuals and summing space use across all individuals
<figure><img src="image_6.png" /><figcaption>**FIGURE 5** Illustration of the different AC (in rows) and detector (in columns) evaluation windows widths used in the simulations to test the local evaluation of the individual state-space (LESS) in SCR model. The darker and lighter black areas represent the detector and buffer areas of the spatial domain. The darker and lighter red square represents the AC and detector evaluation windows, respectively. All values are expressed relative to σ. See Figure 3 for a description of the windows</figcaption></figure>

at the habitat grid cell level (1 × 1 du). To derive the predicted average space used, we used the uncertainty around the estimates in the posterior samples (location of ACs and σ) obtained from the Bayesian Markov chain Monte Carlo (MCMC) and summed predicted average space used of all individuals that were considered as part the population (z = 1). To compare the deviation between the shape of true and predicted density maps, we scaled both maps to sum to 1 and calculated mean relative error (MRE) in density as:

$$MRE = \left| \frac{D_j}{\sum_i^h \hat{D}_j} - \frac{D_j}{\sum_i^h D_j} \right| \quad (7)$$

where $\hat{D}_j$ is the predicted and $D_j$ the simulated density at cell j in a habitat raster consisting of h cells. We excluded the buffer area when calculating MRE. We then summarized the average MRE across all simulations for any given scenario.

## 2.5 | Application to the wolverine data

We fitted an SCR model with LESS to NGS data from the national monitoring program of wolverines in Norway (see description in Flagstad et al. (2004), Brøseth, Flagstad, Wärdig, Johansson, & Ellegren (2010) and Bischof, Gregersen, Brøseth, Ellegren, & Flagstad (2016)) to illustrate the local evaluation approach. The data consisted of 453 detections from 196 individually identified female wolverines collected using scat-based noninvasive genetic sampling between January and May 2012. We used a grid with a 2 km resolution and only retained as detectors those grid cells that were searched (i.e.,

search-encounter sampling; Russell et al., 2012) by the Norwegian Nature Inspectorate, which resulted in 17,266 detectors, covering a total area of approximately 70,000 km². Individual detections at any given detector were treated as a binary variable (Milleret, Dupont, et al., 2018).

We used AC evaluation windows of $5σ$ (the largest LESS restriction used in our simulation, $σ≈ 6$ km for females wolverines (Milleret, Dupont, et al., 2018)) and detector evaluation windows that extended by $2σ$ beyond the edges of the AC windows. The goal of the empirical analysis was to put the LESS approach to the test on a large-scale SCR problem, and we used a simple SCR model for this task (as described in section 2.1). Comprehensive and reliable density estimation of wolverine density would require a model that, among other things, accounts for heterogeneity in density and detectability, which is beyond the scope of the analysis presented here. To avoid misinterpretation of density and abundance estimates from our simplified analysis as actionable results with respect to population management, we do not provide absolute estimates, only report computation time and a map of relative density, to be interpreted with caution.

## 2.6 | Model fitting

We fitted Bayesian SCR models using Markov chain Monte Carlo (MCMC) with JAGS (Plummer, 2003) and *rjags* (Plummer, 2016) in R version 3.3.3 (R Core Team, 2017). After an adaptive phase of 1,000 iterations, we ran 3,000 iterations of three chains thinned by three. We considered models as converged when the Gelman-Rubin
statistics (*gelman.diag* function in coda package (Plummer, Best, Cowles, & Vines, 2006)) (Brooks & Gelman, 1998; Gelman & Rubin, 1992) was ≤1.1 and after visually inspecting trace plots for all monitored parameters. R and JAGS code for the different SCR models and simulations used are provided in Supporting Information Appendix S1 and S2, and list of priors used in Supporting Information Appendix S3.

# 3 | RESULTS

## 3.1 | Simulations

All 1800 models (with and without LESS) reached convergence after 3,000 iterations. Relative bias of SCR models with LESS generally decreased with increasing width of the AC evaluation window (Figure 6, Table 1). When using a detector evaluation window with the smallest extension beyond the AC evaluation window (1σ), *N̂* and *σ̂* tended to be slightly overestimated and *ρ̂*₀ underestimated, regardless of the width of the AC window (Figure 6, Table 1). However, as the extension increased (>1σ), *σ̂* tended to be underestimated and *ρ̂*₀ overestimated. Regardless of the scenario (N = 50 or 100), relative bias in *N̂* (<0.005), *σ̂* (=−0.01), and *ρ̂*₀ (<0.1) were lowest for an AC window that was equal to 5σ (10 du) and when detector evaluation window extended 2σ beyond the edges of AC window (width of the detector window = 18 du). MRE between true and predicted density surfaces was similar for SCR models with and without LESS (Table 1, Figure 7). With our survey and population characteristics, fitting SCR model with LESS (AC region = 5σ, extension between the detector and AC regions = 2σ) was between 37–57 times faster than fitting SCR models without LESS (Table 1).

## 3.2 | Wolverines

Using the LESS approach, we were able to fit a SCR model to wolverine NGS data over the entire range of the species in Norway in less than 22 hr. The resulting map of relative density is shown in Figure 8 (Supporting Information Appendix S4). We reemphasize that this analysis is a proof of concept serving the sole purpose of demonstrating the feasibility of using LESS to enable analysis of very large state-space problems using Bayesian methods.

# 4 | DISCUSSION

Spatial capture-recapture methods are now widely used to investigate a range of important spatial ecological processes, and to inform conservation and management actions (Royle et al., 2018). The emergence of efficient inventory techniques such as noninvasive genetic sampling and remote camera trapping has resulted in a substantial increase in the spatial scales of some monitoring projects. The challenge that has emerged is computational in nature: finding tractable modeling procedures that allow SCR methods to be applied over large spatial domains and make inferences about population-level processes. Our local evaluation method provides

<figure><img src="image_7.png" /></figure>

**FIGURE 6** Relative bias of spatial capture-recapture (SCR) model parameters with and without local evaluation of the individual state-space (LESS) for a simulated population size of 100 individuals. Relative bias plotted against the different widths of the AC evaluation windows and different detector extensions (i.e. the distance by which the detector window extends beyond the edges of the AC window, see Figure 5). AC window width and detector window extension are expressed relative to σ. Violins show kernel density (dots: mean) of the relative bias computed from the posterior distribution of three key SCR parameters (N̂, σ̂, and ρ̂₀) based on 100 simulations

a solution that produces unbiased inferences, while vastly reducing the computational burden of enormous spatial models, and in doing so allows large-scale Bayesian SCR models to be applied using a standard desktop in a fraction of the time required in the absence of LESS.

When using LESS in a Bayesian framework with data augmentation, our results suggest that there was virtually no bias in focal parameters when using an AC evaluation window width of 5σ and a detector evaluation window that extended by 2σ beyond the edge of the AC window (detector window width = 9σ). A detector window of 9σ covers most of the half-normal distribution defining the detection function (Figure 2). A 2σ extension of the detector window beyond the edges of
<table><caption>Table 1 Average relative bias, coefficient of variation, coverage of key parameters (N̂, σ̂, p̂₀), and average running time of SCR models with and without local evaluation of the state-space (LESS) from the simulation study</caption><thead><tr><th rowspan="2">AC windows width<br>detector window extension</th><th colspan="4">3</th><th colspan="4">5</th><th rowspan="2">Without LESS</th></tr><tr><th>1</th><th>2</th><th>3</th><th>4</th><th>1</th><th>2</th><th>3</th><th>4</th></tr></thead><tbody><tr><td colspan="10" style="text-align: left;">N = 100</td></tr><tr><td colspan="10" style="text-align: left;">N̂</td></tr><tr><td>RB</td><td>0.02</td><td>0.02</td><td>0.02</td><td>0</td><td>0.02</td><td>0</td><td>-0.02</td><td>0</td><td>0.01</td></tr><tr><td>CV</td><td>8.9</td><td>8.62</td><td>8.65</td><td>8.66</td><td>9.02</td><td>8.68</td><td>8.54</td><td>8.69</td><td>8.86</td></tr><tr><td>Coverage</td><td>0.94</td><td>0.95</td><td>0.89</td><td>0.96</td><td>0.91</td><td>0.94</td><td>0.92</td><td>0.93</td><td>0.94</td></tr><tr><td colspan="10" style="text-align: left;">σ̂</td></tr><tr><td>RB</td><td>0.02</td><td>-0.09</td><td>-0.1</td><td>-0.09</td><td>0.06</td><td>-0.01</td><td>-0.02</td><td>-0.02</td><td>0</td></tr><tr><td>CV</td><td>7.23</td><td>5.4</td><td>5.19</td><td>5.18</td><td>7.56</td><td>6.19</td><td>5.97</td><td>5.99</td><td>6.46</td></tr><tr><td>Coverage</td><td>0.93</td><td>0.57</td><td>0.47</td><td>0.59</td><td>0.86</td><td>0.94</td><td>0.95</td><td>0.94</td><td>0.94</td></tr><tr><td colspan="10" style="text-align: left;">p̂₀</td></tr><tr><td>RB</td><td>0.04</td><td>0.21</td><td>0.23</td><td>0.21</td><td>-0.05</td><td>0.05</td><td>0.08</td><td>0.06</td><td>0.02</td></tr><tr><td>CV</td><td>16.2</td><td>15.19</td><td>15.05</td><td>15.05</td><td>17.62</td><td>16.26</td><td>15.89</td><td>16.05</td><td>16.61</td></tr><tr><td>Coverage</td><td>0.97</td><td>0.83</td><td>0.76</td><td>0.83</td><td>0.9</td><td>0.97</td><td>0.92</td><td>0.96</td><td>0.95</td></tr><tr><td colspan="10" style="text-align: left;">Time (hr)</td></tr><tr><td>Mean</td><td>1.91</td><td>3.43</td><td>5.61</td><td>7.68</td><td>2.49</td><td>4.1</td><td>5.95</td><td>8.37</td><td>152.77</td></tr><tr><td colspan="10" style="text-align: left;">MRE</td></tr><tr><td>Mean*</td><td>1.363</td><td>1.371</td><td>1.376</td><td>1.394</td><td>1.373</td><td>1.352</td><td>1.361</td><td>1.358</td><td>1.355</td></tr><tr><td colspan="10" style="text-align: left;">N = 50</td></tr><tr><td colspan="10" style="text-align: left;">N̂</td></tr><tr><td>RB</td><td>0.04</td><td>0.05</td><td>0.03</td><td>0.03</td><td>0.04</td><td>0</td><td>0.02</td><td>0</td><td>0.05</td></tr><tr><td>CV</td><td>12.79</td><td>12.6</td><td>12.37</td><td>12.88</td><td>13.22</td><td>12.58</td><td>12.64</td><td>12.67</td><td>13.15</td></tr><tr><td>Coverage</td><td>0.93</td><td>0.91</td><td>0.97</td><td>0.96</td><td>0.96</td><td>0.9</td><td>0.92</td><td>0.94</td><td>0.94</td></tr><tr><td colspan="10" style="text-align: left;">σ̂</td></tr><tr><td>RB</td><td>0.01</td><td>-0.09</td><td>-0.11</td><td>-0.1</td><td>0.04</td><td>-0.01</td><td>-0.02</td><td>-0.02</td><td>0.01</td></tr><tr><td>CV</td><td>10.42</td><td>7.68</td><td>7.34</td><td>7.43</td><td>10.94</td><td>8.83</td><td>8.57</td><td>8.58</td><td>9.41</td></tr><tr><td>Coverage</td><td>0.95</td><td>0.79</td><td>0.67</td><td>0.71</td><td>0.92</td><td>0.97</td><td>0.93</td><td>0.95</td><td>0.91</td></tr><tr><td colspan="10" style="text-align: left;">p̂₀</td></tr><tr><td>RB</td><td>0.09</td><td>0.21</td><td>0.29</td><td>0.24</td><td>0.01</td><td>0.08</td><td>0.1</td><td>0.11</td><td>0.04</td></tr><tr><td>CV</td><td>23.11</td><td>21.62</td><td>21.21</td><td>21.65</td><td>25.23</td><td>23.04</td><td>22.74</td><td>22.84</td><td>24.06</td></tr><tr><td>Coverage</td><td>0.95</td><td>0.91</td><td>0.85</td><td>0.89</td><td>0.94</td><td>0.97</td><td>0.97</td><td>0.95</td><td>0.93</td></tr><tr><td colspan="10" style="text-align: left;">Time (hr)</td></tr><tr><td>Mean</td><td>0.92</td><td>1.76</td><td>2.85</td><td>4.04</td><td>1.38</td><td>2.3</td><td>3.49</td><td>4.48</td><td>128.92</td></tr><tr><td colspan="10" style="text-align: left;">MRE</td></tr><tr><td>Mean*</td><td>1.817</td><td>1.825</td><td>1.814</td><td>1.836</td><td>1.848</td><td>1.811</td><td>1.832</td><td>1.819</td><td>1.823</td></tr></tbody></table>

Notes. Results are presented for different AC evaluation window width and different detector evaluation window extensions (see Figure 5), expressed relative to σ. *MRE are expressed ×10⁻⁴.

the AC window corresponds to the general recommendations of habitat buffer size in SCR models (Royle et al., 2013). Using those settings in LESS, we measured up to 57 times gains in computing speed.

In SCR models, the computational burden increases rapidly with the number of detectors used (Milleret, Dupont, et al., 2018). The LESS approach, by using detector evaluation windows, reduces the number of detectors over which detection probability has to be

estimated for each individual. In our simulated example, individual detection probability had to be estimated for each of the 2,500 detectors when a SCR model was fitted without LESS. However, using the LESS approach and our recommended AC and detector evaluation windows widths (AC: 5σ, detector: 9σ), the maximum number of detectors for which individual detection probability had to be estimated was 324. Although the location of individual activity centers
<figure><img src="image_8.png" /></figure>

**FIGURE 7** Simulation-based comparison of true and SCR predicted densities. (a) Example of a true density (du²) from a simulated dataset (N = 100). (b) Predicted density maps obtained with a SCR model with and without local evaluation of the individual state-space (LESS). The local evaluation was performed using an AC evaluation window of 10σ with a 2σ extension of detector windows beyond the edges of AC windows. (c) Relative error between true (a) and predicted (b) density with a SCR model with and without LESS. The SCR model with LESS returns similar density surfaces compared to the SCR model without LESS. Density maps are shown excluding the buffer of the spatial domain

<figure><img src="image_9.png" /></figure>

**FIGURE 8** Map illustrating the relative density of female wolverines in 2012 in Norway estimated using a spatial capture-recapture (SCR) model applied to noninvasive genetic sampling data. National range-wide mapping was made possible by the implementation of a local evaluation of the individual state-space (LESS) in a SCR model during the model fitting which otherwise was not doable on a standard desktop machine. Due to the use of an overly simplistic model and likely violation of several model assumptions, the map is neither intended nor suitable for interpretation as an actionable result in terms of population management

is also constrained to a smaller area using the AC evaluation window, such a reduction in the number of detectors used for each individual likely explains the major speed gains with LESS. This means that increasing the size of the problem (e.g., higher number of detector,

larger spatial extent, or greater population size) will amplify the gains even further as demonstrated in the wolverine example. While we were unable to fit the wolverine SCR model for the entire Norwegian range of the species (>200,000 km²), the LESS approach allowed us
to reduce the maximum number of detectors evaluated per individual from 17,266 to 500, and fit the model in less than 22 hr.

Implementing the LESS in a Bayesian SCR framework is straightforward, with proper indexing to define the windows requiring the most care (Figure 4). Although the half-normal detection function represents a circular utilization of the space by individuals (Figure 2), we chose a square evaluation window for ease of indexing (Figure 3). This simplification did not seem to introduce additional bias.

Local evaluation is already possible in a maximum likelihood framework (oSCR, (Sutherland et al., 2017)) but remains rarely used or described (but see Sun, Fuller, Hare, & Hurst, 2017) and has yet to gain the attention it deserves. Conceptually, the approach used in oSCR is identical to our "2-window" approach, but instead of using square evaluation windows, oSCR uses circular evaluation windows. First, a "trim" value defines the width of a buffer around individual detections that identifies where ACs can be located. Then, an additional buffer (double the width of the first buffer) is used to identify the detection ranges of all possible ACs for a given individual.

The SCR model with LESS that we used to demonstrate local evaluation did not include any covariates to account for individual/ spatial heterogeneity in detection and space use. If detector-specific covariates were to be included, similar indexing as on the detection function should be employed. Ultimately, the width of the windows should be specific to the study system; an optimal trade-off between computation speed and reliability of prediction can be determined using sensitivity analysis. Customizable R code for simulation and model fitting is provided in the Supplementary information Appendix S1.

The use of data augmentation to estimate abundance in SCR is specific to Bayesian inferences (Royle et al., 2007, 2009). Although proven to be a robust tool to estimate abundance, dealing with data augmentation can be a challenge with more complex model formulation. For example, the correction that we applied to the inclusion parameter ($\psi_i$) as a function of the size of available habitat for each individual is specific to augmented individuals. In cases where individuals show a high degree of spatial aggregation within the study area, density of augmented individuals should be larger than the maximum observed density, to ensure that enough AC windows are available for augmented individuals to estimate density in areas with high individual density. Additionally, in the case of open population SCR models (Bischof, Brøseth, et al., 2016), steps would have to be taken to deal with individual movement. Under an open population SCR model where a dispersal kernel is explicitly defined, or for nonstationary activity centers (Royle, Fuller, & Sutherland, 2016), there exists a spatial parameter similar to $\sigma$ (dispersal $\sigma$) to redistribute potential ACs. The general rule of the LESS approach that restricts calculation where detection probability is >0 would also apply to where the relocation probability of an individual's AC is >0 (i.e., based on dispersal kernel function). As it stands, our approach does not accommodate for moving individuals because we defined static individual evaluation windows.

Ecological studies have an increasing need for methodological developments to analyze the ever-increasing size of spatially

explicit datasets and produce landscape, regional, and even global inferences about population state variables (Sutherland, Brambilla, Pedrini, & Tenan, 2016; Tenan, Brambilla, Pedrini, & Sutherland, 2017). The LESS approach presented here is a pragmatic redundancy reduction approach, as it avoids calculation that are unnecessary (i.e., where detection probability is close to 0). Although some studies have used such reduction to increase computational efficiency of spatial models (e.g., Latimer, Banerjee, Sang, Mosher, and Silander (2009), Gramacy (2016)), our approach could stimulate the development of more efficient model formulation that have a built-in correlation structure.

## 5 | CONCLUSION

SCR is a powerful (Royle et al., 2018), yet computationally demanding tool (Milleret, Dupont, et al., 2018). Incorporating LESS in SCR model opens the door to SCR application at large spatial scales, a prerequisite for comprehensive population-level conservation and management plans (Bischof, Brøseth, et al., 2016). Because the computational burden associated with the spatial component of SCR models can be considerably reduced using LESS, it will also be possible to develop computationally efficient models that include relevant ecological processes (e.g., survival, recruitment, movement; Chandler, Hepinstall-Cymerman, Merker, Abernathy-Conners, & Cooper, 2018) at large spatial scales. Generally, we encourage practitioners to use local evaluation when performing SCR at large spatial scales, whether using Bayesian or maximum likelihood inference (Sutherland et al., 2017).

## ACKNOWLEDGMENT

This work was funded by the Norwegian Environment Agency (Miljødirektoratet) and the Swedish Environmental Protection Agency (Naturvårdsverket). We thank the field staff from the State Nature Inspectorate and members of the public that collected the agency's large carnivore database Rovbase3.0 (rovbase.no).

## CONFLICT OF INTEREST

None Declared.

## AUTHOR'S CONTRIBUTION

C.M, P.D and R.B developed the concept and methodology. R.B conceived the idea of the local evaluation in the Bayesian SCR model with data augmentation. H.B and Ø.F coordinated wolverine data extraction and preparation. C.M led the analysis with help from P.D and R.B, and C.B. to run the models. C.M led the writing with contributions of P.D, C.S, C.B and R.B. All authors contributed critically to drafts of the manuscript and gave final approval for publication.
## DATA ACCESSIBILITY

Wolverine data and associated R script are available on DRYAD entry https://doi.org/10.5061/dryad.42m96c8 (Milleret, Dupont, et al., 2018).

## ORCID

Cyril Milleret ID https://orcid.org/0000-0002-8563-981X
Pierre Dupont ID https://orcid.org/0000-0002-7438-7995
Christophe Bonenfant ID https://orcid.org/0000-0002-9924-419X
Henrik Brøseth ID https://orcid.org/0000-0003-3795-891X
Chris Sutherland ID https://orcid.org/0000-0003-2073-1751
Richard Bischof ID https://orcid.org/0000-0002-1267-9183

## REFERENCES

Bischof, R., Brøseth, H., & Gimenez, O. (2016). Wildlife in a politically divided world: Insularism inflates estimates of brown bear abundance. *Conservation Letters*, 9, 122–130.

Bischof, R., Gregersen, E. R., Brøseth, H., Ellegren, H., & Flagstad, Ø. (2016). Noninvasive genetic sampling reveals intrasex territoriality in wolverines. *Ecology and Evolution*, 6, 1527–1536.

Bischof, R., Steyaert, S. M. J. G., & Kindberg, J. (2017). Caught in the mesh: Roads and their network-scale impediment to animal movement. *Ecography*, 40(12), 1369–1380. https://doi.org/10.1111/ecog.02801

Borchers, D. L., & Efford, M. G. (2008). Spatially explicit maximum likelihood methods for capture-recapture studies. *Biometrics*, 64, 377–385. https://doi.org/10.1111/j.1541-0420.2007.00927.x

Brooks, S. P., & Gelman, A. (1998). General methods for monitoring convergence of iterative simulations. *Journal of Computational and Graphical Statistics*, 7, 434–455.

Brøseth, H., Flagstad, Ø., Wärdig, C., Johansson, M., & Ellegren, H. (2010). Large-scale noninvasive genetic monitoring of wolverines using scats reveals density dependent adult survival. *Biological Conservation*, 143, 113–120. https://doi.org/10.1016/j.biocon.2009.09.012

Chandler, R. B. (2015). Retrieved from https://groups.google.com/forum/#!msg/spatialcapturereapture/NzqUovn8jF0/4Z4OzGRAAgAJ; context-place=forum/spatialcapturereapture

Chandler, R. B., Hepinstall-Cymerman, J., Merker, S., Abernathy-Conners, H., & Cooper, R. J. (2018). Characterizing spatio-temporal variation in survival and recruitment with integrated population models. *The Auk*, 135, 409–426. https://doi.org/10.1642/AUK-17-181.1

Efford, M. (2004). Density estimation in live-trapping studies. *Oikos*, 106, 598–610. https://doi.org/10.1111/j.0030-1299.2004.13043.x

Ergon, T., & Gardner, B. (2014). Separating mortality and emigration: Modelling space use, dispersal and survival with robust-design spatial capture-recapture data. *Methods in Ecology and Evolution*, 5, 1327–1336. https://doi.org/10.1111/2041-210X.12133

Flagstad, Ø., Hedmark, E., Landa, A., Brøseth, H., Persson, J., Andersen, R., ... Ellegren, H. (2004). Colonization history and noninvasive monitoring of a reestablished wolverine population. *Conservation Biology*, 18, 676–688. https://doi.org/10.1111/j.1523-1739.2004.00328.x-i1

Gelman, A., & Rubin, D. B. (1992). Inference from iterative simulation using multiple sequences. *Statistical Science*, 7, 457–511. https://doi.org/10.1214/ss/1177011136

Gramacy, R. (2016). IaGP: Large-scale spatial modeling via local approximate gaussian processes in R. *Journal of Statistical Software, Articles*, 72, 1–46.

Latimer, A. M., Banerjee, S., Sang, J. H., Mosher, E. S., & Silander, J. J. A. (2009). Hierarchical models facilitate spatial analysis of large data sets: A case study on invasive plant species in the northeastern United States. *Ecology Letters*, 12, 144–154. https://doi.org/10.1111/j.1461-0248.2008.01270.x

Meredith, M. (2016). Retrieved from http://www.mikemeredith.net/blog/2016/SECR_patchy_habitat_makeJAGSmask.htm

Milleret, C., Dupont, P., Bonenfant, C., Brøseth, H., Flagstad, Ø., Sutherland, C., & Bischof, R. (2018). Data from: A local evaluation of the individual state-space to scale up Bayesian spatial capture recapture. *Dryad Digital Repository*. https://doi.org/10.5061/dryad.42m96c8.

Milleret, C., Dupont, P., Brøseth, H., Kindberg, J., Royle, J., & Bischof, R. (2018). Using partial aggregation in spatial capture recapture. *Methods in Ecology and Evolution*, 9, 1896–1907.

Morin, D. J., Fuller, A. K., Royle, J. A., & Sutherland, C. (2017). Model-based estimators of density and connectivity to inform conservation of spatially structured populations. *Ecosphere*, 8, e01623.

Muneza, A. B., Linden, D. W., Montgomery, R. A., Dickman, A. J., Roloff, G. J., Macdonald, D. W., & Fennessy, J. T. (2017). Examining disease prevalence for species of conservation concern using non-invasive spatial capture-recapture techniques. *Journal of Applied Ecology*, 54, 709–717. https://doi.org/10.1111/1365-2664.12796

Plummer, M. (2003). JAGS: A program for analysis of Bayesian graphical models using Gibbs sampling. *Proceedings of the 3rd international workshop on distributed statistical computing* (Page 125).

Plummer, M. (2016). rjags: Bayesian Graphical Models using MCMC.

Plummer, M., Best, N., Cowles, K., & Vines, K. (2006). CODA: Convergence diagnosis and output analysis for MCMC. *R News*, 6, 7–11.

R Core Team (2017). *R: A language and environment for statistical computing*. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/

Royle, J. A., Chandler, R. B., Sollmann, R., & Gardner, B. (2013). *Spatial capture-recapture*. Amsterdam: Elsevier/Academic Press.

Royle, J. A., Dorazio, R. M., & Link, W. A. (2007). Analysis of multinomial models with unknown index using data augmentation. *Journal of Computational and Graphical Statistics*, 16(1), 67–85. https://doi.org/10.1198/106186007X181425

Royle, J. A., Fuller, A. K., & Sutherland, C. (2016). Spatial capture-recapture models allowing Markovian transience or dispersal. *Population Ecology*, 58, 53–62. https://doi.org/10.1007/s10144-015-0524-z

Royle, J. A., Fuller, A. K., & Sutherland, C. (2018). Unifying population and landscape ecology with spatial capture-recapture. *Ecography*, 41, 444–456. https://doi.org/10.1111/ecog.03170

Royle, J. A., Karanth, K. U., Gopalaswamy, A. M., & Kumar, N. S. (2009). Bayesian inference in camera trapping studies for a class of spatial capture-recapture models. *Ecology*, 90, 3233–3244. https://doi.org/10.1890/08-1481.1

Royle, J. A., & Young, K. V. (2008). A hierarchical model for spatial capture-recapture data. *Ecology*, 89, 2281–2289. https://doi.org/10.1890/07-0601.1

Russell, R. E., Royle, J. A., Desimone, R., Schwartz, M. K., Edwards, V. L., Pilgrim, K. P., & Mckelvey, K. S. (2012). Estimating abundance of mountain lions from unstructured spatial sampling. *The Journal of Wildlife Management*, 76, 1551–1561. https://doi.org/10.1002/jwmg.412

Schaub, M., & Royle, J. A. (2014). Estimating true instead of apparent survival using spatial Cormack-Jolly-Seber models. *Methods in Ecology and Evolution*, 5, 1316–1326. https://doi.org/10.1111/2041-210X.12134

Spiegelhalter, D., Thomas, A., Best, N., & Lunn, D. (2003). *WinBUGS version 1.4 users manual*. Cambridge: MRC Biostatistics Unit.
Sun, C. C., Fuller, A. K., Hare, M. P., & Hurst, J. E. (2017). Evaluating population expansion of black bears using spatial capture-recapture. *The Journal of Wildlife Management*, *81*, 814-823. https://doi.org/10.1002/jwmg.21248

Sun, C. C., Fuller, A. K., & Royle, J. A. (2014). Trap Configuration and spacing influences parameter estimates in spatial capture-recapture models. *PLoS One*, *9*, 1-9. https://doi.org/10.1371/journal.pone.0088025

Sutherland, C., Brambilla, M., Pedrini, P., & Tenan, S. (2016). A multiregion community model for inference about geographic variation in species richness. *Methods in Ecology and Evolution*, *7*, 783-791. https://doi.org/10.1111/2041-210X.12536

Sutherland, C., Fuller, A. K., & Royle, J. A. (2015). Modelling non-Euclidean movement and landscape connectivity in highly structured ecological networks. *Methods in Ecology and Evolution*, *6*, 169-177. https://doi.org/10.1111/2041-210X.12316

Sutherland, C., Royle, A., & Linden, D. (2017). oSCR: Multi-session sex-structured spatial capture-recapture models.

Tenan, S., Brambilla, M., Pedrini, P., & Sutherland, C. (2017). Quantifying spatial variation in the size and structure of ecologically stratified communities. *Methods in Ecology and Evolution*, *8*, 976-984. https://doi.org/10.1111/2041-210X.12719

Walther, B. A., & Moore, J. L. (2005). The concepts of bias, precision and accuracy, and their use in testing the performance of species richness estimators, with a literature review of estimator performance. *Ecography*, *28*, 815-829. https://doi.org/10.1111/j.2005.0906-7590.04112.x

## SUPPORTING INFORMATION

Additional supporting information may be found online in the Supporting Information section at the end of the article.

**How to cite this article:** Milleret C, Dupont P, Bonenfant C, et al. A local evaluation of the individual state-space to scale up Bayesian spatial capture-recapture. *Ecol Evol*. 2019;9:352-363. https://doi.org/10.1002/ece3.4751