## Introduction

Demographic trait estimation has been greatly facilitated by the monitoring of individually marked animals over time, via live recaptures/observations and dead recoveries (hereafter all termed ‘recapture’), providing quantitative information for wildlife conservation and management. Mathematical mark–recapture models based upon these encounters were originally devised for the study of abundance and survivorship (Cormack 1964; Jolly 1965; Seber 1965) and subsequently modified to address a broader variety of ecological questions (e.g. Pollock *et al*. 1990; Lebreton *et al*. 1992). The multi-state model structure (Arnason 1972, 1973; Schwarz *et al*. 1993), in particular, permits the estimation of additional parameters including recruitment (Pradel 1996), breeding probability (Schwarz & Arnason 2000), harvest mortality (Calvert & Gauthier 2005), and population growth rate (Caswell & Fujiwara 2004). The leading software package for implementation of these models is the program MARK (White & Burnham 1999), and related methods continue to be developed (e.g. Williams, Nichols & Conroy 2002; Bonner & Schwarz 2006).

Traditional frequentist methods of estimating parameters from mark–recapture data are sensitive to low survival and capture probabilities, small sample sizes, and the number of sampling intervals, such that sparse data greatly limit the precision of parameter estimates (Pollock *et al*. 1990; O’Brien, Robert & Tiandry 2005; Morris *et al*. 2006). However, greater analytical power is available through a Bayesian approach (Harwood & Stokes 2003; Gelman *et al*. 2004), where (i) parameters are considered random variables rather than fixed unknown values, (ii) prior knowledge about parameter distributions can be directly incorporated into estimation, and (iii) data are used to estimate the probability of a given hypothesis. Bayesian methods permit greater precision of parameter estimates due to incorporation of prior information (McCarthy & Masters 2005), explicit recognition of uncertainty (Harwood & Stokes 2003), and enhanced evaluation of complex variation from sparse data (Clark *et al*. 2005; Clark & Gelfand 2006). These advantages, in combination with computational advances, have driven a recent expansion of Bayesian methods in ecology (Ellison 2004; Clark 2005), including applications to mark–recapture modelling (e.g. Poole 2002; Gimenez *et al*. 2007; Dupuis & Schwarz 2007).

Nevertheless, practical constraints in traditional mark–recapture modelling frameworks may limit the analysis of complex data structures. For instance, the ‘robust design’ family of models (Pollock 1982; Kendall, Pollock & Brownie 1995) stratify time intervals into primary and secondary sampling periods (e.g. year and day, respectively), but require that the population be closed to immigration and emigration within primary sampling periods. Recent extensions allow estimation of short-term survivorship (e.g. across days within a year; Schwarz & Stobo 1997), but the multi-state robust design model does not permit state-transitions within primary sampling periods. Modelling of complex multi-state mark–recapture data could therefore benefit from additional structural flexibility, such as that available through a hierarchical Bayesian framework (Link *et al*. 2002; Clark & Gelfand 2006; Jonsen, Myers & James 2006).

Hierarchical Bayes accommodates stochasticity at multiple levels in a manner similar to frequentist random-effects models (Clark 2005; Zheng *et al*. 2007), and has been applied to studies of animal movement (Jonsen, Myers & Flemming 2003), species richness (Kéry & Royle 2008), and metapopulation dynamics (Royle & Kéry 2007). It is especially advantageous over non-hierarchical models when parameter variation requires partitioning across several related spatial or temporal replicates (Clark *et al*. 2005; Link & Barker 2005; Royle & Dorazio 2008).

Our need for such a flexible multi-scale approach arose during a study based upon daily monitoring of songbirds at an autumn migration stopover site over consecutive years. In a previous study (Calvert, Taylor & Walde 2009), we used a multi-state mark–recapture model formulation derived from Schaub *et al*. (2004) to estimate annual values of two stopover parameters: departure (analogous to mortality), and transience (analogous to movement). However, small within-year sample sizes limited the precision of the estimates. We were interested in using a hierarchical Bayesian analysis to reduce the impact of such sparseness by ‘borrowing’ information across different years, thus providing a balance between an approach that ignores variance among years and one where years are analysed independently. Additionally, we sought a model that could evaluate stopover decisions across two temporal scales (daily and annual variation), with the potential to further partition variance across other scales (e.g. among stopover sites, between taxonomic groups). Beyond this specific application, we perceived a demand for an accessible multi-state mark–recapture framework allowing flexible hierarchical structuring and able to deal with sparse ecological data.

The objectives of this study were therefore to: (i) build a hierarchical Bayesian multi-state mark–recapture model framework flexible enough for application to any system with a nested sampling scheme (e.g. daily monitoring within a season, conducted across years) or other hierarchical structuring; (ii) assess the accuracy and precision of estimates obtained with this model at varying levels of data quality and sample size; (iii) verify that the hierarchical structuring in this model permits improved estimation from poor-quality data relative to non-hierarchical methods; and (iv) apply this model to the assessment of stopover decisions, using 11 years of daily migration monitoring data.