addstep: Add step

Description Usage Arguments Details Value Examples

View source: R/addstep.R

Description

Simulate one step (i.e. one day) of mobility, social interaction and the evolution of the epidemics with the infection and evolution of the disease for each individual in the map.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
addstep(
  map = map,
  m = NULL,
  s = NULL,
  cn = NULL,
  cp = NULL,
  im = NULL,
  tE = NULL,
  tI = NULL,
  tA = NULL,
  ir = NULL,
  cfr = NULL,
  verbose = FALSE
)

Arguments

map

An epidmap object

m

A positive float. % of moving people

s

A positive integer. Step size

cn

A positive integer. Mean of contacts inside a tile

cp

A positive integer. Mean of number of people for each contact

im

A positive integer. Mean of number of people infected

tE

A positive integer. Number of days of E condition

tI

A positive integer. Number of days of I condition

tA

A positive integer. Number of days of A condition

ir

A positive float. Infected rate I/(A+I)

cfr

A positive float.case Fatality rate

verbose

A logical

Details

Mobility

The contagion mechanism is favoured by people mobility. In this simulation, we assumed that in any moment of time a certain percentage m of the population can move between the squares. In this way it is possible to distinguish different epidemic phases such as free-to-move period and lockdown. The commuting during the lockdown period is not only limited by the number of people who move, but also by the extent of their movements. This is a further simulation parameter which is generated by a uniform distribution ranging from -s to s.

Social interaction

Given the mobility pattern described above, contagion is determined by the social interaction and the contact opportunities. The number of contacts in each square of the grid is assumed to be determined by a random number drawn from a Poisson distribution with parameter, say cn, while the number of people involved in the movements is also a Poisson number characterised but a different parameter cp. Given these assumptions, a contagion occurs in the following way. If in a meeting it is present at least one asymptomatic or an exposed person, im susceptibles will be infected moving in the status of the Exposed.

Evolution of the epidemics

First of all, in order to simulate an artificial population describing the time evolution of an epidemics, we considered a popular model constituted by a system of six differential equations which, in each moment of time, describe six categories of individuals, namely: the susceptibles (S), those exposed to the virus (E), the infected with symptoms (I), those without symptoms (A) and those that are removed from population either because healed (R) or dead (D). This modelling framework is due to the seminal contribution of Hamer (1906), Kermack and McKendrick (1927) and Soper (1929) and it is often referred to as the “SIR model” from the initials of the categories considered in the first simplified formulation: Susceptibles, Infected and Removed. For the data random generation, we assumed that, if infected, a susceptible element of the population (S) will remain in the exposed state (E) for the time tE. After that period the subject can become either infected with symptoms (I) with probability ir or without (asymptomatic; symbol A) with probability 1-ir. The asymptomatic will remain infected (and so still able to transmit the virus) for tA days. After this period all the asymptomatic will be considered healed and will pass to the category removed (R). In contrast, the infected people showing symptoms will be healed with probability 1-cfr or die (D) with probability cfr (case death rate).

Value

an epidmap object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
set.seed(12345)
map <- genmap(n=5, p=c(10, 50))
map <- map %>%
 addstep(m=0.03, s=2,
          cn=4, cp=2,
          im=3, tE=5, tA=14,
          tI=14, ir=1, cfr=0.15)

## End(Not run)

vincnardelli/epidsampler documentation built on Dec. 17, 2020, 6:25 p.m.