R scripts and data to replicate multispecies occupancy model for two or more interacting species (Penjor et al., 2022, Proceedings of the Royal Society B)
This repo will demonstrate how to load and run the joint species distribution model. The codes are annotated for readability.
For convenience and to remove clutter, the data have been cleaned but for security reasons (globally endangered species) we do not provide GPS locations.
Specific files included are:
interactionModelData_Penjor2021_dcat.RData = raw data containing species' detection history and covariates
intMod.txt = model specification in BUGS language
modelScript.R = script to load the data and run the model
Details:
- Total number of sites = 849
- Total number of site covariates = 5 (settlement, forest, sambar deer, gaur, serow)
- Total number of detection covariates = 2 (Trail and Disturb)
- Settlement density (continuous covariate within a 4 km circular radius of camera trap location)
- Forest cover (continuous covariate per cent cover within a 4 km radius of camera trap location)
- Relative abundance (continuous covariate) of i) sambar deer (Rusa unicolor); ii) gaur (Bos gaurus), and iii) serow (Capricornis thar)
Trail = (binary) coded 1/0 for camera traps placed on- or off-trail Disturb = daily encounter rates of humans, livestock and domestic dogs at each camera station
The link to the open-access article is https://royalsocietypublishing.org/doi/10.1098/rspb.2021.2681.