Skip to content

Add incubation period to simulation#275

Open
joshwlambert wants to merge 7 commits intomainfrom
incubation
Open

Add incubation period to simulation#275
joshwlambert wants to merge 7 commits intomainfrom
incubation

Conversation

@joshwlambert
Copy link
Copy Markdown
Member

This PR addresses #253 by adding an incubation_period argument to the sim_linelist() and sim_outbreak() functions. These functions now allow the date/time of symptom onset to be some delay after the infection time by supplying an incubation period distribution (can be a function or an <epiparameter> object like the other delay distribution arguments in {simulist}).

This changes is backwards compatible as the default incubation period is set to 0, but could be considered a breaking change due to a new argument being added to the middle of the function signatures of sim_linelist() and sim_outbreak(), so any users that are calling these functions with arguments specified by position may encounter issues.

.sim_internal() is updated to add the incubation_period when defining the $date_onset.

.check_sim_input() is updated to check the incubation_period argument, and as_function() is updated to convert the incubation_period if it's NULL or an <epiparameter> object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant