outbreak_step: Move forward one generation in the branching process

Description Usage Arguments Author(s) Examples

View source: R/outbreak_step.R

Description

Move forward one generation in the branching process

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
outbreak_step(
  case_data = NULL,
  r0symp = NULL,
  disp.com = NULL,
  disp.iso = NULL,
  r0isolated = NULL,
  prop.asym = NULL,
  relR.asym = NULL,
  prop.ascertain = NULL,
  quarant.days = NULL,
  quarant.retro.days = NULL,
  incfn = NULL,
  delayfn = NULL,
  inf_fn = NULL
)

Arguments

case_data

data.table of cases in outbreak so far; initially generated by outbreak_setup

r0symp

reproduction number for non-isolated cases (must be >0)

disp.com

dispersion parameter for non-isolated cases (must be >0)

disp.iso

dispersion parameter for isolated cases (must be >0)

r0isolated

reproduction number for isolated cases (must be >0)

prop.ascertain

proportion of infectious contacts ascertained by contact tracing (must be 0<=x<=1)

incfn

(function) samples from incubation period; generated by dist_setup

delayfn

(function) samples from the onset-to-hospitalisation delay; generated by dist_setup

k

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

Author(s)

Joel Hellewell

Examples

 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)

dachuwu/DTQbp documentation built on Dec. 19, 2021, 8:01 p.m.