predict_SEIQRDP: Predict cases using generalized SEIR model

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/predict_SEIQRDP.R

Description

This function predicts cases of an outbreak using a generalized SEIR model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
predict_SEIQRDP(
  country,
  start,
  finish,
  Npop = NULL,
  guess,
  dt = 1,
  f = 0,
  boot = FALSE,
  conf = 0.95,
  seed = 123,
  repeatNumber = 200,
  bootSample = NULL,
  type = "norm"
)

Arguments

country

name of the country. It should be a character string.

start

a start date in mm/dd/yy format. Start date can not be earlier than 01/22/20. Start date can not be later than finish date. If start date is NULL then start date will be 01/22/20.

finish

a finish date in mm/dd/yy format. Finish date can not be earlier than start date. If finish date is NULL then finish date will be the latest date at John-Hopkins CSSE system.

Npop

total population of the country

guess

initial guess parameters

dt

the time step. This oversamples time to ensure that the algorithm converges

f

number of days for future predictions

boot

if TRUE bootstrap will be performed to calculate confidence interval

conf

confidence level, default is 0.95.

seed

set a seed for reproducible results.

repeatNumber

number of iteration for bootstrap.

bootSample

number of sample for each bootstrap. if NULL then the number of sample is 80 percent of the original data.

type

a condidence interval type. If "norm" it calculates based on normal approximation, if "perc" it calculates based on percentile approximation,

Value

a list of predicted and actual cases.

Author(s)

Selcuk Korkmaz, selcukorkmaz@gmail.com

References

Peng, L., Yang, W., Zhang, D., Zhuge, C., Hong, L. 2020. “Epidemic analysis of COVID-19 in China by dynamical modeling”, arXiv preprint arXiv:2002.06563.

https://www.mathworks.com/matlabcentral/fileexchange/74545-generalized-seir-epidemic-model-fitting-and-computation

See Also

SEIQRDP fit_SEIQRDP

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
alpha_guess = 0.45
beta_guess = 1
LT_guess = 2
Q_guess = 0.55
lambda_guess = c(0.01,0.01,30)
kappa_guess = c(0.01,0.001,30)

guess = list(alpha_guess,
            beta_guess,
            1/LT_guess,
            Q_guess,
            lambda_guess[1],
            lambda_guess[2],
            lambda_guess[3],
            kappa_guess[1],
            kappa_guess[2],
            kappa_guess[3])


pred = predict_SEIQRDP(country = "Germany", start = "10/15/20", finish = "12/15/20",
dt = 1, f = 30, conf = 0.95, Npop = 80000000, guess, boot = FALSE,
seed = 123, repeatNumber = 100, bootSample = NULL, type = "norm")

predict = pred$pred
actual = pred$actual

genSEIR documentation built on July 12, 2021, 5:07 p.m.