epiverse-trace / finalsize

R package to calculate the final size of an SIR epidemic in populations with heterogeneity in social contacts and disease susceptibility
https://epiverse-trace.github.io/finalsize/
Other
11 stars 7 forks source link

R implementation of final_size with susceptibility groups #41

Closed pratikunterwegs closed 2 years ago

pratikunterwegs commented 2 years ago

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