-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add onset-to-recovery delays to simulation #99
Conversation
…sim_input to return compound warnings or errors, WIP #36
This pull request:
(Note that results may be inacurrate if you branched from an outdated version of the target branch.) |
This pull request:
(Note that results may be inacurrate if you branched from an outdated version of the target branch.) |
I haven't reviewed the PR, I trust you with the implementation. Just a reminder to update the |
This PR has been reviewed as part of PR #101 which builds on top of this feature branch. I will now merge both of these PRs. I will update the |
This PR addresses a feature request from #36 to add explicit onset-to-recovery time delays. This feature adds the
onset_to_recovery
argument to thesim_linelist()
andsim_outbreak()
functions, which by default isNA
to not provide explicit recovery dates as this is thought to be the most common scenario when collecting line list information. Theonset_to_recovery
argument works identically toonset_to_death
andonset_to_hosp
, whereby it can be an<epidist>
object, or an anonymous function to parameterise the delay distribution.There is a breaking change as part of this PR with respect to the output line list
<data.frame>
fromsim_linelist()
andsim_outbreak()
. The$date_death
column has been replace with two columns,$outcome
and$date_outcome
. Currently the$outcome
column is a character string with either"died"
or"recovered"
. The$date_outcome
column contains the date of the corresponding event (in the same row). This was decided from discussions in #36.The Visualising line list data vignette (
vis-linelist.Rmd
) is updated to aggregate the new line list structure, and now includes a code chunk that uses {tidyr}. As a result, {tidyr} is added as a suggested package dependency.The
.add_death()
function has been updated and renamed to.add_outcome()
to deal with deaths and recoveries..cross_check_sim_input()
is updated to return compound warnings or errors if necessary instead of returning multiple warnings or stopping on the first error.Tests have been updated in line with the updates to exported and internal functions, including updating the
tests/testthat/testdata/
.