Using partial aggregation in spatial capture recapture

Spatial capture–recapture (SCR) models are commonly used for analysing data collected using noninvasive genetic sampling (NGS). Opportunistic NGS often leads to detections that do not occur at discrete detector locations. Therefore, spatial aggregation of individual detections into fixed detectors (e.g., centre of grid cells) is an option to increase computing speed of SCR analyses. However, it may reduce precision and accuracy of parameter estimations. Using simulations, we explored the impact that spatial aggregation of detections has on a trade‐off between computing time and parameter precision and bias, under a range of biological conditions. We used three different observation models: the commonly used Poisson and Bernoulli models, as well as a novel way to partially aggregate detections (Partially Aggregated Binary model [PAB]) to reduce the loss of information after aggregating binary detections. The PAB model divides detectors into K subdetectors and models the frequency of subdetectors with more than one detection as a binomial response with a sample size of K. Finally, we demonstrate the consequences of aggregation and the use of the PAB model using NGS data from the monitoring of wolverine (Gulo gulo) in Norway. Spatial aggregation of detections, while reducing computation time, does indeed incur costs in terms of reduced precision and accuracy, especially for the parameters of the detection function. SCR models estimated abundance with a low bias (<10%) even at high degree of aggregation, but only for the Poisson and PAB models. Overall, the cost of aggregation is mitigated when using the Poisson and PAB models. At the same level of aggregation, the PAB observation model out‐performs the Bernoulli model in terms of accuracy of estimates, while offering the benefits of a binary observation model (less assumptions about the underlying ecological process) over the count‐based model. We recommend that detector spacing after aggregation does not exceed 1.5 times the scale‐parameter of the detection function in order to limit bias. We recommend the use of the PAB observation model when performing spatial aggregation of binary data as it can mitigate the cost of aggregation, compared to the Bernoulli model.

