Giter Club home page Giter Club logo

finalsize's People

Contributors

actions-user avatar adamkucharski avatar avallecam avatar bisaloo avatar chartgerink avatar joshwlambert avatar pratikunterwegs avatar rozeggo avatar thibautjombart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

finalsize's Issues

R implementation of final_size with susceptibility groups

Implement code for final_size with susceptibility groups. This is the R-only equivalent of the Rcpp code in #39.

The idea here is to provide finalsize with a function exported to users, and with other internal functions and documentation, that allow the calculation of the final size of an epidemic in a population with heterogeneous mixing and also heterogeneous susceptibility to infection.

This is to be achieved by a translation of the Cpp code here https://gitlab.com/epidemics-r/code_snippets/-/blob/feature/newton_solver/include/finalsize.hpp#L20 into R.

This issue includes the following sub-issues: #44 #45 #46 #47 #48

Specify initial proportions infected

The initial proportions of each age group infected in final_size are hard coded to a numeric. Suggest instead a function argument that allows this proportion to be specified by the user. Could be a single value for all age groups or one per age group.
This issue addresses @thibautjombart in #19 (comment)

Discussion item: possibly useful functionality elsewhere

Not really an issue - should we start a discussion board?

Just to mention that some related (probably simpler) functionality to what I think is being implemented here is available at https://github.com/sbfnk/epimixr/blob/master/R/epidemic_age_dist.r - haven't looked yet in detail how the different methods are related but either way there might be useful code/inspiration there.

There are related functions there for estimating reproduction numbers and projecting immunity from seroprevalence/vaccination data. These could one day be brought under the same hat and/or linked up.

p_susceptibility implementation for final_size R

Adding functionality to handle populations with non uniform distribution of susceptibilities in current finalsize function final_size in R.

This will add a p_susceptibility (or similar) argument to final_size.

End point is a function whose functionality is in line with the proposed final_size_cpp function whose underlying Cpp code already implements heterogenous susceptibility distributions across age groups.

Design and implement finalsize output class?

Designing an output format for finalsize that is shared by outputs from the ODE-based simulations in the upcoming epidemics package. Implementation likely to be as S3 and may be moved to another package.

Check for r0 > 1

final_size returns final epidemic sizes of 0.0 for any prop_initial_infected (> 0.0) when r0 < 1.0. This is implausible as some individuals are already initially infected. The algorithm implemented here (most likely) does not work for r0 < 1.0, and final_size should stop when r0 < 1.0 is provided.

Check that Rcpp implementation of finfal_size works

Add tests for final_size_cpp, the Rcpp implementation of final_size.
Check:

  1. Basic functionality with synthetic data,
  2. Functionality with polymod data,
  3. Increasing r0 leads to larger epidemics,
  4. Passing incorrect length vector arguments throws specific errors.

Add finalsize Cpp code as include header

Structure the finalsize Cpp Newton solver code as a header in an include directory so that it can be called from other Rcpp projects similar to the BH (Boost Headers) package (which provides the Boost libraries as headers).

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.