This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.
Efficient Bayesian implementations of capture-recapture models with Stan
Downloads
Authors
Abstract
Capture-recapture (CR) methods are a mainstay of ecological statistics for estimating demographic parameters and population sizes in animal populations. The advent of Bayesian methods made complex hierarchical formulations accessible to practitioners, largely relying on conditional likelihood formulations with latent discrete parameters. However, modern gradient-based MCMC methods that are the gold standard for sampling-based Bayesian estimation do not accommodate discrete parameters and require they are marginalised from the models. In this contribution, I provide an overview of modern CMR methods with efficient implementation in Stan, a probabilistic programming language. Models are categorised as Cormack-Jolly-Seber, conditioned on first capture, and Jolly-Seber, additionally estimating the entry process, with robust design, multistate, and multievent extensions covered for each type. All 16 model types are constructed in continuous time, using mortality and transition rates instead of probabilities, to accommodate unequal survey intervals. A novel component of this work is to accommodate unequal survey interval lengths in the entry process of Jolly-Seber models, which has been largely ignored despite being routinely accounted for in the survival process. In our case study, accounting for unequal intervals yielded better fit to data and considerable differences in population size estimates, highlighting the sensitivity of derived quantities to unrealistic model assumptions. Log likelihood functions and Stan programs are provided for all model types which are overloaded to accommodate both time-varying and individual-by-time varying effects, with the former in particular leveraging the factorisability of models to gain considerable efficiency gain. Jolly-Seber models, additionally, include functions to compute derived quantities like population sizes and entries and exits from the population using the forward-backward sampling algorithm.
DOI
https://doi.org/10.32942/X25D56
Subjects
Applied Statistics, Biostatistics, Ecology and Evolutionary Biology, Life Sciences, Population Biology, Statistical Methodology, Statistical Models, Statistics and Probability, Survival Analysis
Keywords
capture-recapture, Bayesian, Stan, Hamiltonian Monte Carlo, marginalisation, Cormack-Jolly-Seber, Jolly-Seber, robust design, multistate, multievent, hidden Markov model
Dates
Published: 2026-04-02 08:47
Last Updated: 2026-04-02 08:47
License
CC BY Attribution 4.0 International
Additional Metadata
Data and Code Availability Statement:
All code, data, and simulations are provided on GitHub at https://github.com/mhollanders/cr-in-stan.
Language:
English
There are no comments or no comments have been made public for this article.