At their core, SCR models describe the distribution of latent activity centres (AC; centroid of an individual's activity during the time of sampling) of individuals in a population from the spatial configuration of individual detections and nondetections. SCR models couple a spatial point process model describing the spatial distribution of individual ACs with an observation model that describes the relationship between detection probability at detectors (see below for definition) and the distance from the AC. In SCR, spatial detections of individuals can be derived from a multitude of methods, from physical capture and marking, to genetic, acoustic or visual/photographic detections. These detections occur at so-called traps or, more generally, detectors. Depending on the data collection methods, detections may be associated with the point locations of physical detectors or detection devices, but could also refer to transects, irregular or gridded search areas (Efford, Borchers, & Byrom, 2009;Efford, Dawson, & Borchers, 2009;Royle, Kéry, & Guélat, 2011;Royle et al., 2014).
Spatial capture-recapture surveys, due to their spatial dimension, yield extensive detection histories (i.e., detections/nondetections of every individual at every detector). This, in turn, makes the analysis of SCR data computationally intensive (e.g., computation time), compared with nonspatial CR. This is especially true if surveys cover large areas and/or detections are recorded at high spatial resolution. For example, search-encounter methods (by foot, car or some sort of transects) generate detections from uniquely identified individuals (e.g., NGS; noninvasive genetic sampling) in a continuous space, which may result in large datasets when data are maintained at a high spatial resolution. Large SCR datasets might also concern users that wish to conduct SCR analysis with several thousands of detectors (e.g., camera traps network over large study areas). This study was motivated by our own challenge in an ongoing large carnivore monitoring programme in Scandinavia, where we aim to estimate density of wolves (Canis lupus), bears (Ursus arctos) and wolverines (Gulo gulo) across two countries (Norway and Sweden) spanning >700,000 km 2 , using NGS data from several thousand individuals over >10 years of data collection.
The most straightforward way of coping with such large data quantities is to use some form of data summarization through spatial aggregation. For example, NGS data collected using searchencounter surveys result in detection locations in continuous space.
As an alternative to modeling the continuous space search process, it is convenient to define pseudo-detectors to be the centres of grid cells of some prescribed size and then associate each detection to the closest grid cell centre (i.e., aggregation of detections to grid cells, Russell et al., 2012;. While aggregation has the benefits of reducing the computation burden, it comes at a cost, as some information is lost in the process. When aggregating detections over grids, Russell et al. (2012) found that estimates of abundance seems to be relatively robust to the choice of grid cell size. This suggests that one could use a relatively coarse grid cell size, thereby reducing the number of detectors and increasing computing speed. From a design standpoint, there are general guidelines to keep detector spacing below a certain level relative to the home range size of studied species (see Royle et al., 2014;Sun, Fuller, & Royle, 2014). However, to our knowledge, there exists no guidelines to aggregate detections based on a formal quantification of the costs and benefits of aggregation in SCR analyses.
The two most common observation models used in SCR are the Poisson (i.e., count data) and the Bernoulli (i.e., binary data) (Bischof et al., 2017;Blanc, Marboutin, Gatti, & Gimenez, 2013;Muneza et al., 2017;Royle et al., 2014). The choice of model mostly depends on our understanding of the underlying observation process Royle et al., 2014). For example, when it is possible for the number of detections at a detector per occasion to be >1, then a Poisson model (or negative binomial) may be appropriate . Therefore, the type of data and the choice of observation model dictate the outcome of spatial aggregation of individual detections and the amount of original information preserved. Count models, such as Poisson models for detection frequency data, permit summing of individual detections across spatial units without discarding any detections. However, spatial aggregation for binary models is liable to result in a loss of information as all but the first detection of an individual within a given spatial unit are ignored.
This study has two objectives: (a) to provide quantitative information about the consequences of spatially aggregating individual detections over detectors, leading to practical guidelines for users, and (b) to introduce a novel approach-the partially aggregated binary (PAB) observation model-which reduces the loss of information arising from simple spatial aggregation of binary data through the use of a Binomial process. Although the possibility of spatially aggregating detector-level detections to form a Binomial response has been mentioned earlier (Efford, Borchers, & Mowat, 2013;Efford, Dawson, et al., 2009), to our knowledge it has neither been formalized, nor its costs and benefits formally quantified.
Using simulations, we systematically tested the effect of increasing spatial aggregation on parameter estimates using the Poisson (counts of detections of individuals), the Bernoulli (binary detections of individuals), and the PAB observation models. We simulated detections of individuals at a fine spatial scale (i.e., with a high number of detectors relative to home range size) and then aggregated detections over increasingly larger grid cells, thereby reducing the number of detectors (Figure 1). This allowed us to mimic the process that the user may follow in order to balance spatial resolution and computing speed. We then fitted SCR models to each simulated scenario and evaluated their performance (precision and bias), as well as their use of the available information and computational speed. Finally, we showcase the application of the PAB model with an empirical example: density estimation using noninvasive genetic sampling of the wolverine in Norway.

| Basic spatial capture-recapture model
The observation process describes the relationship between an individual's detection probability at a given detector and the distance D i,j between detector j and individual i's AC (latent variable). In our example, we considered that a detector represents any location at which an individual can be detected. We assumed that ACs were uniformly distributed within the region under study. A commonly used detection function is the half-normal, describing the probability p i,j of detecting individual i at detector j where p 0 is the expected detection probability at the AC location. The scale parameter σ can be directly linked to home range size  in cases where the shape of the detection function arises from the utilization distribution (home range) of the study organism. More generally, σ is related to the extent of space used over the period of study. In addition, σ could also determine the distance from which acoustic signals can be detected . We assumed homogeneity of the parameters of the detection function across individuals and the region. (1) (2) y i,j ∼ Bernoulli (p i,j ) F I G U R E 1 Conceptualization of spatial aggregation of detectors (represented by centroids of grid cell) with the application of a larger regular grid (aggregated grid/primary grid) to the original gridded detector (original grid). It illustrates the spatial detection of one individual (filled black diamond: activity centre) after applying Equation 7. Original detection histories before spatial aggregation are represented in the first column (No (1)), with increasing aggregation (4, 9, 16, and 36 cells) from left to right. The three different observation models considered in the analysis are shown in rows: Poisson for count (top), Bernoulli (middle) and partially aggregated binary (PAB, bottom) for binary data. The Bernoulli and PAB models are identical in the absence of aggregation. The PAB model allows for spatial aggregation of binary data without complete loss of all individual detection events at the original grid level. For illustration, the number of individual detections retained at the same detector (the 15th detector) is shown for each model type at maximum aggregation where λ i,j , the mean number of detections of individual i at detector j, is also described using the half-normal detection function: where λ 0 is the expected number of detections at the AC.

| The partially aggregated binary observation model
Spatial capture-recapture studies have used Binomial observation models as an approach to accommodate multiple temporal binary capture occasions (Efford, 2011;Royle, Karanth, Gopalaswamy, & Kumar, 2009). Using PAB, we adapted this approach to space by converting original detectors into multiple spatial binary detec- This partial aggregation may be an efficient alternative to an aggregation following a Bernoulli model because it reduces the number of detectors while retaining more information about individual detections at each aggregated detector.

| SCR simulations
We simulated SCR data on a region S represented by a square polygon divided into 24 × 24 equal sized grid cells ( Figure 2). For the purposes of the simulations, the centre of each of the resulting 576 cells represented a detector, with a detector spacing of 1 distance unit. We also considered a buffer around the polygon equivalent to two times σ to yield unbiased density estimates ( To simulate spatially explicit detections of individuals, we set the capture probability of each individual and each detector as a function of the distance between its activity centre and the detectors using a half-normal detection function (Equation 1). We then created detection histories y for individual i at detector j by sampling from a Poisson distribution for a single temporal occasion.

| Spatial aggregation
Once individual detections were obtained at the original highresolution detector grid (original grid, Figure 1 top-left panel), we aggregated individual detections over a larger spatial unit by aggregating detectors (i.e., cells) over 4, 9, 16, and 36 cells of the original grid. This resulted in new grids (aggregated grids) with a corresponding detector spacing of 2, 3, 4, and 6 distance units which We summed the number of detections over aggregated grid cells (n.cells) when aggregating the capture history for the Poisson model. Therefore, the mean of the Poisson distribution of λ 0 becomes a function of the number of aggregated cells after aggregation. We estimated the "effective" λ 0 as n.cells* λ 0 , so λ 0 can be compared among aggregation level. For the simulation sets without spatial aggregation, n.cells was set to 1. Additionally, because our "raw" data were simulated using a Poisson distribution (counts of detections), we used a link from the Poisson model to the Bernoulli model  to obtain the probability of observing a count greater than 0 for the Bernoulli and PAB models:

| Simulation scenarios
The scale parameter σ was set to 2 spatial grid units for all individuals, twice the minimum distance between two detectors (detector spacing) in the highest detector grid resolution (original grid). To evaluate the response of SCR models to different combinations of population and survey characteristics, we simulated populations characterized by a low (density = 0.05 per cell; N = 50) and high density of individuals per grid cell (density = 0.1 per cell, N = 100). We used 0.1 and 0.25 as baseline expected number of detections λ 0 for all detectors to yield a lower (~60%) and higher (~80%) proportion of N being detected at least once. At the original scale, aggregation was set to 4, 9, 16, and 36 cells which corresponded to 1, 1.5, 2, and 3 times σ (Figure 1).

| Data augmentation
We used data augmentation (Royle, Dorazio, & Link, 2007) to obtain an estimate of abundance (Kéry & Schaub, 2011). We augmented the dataset, so that the sum of the number of detected and augmented individuals was always equal to five times the number of simulated individuals. We associated a latent indicator z i to every individual that reflected the probability ψ of an individual to be a member of the population. We defined z i as a binary variable equal to 1 when an individual was a member of the population and 0 otherwise. We then obtained abundance (N) by summing up vector z.

| Model fitting
We fitted SCR models in a Bayesian framework using Markov chain Monte Carlo (MCMC) to 100 simulations for each combination of parameters. We implemented all analyses using JAGS (Plummer, 2003) with the package rjags (Plummer, 2016) in R version 3.3.3 (R Core Team, 2017). We ran 3,000 iterations in three chains after an adaptive phase of 1,000 iterations and thinned, so that every third iteration was retained. Models were considered to have reached convergence when the Gelman-Rubin diagnostic value gelman.diag function in coda package (Brooks & Gelman, 1998;Gelman & Rubin, 1992;Plummer, Best, Cowles, & Vines, 2006) for all parameters fell below 1.1 for ≥1,000 consecutive iterations. JAGS codes for the different SCR models and simulations used are provided in Supporting Information S1 and S2. Priors and initial values are listed in Supporting Information S3, Table S3.1.

| Evaluating the performance of the models
We evaluated the performance of each SCR model in estimating abundance (N) and the parameters of the detection function (σ and λ 0 ). We quantified the relative bias (RB = 1 θn ∑ n i=1 (θ i −θ)) and the precision using the coefficient of variation (CV = SD(θ) θ × 100) (Walther & Moore, 2005), where n is the number of iterations, SD is the standard deviation, θ is the true and θ is the estimate of the parameter obtained from MCMC. In addition, we calculated the 95% credible interval coverage as the percentage of simulations where the credible interval contained the true value. As a measure of convergence speed, we recorded the average number of iterations following the adaptive phase after which the Gelman-Rubin diagnostic value fell below 1.1 for ≥1,000 consecutive iterations. To quantify computing time for each scenario, we ran 10 iterations for 20 different simulations of each scenario on the same computer (Intel(R) Core(TM) i7-7700K CPU 4.20GHz with 62GB of ram).

| Modelling
Because male wolverines tend to have larger home ranges than females (Bischof, Gregersen, et al., 2016;Persson, Wedholm, & Segerström, 2010), we fitted separate models for males and females, with a sex-specific buffer of 17 km for males and 10 km for females (i.e., approximately 2σ, as revealed by preliminary analyses). Using the PAB model, we could record the number of active original grid cells K for each aggregated grid cell. We ran 5,000 iterations of three chains after an adaptive phase of 1,000 iterations with a thinning rate of three. We considered parameter estimates from the Bernoulli model at the original grid cell size (i.e., high resolution) as the reference estimates. We then explored differences between mean parameter estimates and confidence intervals provided by the different SCR models at different level of aggregation. As during the simulations, we recorded convergence, computing speed and number of detections associated with the Bernoulli and PAB models.

| Simulations
We ran 5,600 different models corresponding to 56 unique simulated scenarios. All models converged and 1,000 iterations were F I G U R E 3 (a) Representation of the study area (within white borders; Troms, Norway) and noninvasive genetic samples from wolverines collected in 2012 (dots, red = female, blue = male) used to compute spatial capture-recapture (SCR) models. Grey lines represent searchtracks. (b) Configuration of detectors after different degrees of spatial aggregation. Aggregation 1 shows the detectors at the original grid level (detector spacing = 2 km; Number of detector = 4,551). Aggregation 16 and 64 shows detectors after aggregating grids over 16 and 64 original grid cells, and corresponds to detector spacing of 8 (658 detectors) and 16 km (233 detectors), respectively. (c) Estimated average density maps of female wolverines per 25km 2 at the original grid cell size obtained using SCR model (Aggregation1; Bernoulli) and after aggregating over 16 and 64 original grid cells using the Bernoulli and partially aggregated binary models. The density estimates presented for wolverines in Troms must be interpreted with caution, as our SCR models represent a strong simplification of the reality sufficient (Gelman-Rubin <1.1) to obtain convergence for 99.9% of the models.

| Parameters of the detection function (σ, λ 0 )
Regardless of the type of observation model used, spatial aggre-

| Abundance (N)
Spatial capture-recapture models estimated N with no major bias and imprecision after aggregation when using the Poisson and

| Scenarios
We observed similar patterns among all simulation scenarios.
However, bias was higher at lower detection rates, and this pat-

| The wolverine
A maximum of 1,024 iterations were sufficient to obtain convergence for all models. Akin to the simulation results and despite large confidence intervals, aggregation increased the σ estimates for wolverines ( Figure 6, Supporting Information S3, Table S3.3). The increase in estimated σ with aggregation was less pronounced for the PAB compared to the Bernoulli model and stronger for females compared to males (Figure 6, Supporting Information S3, Table S3.3). At the original grid cell size, σ for females was estimated to be 3.73 km with a 95% CI (3.17-4.44) that overlapped with the mean estimates obtained after aggregating detections over 64 cells for the PAB (4.38; 95% CI = 3.71-5.24) but not for the Bernoulli model (5.18; 95% CI = 4.05-6.66). N estimates had large uncertainty but were more stable with aggregation for males than for females ( Figure 6, Supporting Information S3, Table S3.3).

| D ISCUSS I ON
Data aggregation can significantly reduce computation time of SCR models but, as our study demonstrates, this comes at a cost.
Decreasing spatial resolution of input data leads SCR models to estimate parameters with reduced precision and increased bias in cases where the detections are modelled as the result of a Poisson process and models that use a Bernoulli observation process. The increase in bias with coarser input detector grids is particularly conspicuous for the latter type of model, presumably because spatial aggregation of detectors can lead to a serious loss of information (i.e., individual detections).
Although SCR studies have used Binomial observation models as an approach to accommodate for multiple temporal binary capture occasions (Efford, 2011;Royle et al., 2009)

| Aggregation
Ideally, spatial aggregation of detections would not be necessary because SCR analysis could use information at its original scale and contents. However, sampling methods such as NGS, can produce data in such quantities and recorded at such a fine spatial scale that some kind of data aggregation of detections within grids might be necessary (Russell et al., 2012 but see Royle, Kéry, et al., 2011). Datasets intended for SCR analysis may have large spatial and temporal extent, therefore reducing the number of detectors through aggregation is an option to cut down on computing times. The need for computationally efficient alternatives may be particularly important as the complexity of SCR models increases, such as open population SCR models Chandler & Clark, 2014). might not always be the outcome of space usage but likely the outcome of more complex behaviors . Because the PAB model also uses binary detection data, we could demonstrate its use to analyse our noninvasive genetic samples from wolverines.
Indeed, the PAB model is a natural extension of the Bernoulli model since it makes use of more of the raw data and use binary detections.
One of the strengths of SCR models over nonspatial CR models is the ability to yield spatially explicit predictions of abundancedensity surfaces-for a study region. Although, estimates of overall abundance remained relatively unaffected by aggregation, at least for the Poisson and PAB observation models, the bias in the parameters of the detection function (σ, λ 0 ) suggests that high spatial aggregation of detectors may noticeably impact the degree of correspondence between predicted density surfaces and the true distribution of activity centres (Figure 3c and Supporting Information S5, Table S5.1).

| Recommendations
Our results suggest that when possible, the Poisson and PAB models should be favoured over the Bernoulli model when performing spatial aggregation. Using the PAB and Poisson models, positive bias in σ remains below an acceptable level (<10%) when spatial aggregation does not exceed areas larger than 1.5 times the σ of the studied species. However, positive bias in abundance (N) remains below an acceptable rate (<10%) even at high level of aggregation (up to three times σ). Our results also suggest that an overestimation and higher uncertainty in N are expected in study systems where individual detection probability is low (i.e., <60% of N detected), as it is often the case for elusive and/or rare species.
During field sampling, we recommend recording detections and search effort at the finest possible spatial resolution. While a large part of this fine scale information is lost after aggregation using the Poisson and the Bernoulli models, we can still make use of it with the PAB model. In our empirical example, we could account for the search effort in each grid, by using the number of original grid cells searched for each aggregated grid cell as a sample of size K in the binomial model (Equation 5). This can help account for heterogeneity in search effort that would otherwise be lost when aggregating over larger grid cells. We suggest that original grid resolution of the PAB model can be as high as desired, because a high resolution will mitigate the loss of detection with aggregation. However, according to the characteristics of the study-system the user should make sure that the resolution of the original grid cells is large enough to account for independence in the detection events, as explained above.
Determining the appropriate detector configuration before field sampling is essential in order to obtain reliable estimates of density using SCR models (Sollmann, Gardner, & Belant, 2012;Sun et al., 2014). However, due to constraints in field data collection or the type of sampling used (e.g., opportunistic sampling), detector arrays might not always be regularly spaced such as in our simulations. For our empirical study on wolverines, we tested the effect of spatially aggregating detections from irregularly located detectors (i.e., based on search tracks). Using this particular example, we demonstrated the cost of spatial aggregation on parameter estimation for individuals having small (female) and large (male) home range size. The effect of aggregation on σ was stronger for individuals having a smaller home range size. Accordingly, abundance estimates for males were more stable with aggregation than estimates obtained for females.
However, it is important to note that comparing abundance estimates when aggregating irregularly searched grids is challenging because aggregation tends to artificially increase the area covered by detectors (Figure 3b). We therefore recommend additional simulation studies to explore the effect of aggregation under different detector configuration scenarios or increased realism on the ecological and observation models (e.g., individual heterogeneity detection parameters).

| CON CLUS IONS
Although the computational burden of SCR is still substantial, our results show that spatially aggregating detections can be a relatively easy way to significantly reduce computational burden. At the same time, aggregating too coarsely, relative to the focal species' home range size, could lead to unacceptable compromises in terms of parameter precision and accuracy. We advise against performing large spatial aggregation using the Bernoulli model, as it can lead to highly biased parameter estimates, especially when detectability is low and few individual detections are available. On the other hand, the PAB model introduced here, can help investigators achieve the benefits of spatial aggregation in terms of computation speed, while mitigating the loss in parameter precision and accuracy associated with aggregation of binary data. Spatial aggregation could be especially helpful for studies with a large spatial extent and for complex models.

ACK N OWLED G EM ENT
This work was funded by the Norwegian Environment Agency (Miljødirektoratet) and the Swedish Environmental Protection Agency (Naturvårdsverket). We thank the field staff and members of the public that contributed to collect data for the Scandinavian large carnivore database Rovbase3.0 (rovbase.no). We thanks C. Bonenfant for help with running the models. Any use of trade, product, or firm names is for descriptive purposes only and does not imply endorsement by the U.S. Government. wrote the first draft of the manuscript with help from P.D. and R.B. All authors contributed to subsequent drafts and gave final approval for publication.

DATA ACCE SS I B I LIT Y
NGS wolverine data and associated R script are available on Dryad Digital Repository https://doi.org/10.5061/dryad.pd612qp (Milleret et al., 2018).