Description Usage Arguments Author(s) Examples
View source: R/outbreak_step.R
Move forward one generation in the branching process
1 2 3 4 5 6 7 8 9 10 11 12 13 |
case_data |
data.table of cases in outbreak so far; initially generated by outbreak_setup |
disp.iso |
numeric dispersion parameter for isolated cases (must be >0) |
disp.com |
numeric dispersion parameter for non-isolated cases (must be >0) |
r0isolated |
numeric reproduction number for isolated cases (must be >0) |
r0community |
numeric reproduction number for non-isolated cases (must be >0) |
incfn |
function samples from incubation period; generated by dist_setup |
delayfn |
function samples from the onset-to-hospitalisation delay; generated by dist_setup |
prop.ascertain |
numeric proportion of infectious contacts ascertained by contact tracing (must be 0<=x<=1) |
k |
numeric skew parameter for sampling the serial interval from the incubation period |
quarantine |
logical whether quarantine is in effect, if TRUE then traced contacts are isolated before symptom onset |
Joel Hellewell
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# incubation period sampling function
incfn <- dist_setup(dist_shape = 2.322737,dist_scale = 6.492272)
# delay distribution sampling function
delayfn <- dist_setup(delay_shape, delay_scale)
# generate initial cases
case_data <- outbreak_setup(num.initial.cases = 5,incfn,delayfn,k=1.95,prop.asym=0)
# generate next generation of cases
case_data <- outbreak_step(case_data,1,0.16,0,2.5,0,incfn,delayfn,0,1.95,FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.