/Campbells

This repository contains code to perform the wildlife density modelling approach outlined in Houldcroft et al. (2024).

Primary LanguageRCreative Commons Zero v1.0 UniversalCC0-1.0

Campbells

This repository contains code to perform the wildlife density modelling approach outlined in Houldcroft et al. (2024), with the associated survey data available from the Dryad Digital Repository: https://doi.org/10.5061/dryad.xd2547dqx

H24_SETUP.R contains the code to produce spatial covariates, a barrier SPDE mesh and format all data as sf and terra objects compatible with inlabru.

H24_DENSITIES.R contains the code to run the point process model with a spatial cluster size distribution, cluster size detection function and barrier SPDE models.

Please ensure that the demonstrated hazard-rate detection function and discretised truncated log-Normal cluster size distribution are appropriate for your specific data and research circumstances. Note that this modelling approach is computationally intensive and may take a considerable amount of time to converge on standard hardware. In the event of model convergence issues, consider including additional priors on the precision and mean of model parameters.

Code development was led by Andrew Houldcroft, with Finn Lindgren contributing code for the spatial cluster size distribution and cluster size effect in the hazard-rate detection function.

Please see the vignettes in the inlabru repository for further guidance on using inlabru for spatial modelling. Code in this repository are free to use, but please cite Houldcroft et al. (2024) if you do so.