rSEIQHRF: Simulates from a simple stochastic SEIQHRF epidemic model.

Description Usage Arguments Value Examples

View source: R/rSEIQHRF.R

Description

rSEIQHRF returns a matrix contains information about time, number of susceptible people, exposed people, infected people, recover people, total number of people.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
rSEIQHRF(
  N0 = 1000,
  S0 = 999,
  E0 = 1,
  I0 = 0,
  Q0 = 0,
  H0 = 0,
  R0 = 0,
  F0 = N0 - S0 - E0 - I0 - Q0 - H0 - R0,
  days = 100,
  pars = c(10, 2, 1, 2, 1, 3, 1, 3, 1, 1, 0.9, 0.3, 0.4, 0.1, 0.1)
)

Arguments

N0

An integer. The population size at time 0

S0

An integer. The initial number of susceptible people.

E0

An integer. The initial number of exposed people.

I0

An integer. The initial number of infected people.

Q0

An integer. The initial number of quarantined people.

H0

An integer. The initial number of people require hospitalization.

R0

An integer. The initial number of recovered people.

F0

An integer. The initial number of case fatality.

days

An integer. The number of days for which to simulate.

pars

A numeric vector: (a.rate, e.rate, i.rate, h1.rate, q.rate, h2.rate, r1.rate, r2.rate, r3.rate, f.rate, pE, pSR, pIim, pQim, pHim). #' Description about pars *a.rate represents rate of arrival of people into the population. *e.rate represents individual effective contact rate. *i.rate represents the incubation period is 1/i.rate days. *h1.rate represents infected individual requiring hospitalization rate at time t. *q.rate represents infected individual self-quarantining rate at time t. *h2.rate represents self-isolated individual requiring hospitalization rate at time t. *r1.rate represents recovery time for each infected individual is 1/ r1.rate. *r2.rate represents recovery time for each individual who accepts hospitalization is 1/ r2.rate. *r3.rate represents recovery time for each individual who is self-quarantined is is 1/ r3.rate. *f.rate represents individual who accepts hospitalization case fatality rate at time t. *pE represents probability that an arrival is exposed. *pSR represents probability that an exposed individual self-recover and turns susceptible. *pIim represents probability that an infected person is immune after recovery. *pQim represents probability that a quarantined person is immune after recovery. *pHim represents probability that an individual who requires hospitalization is immune after recovery.

Value

A numeric matrix with 10 columns. Row i contains the values of (t, S_t, E_t, I_t, Q_t, H_t, R_t, F_t, N_t) at time t.

Examples

1
2
3
4
para <- c( 1/10,  10, 0.01,  0.02, 0.2, 0.01, 1/20, 1/15, 1/30, 1/1000, 0.01, 0.2, 0.01, 0.02, 0.03)
model1 <- rSEIQHRF(N0 = 100, S0 = 99, E0 = 1, I0 = 0, Q0 = 0, H0 = 0, R0 = 0, F0 = 0, days = 100,pars = para )
model1
print(model1)

jessseliu/epidmod documentation built on Sept. 15, 2020, 8:53 p.m.