This repository contains code to reproduce Nascimento de Lima et al. (forthcoming). The value of environmental surveillance for pandemic response. The run_analyses.R
script runs the model and produces the figures and tables in the paper. All our results can be reproduced with free software.
First, install the R6Sim R package. Then, install the remaining dependencies by running bash install_dependencies.sh
or step through the install_dependencies.R
script using RStudio.
You can use renv
to use the same package versions we used to produce our results by setting the use_renv
variable in the settings.yml
file. If you do use renv
, activate it by uncommenting the source("renv/activate.R")
line in the .Rprofile
script.
After installing R dependencies, use the run_all_analyses.R
file or run bash run_all_analyses.sh
on your terminal to run all scripts. This should take one minute with the default small sample size. After it runs, open the settings.yml
file and increase the n_reps
setting to 1,000 to use the actual settings used to produce our results.
./R
: Contains Rscripts
,functions
,scripts
andodin_models
. Theodin_model
folder contains the odin model files; those are not R scripts and are saved with the.R
extension for syntax highlighting.settings.yml
contains settings that would otherwise be hard-coded. Settings are saved in thes
list, which is a global variable../cpp
: This folder will be created byodin
and will house your compiled c++ models. You do not need to edit the files within that folder../data
: Contains data inputs../output
: Model outputs are saved to this folder. File names map to the tables and figures in our paper../archive
: Contains archive data or scripts.
Reach out to Pedro Nascimento de Lima for questions related to this repository.
Copyright (C) 2024 by The RAND Corporation. This repository is released as open-source software under a GPL-3.0 license. See the LICENSE.md file.