SEIRS epidemic model

Simulation of an epidemic by classical deterministic models: SI, SIS, SIR, SIRS, SEIR, SEIRS
1.1K Downloads
Updated 8 May 2020

View License

The contribution contains the class epidemic by which one can simulate the evaluation of an epidemic by several classical deterministic epidemic models without vital dynamics:
SI -- Susceptible->Infective
SIS -- Susceptible->Infective->Susceptible
SIR -- Susceptible->Infective-Removed
SIRS -- Susceptible->Infective->Removed->Susceptible
SEIR -- Susceptible->Exposed->Infective->Removed
SEIRS -- Susceptible->Exposed->Infective->Removed->Susceptible

Usage
obj = epidemic(model, varargin)
model -- {'SI,'SIS','SIR','SIRS', SEIR','SEIRS'}
'beta',beta -- contact frequency (>0) - for all models
'gamma',gamma -- removal frequency (>0) - for all models except SI
'sigma',sigma -- incubation frequency (>0) - for SEIR and SEIRS models
'xi', xi -- returning frequency (>0) - for SIS, SIRS and SEIRS models
'tend',tend -- end time (>0, defTime)
'dt',dt -- integration step (>0, def 0.1)
'N',N -- population size (>0, def 1000)
'I0',I0 -- initial number of infectious (>=0, def 1)
'E0',E0 -- initial number of exposed (>=0, def 0)

Methods
run(obj,varargin) -- run simulation
'tend',tend -- end time (>0, def ...)
'dt',dt -- integration step (>0, def 0.1)
'N',N -- population size (>0, def 1000)
'I0',I0 -- initial number of infectious (>=0, def 1)
'E0',E0 -- initial number of exposed (>=0, def 0)
plot(obj,varargin) -- plot result of simulation
'all',{'on','off'} -- plot all populations or just total cases (def 'on')
'new',{'on','off'} -- new plot (def 'on')
'total' ,{'on','off'} -- plot also total cases if 'all','on'

Example:
aa=epidemic('SEIR','N',200,'beta',1.9,'gamma',1/5,'sigma',1/7,'tend',60);
run(aa)
plot(aa)

No parameterization function is provided for actual data.

DISCLAIMER: Software is for education and not for medical or commercial use. Use it at your own discretion.

Cite As

milan batista (2024). SEIRS epidemic model (https://www.mathworks.com/matlabcentral/fileexchange/75321-seirs-epidemic-model), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Biological and Health Sciences in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

SEIRS_v03

SEIRS_v03/data

SEIRS_v03

Version Published Release Notes
1.2.0

Major revision

1.1.3

Update description

1.1.2

Update description

1.1.1

Update description

1.1.0

Correct equations for SEIR and SEIRS. Add SIS model.

1.0.3

Correct calculation of accumulated total cases

1.0.2

Update tags

1.0.1

Minor updates

1.0.0