Introduction

In most free-living bird populations moult progression and duration in individuals can not be observed fully. Instead snapshot measurements of (re)captured individuals are typically used to infer these parameters on a population level. As an additional complication, recording of moult in the field may take various forms both in terms of the subset of the population that is sampled and whether moult is recorded as a categorical state, or a (semi-)continuous progression.

Underhill & Zucchini (1989; Ibis 130:358) proposed a general modelling framework to accommodate many of these features, implemented in the R package moult (Erni et al. 2013; J Stat Soft 52:8).

moultmcmc implements a Bayesian inference framework for this class of models with the aim of (eventually) allowing the inclusion of hierarchical model structures to accommodate 1) the integration of moult data sets using different modes of recording (☑), 2) individual heterogeneity in moult timing (☑) and progression (☐), and 3) hierarchical spatial/temporal effects for multi-site/multi-season data sets (☐).

moultmcmc implements fast inference for these models using Hamiltonian Monte Carlo samplers from Stan. The currently implemented models are described in detail in the vignette ‘Moult data likelihoods’.

Installation

The package moultmcmc is built around pre-compiled Stan models, the easiest and quickest way of installing it is to install the package from R-universe use the following code:

install.packages("moultmcmc", repos = "https://pboesu.r-universe.dev")

On Mac and Windows systems this will make use of pre-compiled binaries, which means the models can be run without having to install a C++ compiler. On Linux this will install the package from a source tarball. Because of the way the Stan models are currently structured, compilation from source can be a lengthy process (15-45 minutes), depending on system setup and compiler toolchain.

To install moultmcmc from the github source (not generally recommended for Windows users) use the following code. This requires a working C++ compiler and a working installation of rstan:

install.packages("remotes")
remotes::install_github("pboesu/moultmcmc")

Usage

Basic usage is described in the vignette ‘Getting started with moultmcmc’
Please note that moultmcmc is under active development and API changes may still occur.