TY - DATA T1 - Supplement 1. R-code used to simulate occupancy data and to fit the IFM naïve, IFM missing, and IFM robust models. PY - 2016/08/09 AU - Benjamin B. Risk AU - Perry de Valpine AU - Steven R. Beissinger UR - https://wiley.figshare.com/articles/dataset/Supplement_1_R-code_used_to_simulate_occupancy_data_and_to_fit_the_IFM_na_ve_IFM_missing_and_IFM_robust_models_/3550743 DO - 10.6084/m9.figshare.3550743.v1 L4 - https://ndownloader.figshare.com/files/5618091 L4 - https://ndownloader.figshare.com/files/5618115 L4 - https://ndownloader.figshare.com/files/5618112 L4 - https://ndownloader.figshare.com/files/5618109 L4 - https://ndownloader.figshare.com/files/5618106 L4 - https://ndownloader.figshare.com/files/5618103 L4 - https://ndownloader.figshare.com/files/5618100 L4 - https://ndownloader.figshare.com/files/5618097 L4 - https://ndownloader.figshare.com/files/5618094 L4 - https://ndownloader.figshare.com/files/5618118 KW - Laterallus jamaicensis coturniculus and Rallus limicola KW - stochastic patch occupancy models KW - hierarchical Bayesian model KW - metapopulation KW - area KW - connectivity KW - missing data KW - false absences KW - robust design KW - incidence function model KW - Environmental Science KW - Ecology N2 - File List 1_MCMC_FUNCTIONS.R 2_IFM_NO_MISSING_MCMC_FUNCTION.R 3_IFM_MISSING_MCMC_FUNCTION.R 4_IFM_ROBUST_MCMC_FUNCTION.R 5_CHAIN_DIAGNOSTICS_FUNCTIONS.R. 6_IFM_SIM_DATA_PREP.R 7_AUDIT_INM.R 8_AUDIT_IFM_MISSING.R 9_AUDIT_IFM_ROBUST.R Description The files in this Supplement are used to fit the three models described in this study (IFM Naïve, IFM Missing, and IFM Robust) and include a program that simulates occupancy data following the Incidence Function Model. The file 1_MCMC_FUNCTIONS.R contains four auxiliary functions used in 2_IFM_NO_MISSING_MCMC_FUNCTION.R, 3_IFM_MISSING_MCMC_FUNCTION.R, and 4_IFM_ROBUST_MCMC_FUNCTION.R. It includes a function that accepts or rejects proposed values in the Metropolis-Hastings algorithm, a function that counts the acceptance rates, a function that counts the number of missing values, and a function that is used when proposing values from a bivariate normal distribution for the parameters gamma and beta. The file 2_IFM_NO_MISSING_MCMC_FUNCTION.R contains the function that uses MCMC to estimate the IFM Naïve. The methods are described in Appendix A. The file 3_IFM_MISSING_MCMC_FUNCTION.R contains the function that uses MCMC to estimate the IFM Missing. The methods are described in Appendix A. The file 4_IFM_ROBUST_MCMC_FUNCTION.R contains the function that uses MCMC to estimate the IFM Robust. It implements the IFM Robust, and the methods are described in Appendix A. The file 5_CHAIN_DIAGNOSTICS_FUNCTIONS.R contains a number of functions used to diagnose the convergence of MCMC chains. In particular, the function coda.create converts the files created by the MCMC functions to a format that can be read by the “coda” R-package. The file 6_IFM_SIM_DATA_PREP.R simulates occupancy data from the Incidence Function Model. These data sets are then used in the subsequent programs. The file 7_AUDIT_INM.R estimates the parameters of the IFM Naïve using data created in 6_IFM_SIM_DATA_PREP.R. The file 8_AUDIT_IFM_MISSING.R estimates the parameters of the IFM Missing using data created in 6_IFM_SIM_DATA_PREP.R. The file 9_AUDIT_IFM_ROBUST.R estimates the parameters of the IFM Robust using data created in 6_IFM_SIM_DATA_PREP.R. ER -