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
16
17
18
19
20
21
22
23
24
25
26
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,
  delay_shape = NULL,
  delay_scale = NULL,
  inc_meanlog = NULL,
  inc_sdlog = NULL,
  prop.asym = NULL,
  inf_shape = NULL,
  inf_rate = NULL,
  inf_shift = NULL,
  min_quar_delay = 1,
  max_quar_delay = NULL,
  test_delay = NULL,
  sensitivity = NULL,
  precaution = NULL,
  self_report = NULL,
  quarantine = NULL,
  testing = NULL
)

Arguments

num.initial.cases

How many cases to start with.

prop.ascertain

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

cap_max_days

Max number of days to run the simulation.

cap_cases

After reaching this cap, assume the epidemic continues to grow.

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)

delay_shape

Probability of adherence to isolation after symptom onset when not tracked.

delay_scale

Doesnt do anything and should be removed.

inc_meanlog

shape of distribution for incubation period.

inc_sdlog

scale of distribution for incubation period.

prop.asym

Proportion of asymptomatics.

inf_shape

The shape for the gamma distribution of serial intervals around the symptom onset distribution.

inf_rate

Rate parameter for the gamma distribution of serial intervals around the symptom onset distribution.

inf_shift

Shift the gamma distribution of serial intervals around the symptom onset distribution back by this much (i.e. transmission can ocur this much before symptom onset).

min_quar_delay

The minimum delay between a case being identified and their contacts being isolated (only applies when quarentine set to TRUE)

max_quar_delay

The maximum delay between a case being identified and their contacts being isolated (only applies when quarentine set to TRUE)

test_delay

How long does it take for tests to be administered and results returned.

sensitivity

Test sensitivity.

precaution

After a negative test result, keep people in quarantine for this long as a precautionary measure.

self_report

Probability that someone that is not tracked will self report (111 for example) after symptoms.

quarantine

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

testing

Logical to determine whether testing is used.

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
25
## Not run: 
incfn <- dist_setup(dist_param1 = 2.322, dist_param2 = 6.492, dist_type = 'weibull')
# delay distribution sampling function
delayfn <- dist_setup(2, 4, 'weibull')
# generate initial cases
case_data <- outbreak_setup(num.initial.cases = 5,
                            incfn=incfn,
                            delayfn = delayfn,
                            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,
                           inf_rate = 2,
                           inf_shape = 2,
                           inf_shift = 3,
                           prop.ascertain = 0,
                           quarantine = FALSE)

## End(Not run)

emmalouisedavis/TTI-branching-process documentation built on Dec. 20, 2021, 5:17 a.m.