net_simulate: Network simulation wrapper

Description Usage Arguments Examples

View source: R/net_simulate.R

Description

This function simulates a SEIQHRF epidemic on top of a network of n individuals with a specific list of parameters as provided. S - Susceptible E - Exposed (also Infected) I - Infected Q - Quarantined (also Infected) H - Requiring hospitalisation (also Infected) R - Recovered F - Fatality (due to infection)

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
net_simulate(
  n = 100,
  nsims = 3,
  nsims_dx = 100,
  nsteps = 90,
  prop.isobox = 0.43,
  iso.capacity = 10,
  tent.capacity = 4,
  verbose = F,
  cores = 1,
  d.rate = 0,
  external.contacts = 4,
  act.rate.se = 10,
  inf.prob.se = 0.02,
  act.rate.si = 10,
  inf.prob.si = 0.05,
  act.rate.sq = 2.5,
  inf.prob.sq = 0.05,
  ei.rate = 1/10,
  iq.rate = 1/30,
  ih.rate = 1/100,
  qh.rate = 1/100,
  hr.rate = 1/15,
  qr.rate = 1/20,
  ir.rate = 1/20,
  hf.rate = 1/50,
  hf.rate.overcap = 1/25,
  hosp.cap = 5,
  hosp.tcoeff = 0.5,
  a.rate = 0,
  di.rate = d.rate,
  ds.rate = d.rate,
  dr.rate = d.rate,
  i.num = 1,
  r.num = 0,
  e.num = 0,
  s.num = n - 1,
  f.num = 0,
  h.num = 0,
  q.num = 0,
  agedistribution = CampNetworkSimulator::agedistribution,
  ratesbyage = CampNetworkSimulator::ratesbyage
)

Arguments

n

numbers of individuals, a random sample of this size will be taken from the Camp's population

nsims

number of network simulations (default: 3) ~ simulation sample size

nsims_dx

number of network simulation for network diagnostics (default: 100)

nsteps

number of timesteps (days, hours, weeks, arbitrary choice), the rates need to be defined in units relative to this metric (e.g number of cases/day or /hour or /week)

prop.isobox

Proportion of individuals in iso boxes, in this first implementation only two kinds of housing units are considered (isoboxes and tent) – can (and should) be changed in the future

iso.capacity

Capacity of iso boxes

tent.capacity

Capacity of tents

verbose

whether function should be verbose in its command line output

cores

number of cores to be used (default: number of available cores - 1)

d.rate

departure rate (includes external deaths and actual departures) – if set to 0 no invidual is consider to leave or die from causes different than the epidemic agent

external.contacts

Average number of external contacts that individuals make every day (external meaning from outside their tent)

act.rate.se

Act rate (contact rate) between susceptible and exposed individuals – default: 10 interactions of S-to-E/timestep/person

inf.prob.se

infection probability of susceptible individuals upon contact with exposed individuals, these value is often considered to be lower than that upon contact with infected individuals (though literature needs to be checked for this) – default: 0.02 (Out of every 100 contacts between S and E we expect 2 infections)

act.rate.si

Act rate (contact rate) between susceptible and infected individuals – default: 10 interactions/timestep /person

inf.prob.si

infection probability of susceptible individuals upon contact with susceptible individuals – default: 0.05

act.rate.sq

Act rate (contact rate) between susceptible and quarantined individuals – default: 2.5 interactions/timestep/person

inf.prob.sq

infection probability of susceptible individuals upon contact with quarantined individuals – default: 0.05

ei.rate

Rate (can be seen as flow rate or probability) between exposed and infected individuals, can take the value of a vector of length nsteps to simulate timevarying scenarios

iq.rate

Rate between infected and quarantined states (~chances of quarantining when infected)

ih.rate

Rate between infected and hospitalised states (~chances of requiring hospitalisation when infected)

qh.rate

Rate between quarantined and hospitalised states (~ chances of requiring hospitalisation when quarantining)

hr.rate

Rate between requiring hospitalisation and recovered states (~chances of recovering when requiring hospitalisation)

qr.rate

Rate between quarantined and recovered states (~chances of recovering when in quarantined state)

ir.rate

Rate between infected and recovered states (~chances of recovering when in infected state)

hf.rate

Rate between hospitalised and fatality state (~chances of dying from the infectious agent given requiring hospitalisation)

hf.rate.overcap

Same as hf.rate but when the hospital is at full capacity (As per hosp.cap)

hosp.cap

Hospital capacity

hosp.tcoeff

Increase in the hr.rate for every timestep spent in the hospital

a.rate

arrival rate -> if set to 0, inflow of people is not considered (i.e. no births, no immigration)

di.rate

departure rate for infected individuals (defaults to d.rate)

ds.rate

departure rate for susceptible individuals (defaults to d.rate)

dr.rate

departure rate for susceptible individuals (defaults to d.rate)

i.num

Initial number of infected individuals (defanetults to 1)

r.num

Initial number of recovered individuals (defaults to 0)

e.num

Initial number of exposed individuals (default to 0)

s.num

Initial number of susceptible individuals (defaults to n-1)

f.num

Initial number of fatalities (defaults to 0)

h.num

Initial number of individuals requiring hospitalization (defaults to 0)

q.num

Initial number of quarantined individuals (defaults to 0)

agedistribution

vector containing the age distribution of individuals in the camp. By default this will be loaded internally, see CampNetworkSimulator::agedistribution

ratesbyage

dataframe containing the hospitalisation rate and fatality rate by age, by default CampNetworkSimulator::ratesbyage is used

Examples

1
net_simulate(n= 100, nsims = 1, nsteps = 10)

AIforGoodSimulator/network-model-R-package documentation built on Oct. 3, 2020, 10:08 a.m.