spOccupancy: An R package for single‐species, multi‐species, and integrated spatial occupancy models
Jeffrey W. Doser,Andrew O. Finley,Marc Kéry,Elise F. Zipkin
DOI: https://doi.org/10.1111/2041-210X.13897
2022-05-24
Methods in Ecology and Evolution
Abstract:Occupancy modeling is a common approach to assess species distribution patterns, while explicitly accounting for false absences in detection‐nondetection data. Numerous extensions of the basic single‐species occupancy model exist to model multiple species, spatial autocorrelation, and to integrate multiple data types. However, development of specialized and computationally efficient software to incorporate such extensions, especially for large data sets, is scarce or absent. We introduce the spOccupancy R package designed to fit single‐species and multi‐species spatially‐explicit occupancy models. We fit all models within a Bayesian framework using Pólya‐Gamma data augmentation, which results in fast and efficient inference. spOccupancy provides functionality for data integration of multiple single‐species detection‐nondetection data sets via a joint likelihood framework. The package leverages Nearest Neighbor Gaussian Processes to account for spatial autocorrelation, which enables spatially‐explicit occupancy modeling for potentially massive data sets (e.g., 1000s‐100,000s of sites). spOccupancy provides user‐friendly functions for data simulation, model fitting, model validation (by posterior predictive checks), model comparison (using information criteria and k‐fold cross‐validation), and out‐of‐sample prediction. We illustrate the package's functionality via a vignette, simulated data analysis, and two bird case studies. The spOccupancy package provides a user‐friendly platform to fit a variety of single and multi‐species occupancy models, making it straightforward to address detection biases and spatial autocorrelation in species distribution models even for large data sets.
ecology