scenario_sim: Run a specified number of simulations with identical...

Description Usage Arguments Value Author(s) Examples

View source: R/scenario_sim.R

Description

Run a specified number of simulations with identical parameters

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
scenario_sim(
  n.sim = 1,
  net,
  df,
  prop.ascertain,
  cap_max_days,
  R,
  presymrate,
  delay_shape,
  delay_scale,
  num.initial.cases,
  asym.adult,
  asym.child,
  asym.adult.inf,
  sym.child.inf,
  asym.child.inf,
  scenario,
  outside,
  sensitivity = "high",
  testing = "none",
  output = "daily",
  cap_max_tests = NULL
)

Arguments

n.sim

number of simulations to run

net

network from which to sample cases

prop.ascertain

Probability that cases are ascertained by contact tracing

cap_max_days

Maximum number of days to run process for

R

scaling factor for infection probability

presymrate

rate of presymptomatic transmission (must be 0 <= x <= 1)

delay_shape

shape of distribution for delay between symptom onset and isolation

delay_scale

scale of distribution for delay between symptom onset and isolation

num.initial.cases

Initial number of cases in each initial cluster (must be 0 <= x <= 1)

scenario

character - must be either ("nothing","isolation","primary_quarantine", or "secondary_quarantine")

outside

infection rate from outside the network (must be 0 <= x <= 1)

sensitivity

character - must be "high" or "low"

testing

character - must be "realistic", "random" or "none"

cap_max_tests

integer - max number of daily tests. Only use if testing != "none"

prop.asym

proportion of asymptomatic cases (must be 0 <= x <= 1)

Value

data.frame of weekly cases, isolations, quarantines and tests for each simulation

Author(s)

Joel Hellewell

Lewis Spurgin

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
res <- scenario_sim(n.sim = 5,
net = haslemere,
prop.ascertain = 0.8,
cap_max_days = 69,
R = 6.5,
presymrate = 0.4,
delay_shape = 1,
delay_scale = 1.4,
num.initial.cases = 1,
prop.asym = 0.4,
scenario = "nothing",
outside = 0.001,
sensitivity = "high",
testing = "none")

## End(Not run)

lgs85/covidsch documentation built on May 24, 2020, 4:31 a.m.