## Introduction

Capture–recapture models that accommodate auxiliary spatial information in the form of locations of capture are a relatively new development in ecological statistics (Efford 2004; Borchers & Efford 2008; Royle & Young 2008; Efford, Dawson & Borchers 2009; Royle *et al.* 2009; Gardner *et al.* 2010a,b; Borchers 2011; Kéry *et al.* 2011). Despite their recent development, such models show great promise in addressing a large number of inference problems from spatial arrays of capture devices including camera traps, mist nets, DNA data and other methods of obtaining spatially indexed individual encounter data. Most of the current methodology deals explicitly with the situation where encounter locations represent fixed points in space (i.e. ‘traps’), which is typical of most designed studies aimed at employing capture–recapture methods.

Nevertheless, in many studies, encounter information is obtained by what can best be described as opportunistic encounter methods, where encounters do not arise from fixed arrays of detector devices or traps but rather from surveyors searching space by vehicle or on foot along some sort of transect. Thus, detections are made in continuous space and not restricted to discrete locations determined by locations of traps or other devices. One example was considered by Royle & Young (2008). In their study, crews searched a well-defined plot and encountered individuals, noting the location where each individual was captured. Royle & Young developed a spatial capture–recapture model under the assumption of a uniform search intensity. That is, while the model did not require that detection was perfect, it was assumed that detection probability was constant within the prescribed survey region. In this study, we develop a model for a situation in which the search intensity within a study area is not uniform in space. A prototypical kind of method has a surveyor walking an arbitrary path through a study plot and locating individuals, noting their coordinates, uniquely marking them, and then releasing them. Subsequent samples, perhaps along the same path, or perhaps not, yield recaptures of individuals and new captures of individuals that are marked also. We assume that the path walked by the surveyor can be characterized by line segments, such as produced by a GPS device. We refer to these methods as ‘search-encounter’ methods, and the objective of this study is to describe a modeling and inference framework for data obtained by such methods.

Our strategy for constructing the model is to develop a hierarchical model for the observations conditional on the outcome of an underlying stochastic movement process (i.e. individual locations), which itself depends on the outcome of another stochastic process describing the distribution of individual activity (home range) centres. This concept of parameterizing the model in terms of a home range centre is the cornerstone of all existing spatial capture–recapture models (Efford 2004; Borchers & Efford 2008; Gardner *et al.* 2010a,b; Royle & Young 2008), whereas conditioning on the outcome of a movement process has previously only been considered by Royle & Young (2008). Encounter probability is parameterized to depend on an individual's location during the survey, and the configuration of the surveyed path. In particular, if an individual's location at the time of the surveys is relatively closer to the surveyed line then the individual has a higher probability of being encountered. The model we develop extends that of Royle & Young (2008) and also existing distance sampling models (e.g. Borchers, Zucchini & Fewster 1998) to accommodate novel spatial sampling designs.

One type of survey that motivated the development of the model described in this study is the use of dogs to locate scat of carnivores (C. Thompson, unpublished data). In such surveys, dog teams search an area and collect scat, from which individual identity is determined in the laboratory from DNA. Similarly, in a survey for a large forest grouse in Switzerland (P. Mollet *et al.*, unpublished data), forest fragments were surveyed for scat by crews on foot after snowfall. Search-encounter surveys are also commonly used to sample herptile (Hall, Henry & Bunck 1999; Royle & Young 2008) and bird (Schmid, Zbinden & Keller 2004; Kéry & Royle 2010) populations.

In the next section, we provide a more formal description of the sampling situation along with the approach to formulating the model. A formal development of our spatial capture–recapture model for search-encounter data is given in “Hierarchical model”. In “Bayesian analysis by MCMC”, we describe a Bayesian analysis of this model using MCMC methods. Using data augmentation (Royle, Dorazio & Link 2007), the model is easily implemented in WinBUGS (Appendix S1). In addition, we have written custom R code for carrying out the analysis (Appendix S2). In “ Analysis of the MHB data”, the model is applied to data from the Swiss Breeding Bird Survey MHB.