## Introduction

Capture–recapture models are widely used in ecology and wildlife management to estimate the size of animal populations (Williams, Nichols & Conroy 2002). A common situation in many ecological studies concerns the case where the population is divided into spatially- or temporally referenced subpopulations (Converse & Royle 2012). This is a frequent characteristic of animal population studies because multiple units are necessary to obtain a sufficient sample of individuals. In addition, replication is often crucial to the scope of inference. For example, ecologists are interested in understanding how populations respond over time and space to variation in processes determining population dynamics, such as habitat quality; a special case is the experiment or quasi-experiment. Such studies entail replication of capture–recapture experiments in space and time. A case in point is a typical study of how small-mammal populations respond to forest management (Converse, White & Block 2006).

An important problem in interpreting estimates of *N* from capture–recapture studies is that, in most practical applications, the area over which individuals are exposed to trapping is not well defined (Karanth & Nichols 1998; Efford 2004). As a result, the biological meaning of estimates of *N* is usually unclear – does apply to 1 ha, 5 ha or 10 ha? Lacking a mechanism to enforce formal closure on a land area, there is no rigorous method for converting estimates of *N* from ordinary capture–recapture models to density. In a related fashion, when trying to estimate treatment effects, if the size of animals’ home ranges varies across replicates (which may result from the treatments themselves, Converse, White & Block 2006), the effective area sampled essentially varies, and inference based on the abundance estimates is dubious. However, a number of methods have been developed that attempt to convert estimates of *N* to estimates of density. For example, the conventional approach (Karanth 1995; Karanth & Nichols 1998) involves using ordinary (non-spatial) closed population capture–recapture models (Otis *et al*. 1978) to estimate population size, *N*, and then dividing that by a quantity asserted to represent ‘effective sample area’ or similar. This is obtained by buffering the trap array by some prescribed function of home range radius (e.g. mean maximum distance moved; Wilson & Anderson 1985).

Recently, more formal approaches to estimating density based on spatial capture–recapture (SCR) methods have been developed (Efford 2004; Borchers & Efford 2008; Royle & Young 2008; Borchers 2012). SCR models regard individual location explicitly in the model, as a latent individual covariate, and model the encounter probability between individual activity centres and specific traps as a function of distance. In doing so, SCR models accommodate heterogeneity in encounter probability due to the juxtaposition of individuals with traps, and, by associating individuals with explicit locations, provide a framework for direct inference about density.

Despite increasing interest in SCR models, most extant applications arise from a study of a single population. However, capture–recapture studies, in many cases, are based on a number of sampling arrays spread out geographically over an experimental region and replicated in time. For example, this is typical of small-mammal trapping (Efford *et al*. 2005) as well as some large-scale monitoring programmes based on camera traps (Karanth & Nichols 2002; Jhala, Qureshi & Gopal 2011) and constant-effort mist-netting schemes (DeSante *et al*. 1995). Therefore, integrating data from stratified capture–recapture studies is often paramount to the main inference objective. Here, we provide a formal Bayesian SCR framework for experimental and other situations involving replicated grids of traps or encounter devices. This extends the hierarchical capture–recapture models (Converse & Royle 2012) to accommodate SCR models. We adopt a Bayesian estimation and inference framework and provide implementations in the freely available software **R** (R Core Team 2012) and JAGS (Plummer 2009). We provide an application involving a small-mammal trapping study from Converse, White & Block (2006).