Coder Social home page Coder Social logo

sarscov2_unobserved's Introduction

sarscov2_unobserved

This repository contains code to reproduce results from the following pre-print

TA Perkins*, SM Cavany*, SM Moore*, RJ Oidtman, A Lerch, M Poterek (2020) Estimating unobserved SARS-CoV-2 infections in the United States. medRxiv doi:10.1101/2020.03.15.20036582

License

This code is being released under the MIT License.

Overview

Contents of this repository are organized according to code, data, results, and plots. All plots and results shown in the main text and supplementary material are generated in script_main.R and script_supplement.R respectively, with the exception of the sensitivity analyses. Folders for code, data, results, and plots related to the sensitivity analysis described in the supplemental text are located in a sensitivity subfolder within each of those folders. All code for the analysis featured in the main text was written in the R language (version 3.5.2) and was executed on a Lenovo Thinkpad running Linux (PureOS 9.0). The sensitivity analyses were written in R (version 3.6.2) and run on a Linux cluster. At the time the research was done, all R packages used in this analysis were available on CRAN and were straightforward to install and load.

Sensitivity analysis

The results and plots for the sensitivity analysis can be recreated by running the following scripts in the code/sensitivity subfolder:

  1. script_crc_estimate_parameter_sensitivity.R: This script runs a sweep of the AsympRfraction and parameters for each of 18 different parameter scenarios and calculate log likelihoods.
    1. Input: scenario run number (referred to as XX in input/output filenames)
    2. Output: mle_local_XX.rda object containing likelihood values
  2. parameter_profiles_sensitivity_analysis.R: This script uses the log likelihoods from each parameter sweep, uses bic.grid to create a modified log likelihood surface, and then samples from that surface to get posteriors for the two estimated parameters.
    1. Input: mle_local_XX.rda
    2. Output: parameter_estimates_posterior_XX.rda
  3. bic_profile_plots.R: Uses output files from step 2 to create hexbin plots of joint estimated parameter posteriors
    1. Input: parameter_estimates_posterior_XX.rda
  4. Script_crc_params_sensitivity_fit. R: Script using the parameter posteriors to simulate infections, deaths, etc for each of 18 scenarios
    1. Input: parameter_estimates_posterior_XX.rda
    2. Output: sensitivity_sims_XX.rda
  5. combine_sim_results_fit_import.R: Creates summary statistics for cumulative infections and plots for all 18 parameter sensitivity scenarios
    1. Input: sensitivity_sims_XX.rda
  6. combine_sim_results_ratio_deaths.R: Creates summary statistics and plots of deaths compared expected after versus before March 13 for all 18 parameter sensitivity scenarios
    1. Input: sensitivity_sims_XX.rda
  7. multiple_pDetect_ts.R: Creates plots of the probability of detecting a local symptomatic infection over time for all 18 parameter sensitivity scenarios
    1. Input: sensitivity_sims_XX.rda

sarscov2_unobserved's People

Contributors

scavany avatar mooresea avatar talexperkins avatar

Stargazers

Kevin MF avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.