Data and code for simulation study and case study in "A Bayesian Dirichlet process community occupancy model to estimate community structure and species similarity"
Data files
Aug 27, 2020 version files 48.20 KB
-
Code_and_Data.zip
48.20 KB
Abstract
This dataset contains the R and JAGS code underlying the simulation study, as well as the data and code underlying the case study on bird occurrence in Murchison Falls National Park, presented in the paper "A Bayesian Dirichlet process community occupancy model to estimate community structure and species similarity".
Usage notes
The zip file "Code and Data.zip" contains data, R and JAGS code to run the simulation study and the analysis of the point count dataset on Ugandan birds described in “A Bayesian Dirichlet process community occupancy model to estimate community structure and species similarity”. Please refer to main text for model details. The zip file contains the following files:
(1) simulation_script_DPoccupancy.R: R script to simulate community occupancy data and analyze it with a Dirichlet Process (DP) community occupancy model (COM), under 15 scenarios determined by (1) the degree of distinctiveness among clusters (omega) and the number of parameters used in the probit-linear predictor of occupancy probability (m).
(2) simulation_script_Normal.R: R script to analyze community occupancy data generated with (1) using a COM with a Normal random species level effect, under the same 15 scenarios as described under (1)
(3) Simulation summary script DPoccupancy.R: R script to summarize simulation results generated with (1)
(4) Simulation summary script Normal occupancy.R: R script to summarize simulation results generated with (2)
(5) env_dat4V.R: simulated environmental predictor variables used in the simulation study; needs to be in the working directory to execute (1) and (2)
(6) DPSim2mv.txt: JAGS code for the DP COM for a multivariate DP (i.e., including at least the intercept + one predictor variable)
(7) DPSim2uv.txt: JAGS code for the DP COM for a univariate DP (i.e., including only the intercept)
(8) NormalSim2mv.txt: JAGS code for the Normal COM for a multivariate Normal species random effect (i.e., including at least the intercept + one predictor variable)
(9) NormalSim2uv.txt: JAGS code for the Normal COM for a univariate Normal species random effect (i.e., including only the intercept)
(10) RunCommunityOccupancyModels.R: R script to analyze point count data for Ugandan birds in JAGS with DP COM and Normal COM
(11) UgandaBirdData.R: Formatted bird point count data, needs to be in the working directory to execute (10)
(12) JAGS.occu.DP2.Multivar.txt: JAGS code for DP COM for Ugandan bird data
(13) CommOccNormal.Multivar.txt: JAGS code for Normal COM for Ugandan bird data