Dynamic multi-year occupancy models, marginalizing over latent occurrence states.
Occupancy modeling is possible in Stan as shown here, despite the lack of support for integer parameters (without marginalization). In many Bayesian applications of occupancy modeling, the true occupancy states (0 or 1) are directly modeled, but this can be avoided by marginalizing out the true occupancy state. The Stan manual (pg. 96) gives an example of this kind of marginalization for a discrete change-point model.
For a Stan implementation of a dynamic (multi-year) occupancy model (MacKenzie et al. 2003), see: https://github.com/stan-dev/example-models/tree/master/BPA/Ch.13
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/mbjoseph/mbjoseph.github.io, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".