Accommodating the role of site memory in dynamic species distribution models
Data files
May 03, 2021 version files 4.74 GB
-
MemModel-2020-12.zip
4.74 GB
Abstract
First-order dynamic occupancy models (FODOMs) are a class of state-space model in which the true state (occurrence) is observed imperfectly. An important assumption of FODOMs is that site dynamics only depend on the current state and that variations in dynamic processes are adequately captured with covariates or random effects. However, it is often difficult to understand and/or measure the covariates that generate ecological data, which are typically spatio-temporally correlated. Consequently, the non-independent error structure of correlated data causes underestimation of parameter uncertainty and poor ecological inference. Here, we extend the FODOM framework with a second-order Markov process to accommodate site memory when covariates are not available. Our modeling framework can be used to make reliable inference about site occupancy, colonization, extinction, turnover, and detection probabilities. We present a series of simulations to illustrate the data requirements and model performance. We then applied our modeling framework to 13 years of data from an amphibian community in southern Arizona, USA. In this analysis, we found residual temporal autocorrelation of population processes for most species, even after accounting for long-term drought dynamics. Our approach represents a valuable advance in obtaining inference on population dynamics, especially as they relate to metapopulations.
#############################################################
# These files were written by: G. V. DiRenzo
# If you have any questions, please email: grace.direnzo@gmail.com
#############################################################
This repository provides the code, data, and simulations to recreate all of the analysis, tables, and figures presented in the manuscript.
In this file, we direct the user to the location of files.
All methods can be found in the manuscript and associated supplements.
All file paths direct the user in navigating the files in this repo.
#############################################################
############## Objective & Table of contents ################
#############################################################
# File objectives & Table of contents:
# 1. To navigate to files explaining how to simulate and analyze data using the main text parameterization
# 2. To navigate to files explaining how to simulate and analyze data using the alternative parameterization (hidden Markov model)
# 3. To navigate to files that created the parameter combinations for the simulation studies
# 4. To navigate to files used to run scenarios in the manuscript
# 4a. Scenario 1: data generated without site memory & without site heterogenity
# 4b. Scenario 2: data generated with site memory & without site heterogenity
# 4c. Scenario 3: data generated with site memory & with site heterogenity
# 5. To navigate to files for general sample design guidelines
# 6. Parameter accuracy, precision, and bias under different parameter combinations
# 7. Model comparison under different scenarios
# 8. To specifically navigate to code that recreates manuscript:
# 8a. Figures
# 8b. Tables
# 9. To navigate to files for empirical analysis
###############################################
######### 1. Main text parameterization #######
###############################################
To see model parameterization as written in the main text, please navigate to:
/MemModel/OtherCode/MemoryMod_main.R
###############################################
######### 2. Alternative parameterization #####
###############################################
To see alternative parameterization using a Hidden Markov Model, please navigate to:
/MemModel/OtherCode/MemoryMod_HMM.R
###############################################
######### 3. Parameter Combinations ###########
###############################################
To see how parameter combinations were generated, please navigate to:
/MemModel/ParameterCombinations/LHS_parameter_combos.R
To see stored parameter combinations for simulations, please navigate to:
/MemModel/ParameterCombinations/parameter_combos_MemModel4.csv
##############################################
######### 4a. Scenario #1 ############
##############################################
To simulate data WITHOUT memory and analyze using:
- memory model &
- first-order dynamic occupancy model
Please navigate to: /MemModel/Simulations/withoutMem/Code/
MemoryMod_JobArray_withoutMem.R = code to simulate & analyze data
MemoryMod_JA1.sh = file to run simulations 1-5000 on HPC
MemoryMod_JA2.sh = file to run simulations 5001-10000 on HPC
All model output is stored in: /MemModel/Simulations/withoutMem/ModelOutput
##############################################
######### 4b. Scenario #2 ############
##############################################
To simulate data WITH memory and analyze using:
- memory model &
- first-order dynamic occupancy model
Please navigate to: /MemModel/Simulations/withMem/Code/
MemoryMod_JobArray_withMem.R = code to simulate & analyze data
MemoryMod_JA1.sh = file to run simulations 1-5000 on HPC
MemoryMod_JA2.sh = file to run simulations 5001-10000 on HPC
All model output is stored in: /MemModel/Simulations/withMem/ModelOutput
##############################################
######### 4c. Scenario #3 ############
##############################################
To simulate data WITH memory and WITH site heterogenity- analyze using:
- memory model &
- first-order dynamic occupancy model
Please navigate to: /MemModel/Simulations/Hetero/Code/
MemoryMod_JobArray_Hetero.R = code to simulate & analyze data
MemoryMod_JA1.sh = file to run simulations 1-5000 on HPC
MemoryMod_JA2.sh = file to run simulations 5001-10000 on HPC
All model output is stored in: /MemModel/Simulations/Hetero/ModelOutput
##################################################
######### 5. General sample design guidelines ####
##################################################
To see methods for the general sample design guidelines, please navigate to:
/MemModel/PostProcessingCode/Sampling_design_guidelines.R
########################################################################################################
######### 6. Parameter accuracy, precision, and bias under different parameter combinations ############
########################################################################################################
To see methods for model performance under different parameter combinations, please navigate to:
/MemModel/PostProcessingCode/Parameter_precison_accuracy_bias.R
######################################################
######### 7. Comparison of model performance #########
######################################################
To see methods for model comparison, please navigate to:
/MemModel/PostProcessingCode/ModelComparison.R
######################################
######### 8a. Manuscript Figures #####
######################################
To create parts of Figure 1 of main text (case study):
- Fig 1D & 1E: /MemModel/EmpiricalAnalysis/Code/Analysis/AZ_CaseStudy.R
To create Figure 2 of main text (Comparison across simulation scenarios):
- /MemModel/PostProcessingCode/ModelComparison.R
To create Figure S1, S2, & S3 use file:
- /MemModel/PostProcessingCode/Parameter_precison_accuracy_bias.R
To create Figure S4 & S5 use file:
- /MemModel/PostProcessingCode/ModelComparison.R
######################################
######### 8b. Manuscript Tables ######
######################################
To create Table 1 of main text (General sampling recommendations):
- /MemModel/PostProcessingCode/Sampling_design_guidelines.R
To create Table S1:
- /MemModel/PostProcessingCode/Parameter_precison_accuracy_bias.R
To create Table S2:
- /MemModel/EmpiricalAnalysis/Code/Analysis/AZ_CaseStudy.R
To create Table S3:
- /MemModel/PostProcessingCode/ModelComparison.R
To create Table S4 & S5:
- /MemModel/EmpiricalAnalysis/Code/Analysis/AZ_CaseStudy.R
########################################
######### 9. Empirical analysis ########
########################################
To recreate the empirical analysis of the case study, please navigate to:
- /MemModel/EmpiricalAnalysis/Code/Analysis/AZ_CaseStudy.R