outbreak_model: Run a single instance of the branching process model

Description Usage Arguments Value Author(s) Examples

View source: R/outbreak_model.R

Description

Run a single instance of the branching process model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
outbreak_model(
  num.initial.cases = NULL,
  prop.ascertain = NULL,
  cap_max_days = NULL,
  cap_cases = NULL,
  r0isolated = NULL,
  r0community = NULL,
  disp.iso = NULL,
  disp.com = NULL,
  k = NULL,
  delay_shape = NULL,
  delay_scale = NULL,
  prop.asym = NULL,
  quarantine = NULL
)

Arguments

prop.ascertain

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

r0isolated

numeric reproduction number for isolated cases (must be >0)

r0community

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

disp.iso

numeric dispersion parameter for isolated cases (must be >0)

disp.com

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

k

numeric skew parameter for sampling the serial interval from the incubation period

delay_shape

numeric shape parameter of delay distribution

delay_scale

numeric scale parameter of delay distribution

quarantine

logical whether quarantine is in effect, if TRUE then traced contacts are isolated before symptom onset

Value

data.table of cases by week, cumulative cases, and the effective reproduction number of the outreak

Author(s)

Joel Hellewell

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
incfn <- dist_setup(dist_shape = 2.322737,dist_scale = 6.492272)
# delay distribution sampling function
delayfn <- dist_setup(2, 4)
# generate initial cases
case_data <- outbreak_setup(num.initial.cases = 5,
                            incfn=incfn,
                            delayfn = delayfn,
                            k=1.95,
                            prop.asym=0)
# generate next generation of cases
case_data <- outbreak_step(case_data = case_data,
                           disp.iso = 1,
                           disp.com = 0.16,
                           r0isolated = 0,
                           r0community = 2.5,
                           prop.asym = 0,
                           incfn = incfn,
                           delayfn = delayfn,
                           prop.ascertain = 0,
                           k = 1.95,
                           quarantine = FALSE)

## End(Not run)

covid19risk/impact-sim documentation built on April 16, 2021, 2:15 a.m.