This repository contains code, data, figures, and tables for an analysis of reproductive effects on bat viral detection that leverages data from the USAID-funded PREDICT project. Data were accessed from the Emering Infectious Disease Information Technology Hub (EIDITH) database using the eidith
R package.
The contents of the repository subdirectories are as follows:
-
R
contains internal functions used in the repository code -
data
contains various lookup tables used during data cleaning as well as the cleaned data used for model-fitting -
outputs
contains all figures and tables associated with the analysis -
scripts
contains the core analysis scripts:01_data_prep.R
accesses, cleans, and filters EIDITH data for downstream analysis02_stan_model_fitting.R
fits Bayesian models to the cleaned datasets usingcmdstanr
03_plotting.R
generates all figures
-
stan
contains cleaned data subsets in Stan-friendly formats and the Stan models used in the analysis
In order to facilitate reproducibility for those without EIDITH access, cleaned data analyzed here are contained in both the data/cleaned_data
subdirectory (full analysis set in CSV format) and the stan/cleaned_data
subdirectory (full analysis set and data subsets as Stan-friendly list objects). Users cloning the repository will therefore be able to proceed with the recreation of the analysis starting with 02_stan_model_fitting.R
, which will fit the Stan models, saving them to stan/saved_models
. Subsequently, 03_plotting.R
will recreate all figures using this saved model output.