occARU: Bayesian (multispecies) occupancy models for ARUs

18 views
Skip to first unread message

Matthijs Hollanders

unread,
Apr 14, 2026, 4:02:30 AM (23 hours ago) Apr 14
to hmecology: Hierarchical Modeling in Ecology
Good day,

I'm excited to announce the release of my first R package, occARU, which fits (multispecies) occupancy models for automated recording unit (ARU) data, such as camera traps and acoustic monitors, in Stan. After appropriately thinning species detections and aggregating to surveys of arbitrary lengths, occARU fits occupancy models with count observation models to go beyond binary detection probabilities. The package is somewhat opinionated, with most of the focus on the detection rates instead of occupancy.

A full description of the model can be found in the model vignette, but some of the main features are highlighted below:
  • Hierarchical multispecies Gaussian processes (GPs) using matrix normals for site (spatial) and survey (temporal) random effects. If length scales are shared across species, only a single Cholesky decomposition is required for each GP.
  • Orthogonal projection of the random effects ensures recovery of fixed effects.
  • Fixed effects can include continuous, categorical (with zero-sum vectors), and ordinal (with simplex decomposition) predictors. The detection submodel accommodates both site and site-by-survey varying predictors.
  • Interspecific correlation matrices to explore species interactions in different model components (responses to predictors, and spatial and temporal effects).
  • Global-local shrinkage priors are used for the occupancy and detection submodels. Inspired by R2D, priors are set on the explained variance which are simplex decomposed using either Dirichlet or zero-sum logistic-normal distributions.
  • Monte Carlo integration (thanks @avehtari) is used to produce a second `log_lik` object to be used for PSIS-LOO-CV. Log likelihoods are stored for each site and species combination, and random effects at this "observation-level" is known to be problematic for loo. The Monte Carlo approach isn't perfect, but it does reduce a lot of the high Pareto k observations.
I hope some of you will find this useful, and I look forward to receiving feedback.

Cheers,

Matt
Reply all
Reply to author
Forward
0 new messages