Skip to content

Code for the paper: Reopening California: Seeking Robust, Non-Dominated COVID-19 Exit Strategies

License

Notifications You must be signed in to change notification settings

RANDCorporation/covid-19-reopening-california

Repository files navigation

License: GPL-2

Reopening California: Seeking Robust, Non-Dominated COVID-19 Exit Strategies

This repository contains code associated with the paper Reopening California: Seeking Robust, Non-Dominated COVID-19 Exit Strategies. This paper will be first released as a working paper then submitted to a journal.

R Package Developer: Pedro Nascimento de Lima

Model Developers: Raffaele Vardavas, Pedro Nascimento de Lima

Data Pipeline Developers: Pedro Nascimento de Lima, Lawrence Baker

Related publications

Using this repository

Please use the .Rproject to work in this project with R Studio. When necessary, all scripts assume that the working directory is the base directory.

This repository uses git lfs. Make sure to download all git lfs files before trying to run the model.

The c19randepimod R package

We developed the c19randepimod R package specifically to inform policies during the COVID-19. pandemic The package includes a series of functions to gather data, define a c19model model class, calibrate the model, define experimental designs, run experiments and generate results. By defining our model as a class, we allow ourselves and future users to extend our original c19model over time. Currently, models based on the c19model class necessarily need to be compatible with the deSolve package, but future versions can relax this requirement and allow stochastic models or ABMs. This allows us to create new model classes that inherit the functions implemented for the c19model class regardless of the model structure. Since our first publication, we used different model classes for each of our publications as we learned more about COVID-19 and as our response to COVID-19 changed. For example, our original state policy tool published in May 2020 did not include vaccination, behavioral responses to vaccination and hesitancy, seasonality, and increases in transmissibility from variants, but the model used in the Reopening California paper does. This flexibility and model design choices proved to be helpful and instrumental for our work. They allowed us to publish a widely used tool within six weeks from conception to publication, and to follow up with analyses that reflected progress in the pandemic.

Overview

The figure below illustrates the main steps necessary to run the model. The R package starts by gathering data from the covidtracking api and a spreadsheet containing model inputs using the get_augmented_inputs function. This function creates a model object that contains everything we need to calibrate the model. Then, we use the calibrate or the recent calibrate_imabc function to find parameters that can produce outcomes consistent with observed time-series.

Finally, we can run the model after the calibration period by using the functions set_parameter to set different types of paramters and use the function set_experimental_design to define the future experimental design. We then use the evaluate_experiment function to evaluate the experimental design. The section below indicates how we perform these steps for the Reopening California paper.

Repository Structure:

This folder is organized as follows:

  • ./c19randepimod: contains a snapshot of the c19randepimod R package code. We created this package to generalize functions that will be useful beyond this analysis. The package has been used for all the publications we list here, but this reposistory only contains code for the “Reopening California” paper.

  • ./00_dependencies: contains the dependencies necessary to run all analyses. Run the install_dependencies.R file for the first time if needed. This will install the dependencies you need to run the model. Make sure you are using R > 3.6.1.

  • ./01_calibration: contains scripts three R scripts. The first called 01_calibration_imabc.R sets up and runs the calibration by calling the function calibrate_imabc. This function is contained in the file in the file calibrate_imabc.R. The inputs folder contain the spreadsheets that are read in as inputs for the model.

  • ./02_future_runs: contains three R scripts. The first called 01_setup_experiments.R is a simple script that sets the experimental design, as specified in the setup_rdm_experiments.R file. This is where the future experimental design is defined. Then, we use the hpc_run_experiments to run the experiments defined previously in parallel. One can run this script manually as well, but we use the hpc_run_experiments.sbatch file contained in the root directory to run the model in HPC clusters using slurm’s array jobs. This allows us to run the model across several nodes.

  • ./03_regret_analysis: contains the script 03_regret-analysis.R that calls functions in regret-functions.R. This is where the results are read, and this is where we analyse the regret from different policies. This script produces the plots we use in our papers and presentations.

  • ./04_tableau_plots: contains a tableau workbook we use to generate plots and summary tables. I use the tableau workbook to generate the summary tables in the strategy_summaries.xlsx file.

Contact

For questions, reach out to Pedro at plima [at] rand dot org

License

Copyright (C) 2021 by The RAND Corporation. This repository is released as open source software under a GPL-2.0 license. See the LICENSE file.

About

Code for the paper: Reopening California: Seeking Robust, Non-Dominated COVID-19 Exit Strategies

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published