Closed pratikunterwegs closed 2 years ago
This PR is ready to merge given the original aim of shrinking finalsize
down to a single function. The current development pipeline seems to also need to include #72 and #74 into this PR, and so this PR is being converted into a draft again.
This PR is being made live again as #72 has been closed, and this PR fixes #74.
Commit https://github.com/epiverse-trace/finalsize/pull/73/commits/8ff99f03389db59c5339053798c38b677bc78b3d corrects output to be the proportion of each age-and-risk group to be infected. The previous behaviour was to return a _pinfected which was always, at most, the same as the proportion of each age group i in risk group j. The current behaviour allows the full range of 0.0 - 1.0 to be returned for each age-risk group combination.
Thanks to @joshwlambert for helping with this!
Reviewed the changes to the code with @pratikunterwegs which was useful to fully understand the changes that have been implemented. A few other suggestions which are more personal preference:
create_solver_control()
which is a trivial function that checks the inputs against the solver specified and makes sure they are of the correct type and have the correct names).final_size()
function fails when iterations are too low, but runs without error when the tolerance is very high (which I assume gives inaccurate p_infected
estimates), could catch this at input checking if there is a threshold above which results become erroneous. Thanks @joshwlambert and @Bisaloo for your comments. Could one of you approve this please so I can get it merged.
This PR compresses the
finalsize
package down to the single functionfinal_size
, which:Rcpp
functions, and removes the R solvers,final_size
,final_size_grps
, andepi_spread
.Rcpp
functionfinal_size_grps_cpp
,