Code Monkey home page Code Monkey logo

real's Introduction

real

Reproduction number Estimation Accounting for Lead time

A minimally parameterized algorithm for estimating on average how many cases stem from an existing case in a viral pandemic, for each date during the pandemic. Rather than fitting an exponential curve to the entire dataset, a weighted average of later-dated cases is used to derive an instantaneous reproduction number. This weighting is empiricially estimated from the virus biology assuming that most cases are unobserved and asymptomatic (probably true for COVID-19 in many jurisdictions).

This script generates very similar Rt numbers to the R EpiEstim package when the Serial Interval function is parameterized to be similar to the viral_shedding_proportions in this script. The main difference is that this script produces confidence intervals for Rt in a different manner, checking for Gaussian or exponential distribution of the Rt estimate in a rolling window. It also normalizes the data for frequent changes in the number of tests performed per date. This aligns more closely with observed SARS-CoV-2 testing results in a jurisdiction with high testing rates. It also mitigates potential MCMC misestimation of the R value when there are multiple staggered drops in testing, such as around Christmas and New Year's days.

This script also greatly simplifies the process of plotting multiple Rt estimates (e.g. different "zones") together for comparison, provides sanity checks (e.g. no days with more cases than tests) and tries to gracefully handle missing dates. Breakdown of cases by age group is also displayed, normalized for the age group demographics provided (Alberta age population structure stats are from the 2016 census, which is a bit out of date).

Test datasets for graphing are provided based on data scrapped from the Alberta Government COVID-19 data explorer.

Alberta zones SARS-CoV-2 data graph

real's People

Contributors

nodrogluap avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

brettmontague

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.