Can anyone help me in fitting a SVEAIHR epidemic model to the observe data please?

5 views (last 30 days)
I want to fit SVEAIHR epidemic model to a COVID-19 data which has second waves. I want to fit the infection(I) of the model to the daily new cases in the data(column highlighted with yellow colour). Data attached here please.
  1 Comment
Steven Lord
Steven Lord on 25 Jan 2022
Reopening because I think there is some relevant information in the SimBiology documentation that could help this user.

Sign in to comment.

Answers (1)

Florian Augustin
Florian Augustin on 25 Jan 2022
Hi Sonam,
Following up on Steven's comment, here are a few general links that may be helpful for how to fit models to data in SimBiology.
A prerequisite for using SimBiology would be to build a SimBiology model of your SVEAIHR model. The documention for model building in Simbiology may be a good starting point, if your model is not already in SimBiology. Here is a simple example for how to construct a simple model. You can also use the SimBiology Model Builder app to build your model without having to write any code.
To fit the model to your data, you can use SimBiology parameter estimation functions, or use the SimBiology Model Analyzer app to fit the model to data. Here is a collection of examples for different estimation functionalities in SimBiology.
Admittedly, those are a lot of links and information. Feel free to follow up on this thread here if you have specific questions about SimBiology.
I am not sure if this is relevant to your question, but I just wanted to mention that Matlab also has other functions that may be of interest. If you would like to fit a general curve (without using a SimBiology model) to your data, you could take a look at the Curve Fitting toolbox.
Hope this helps,
Florian Augustin
Florian Augustin on 15 Oct 2022
SimBiology has two ways of defining differential equations: reactions and rate rules. Below is an example how you could set up your model (using MATLAB R2022b, but you can use earlier versions as well).
% Create model.
model = sbiomodel("prey-predator");
% Create prey and predator species.
environment = addcompartment(model, "environment", 1);
addspecies(environment, "Prey" , 10);
addspecies(environment, "Predator", 10);
% Create parameters: r, beta, c, mu.
addparameter(model, "r" , 10);
addparameter(model, "beta", 1);
addparameter(model, "c" , 0.1);
addparameter(model, "mu" , 2);
Here is how you can add the dynamics using reactions with mass action kinetic laws and custom reaction rates:
% Add reactions for proliferation and death of prey
prolifPrey = addreaction(model, "Prey -> 2 Prey");
prolifPreyKL = addkineticlaw(prolifPrey, "MassAction");
prolifPreyKL.ParameterVariableNames = "r";
deathPrey = addreaction(model, "Prey -> null");
deathPrey.ReactionRate = "beta*Prey*Predator";
% Add reactions for proliferation and death of predators
prolifPredator = addreaction(model, "null -> Predator");
prolifPredator.ReactionRate = "c*beta*Prey*Predator";
deathPredator = addreaction(model, "Predator -> null");
deathPredatorKL = addkineticlaw(deathPredator, "MassAction");
deathPredatorKL.ParameterVariableNames = "mu";
Alternatively, you can define dynamics using rate rules:
% Alternative: using rate rules.
% addrule(model, "Prey = r*Prey - beta*Prey*Predator", "rate");
% addrule(model, "Predator = c*beta*Prey*Predator - mu*Predator", "rate");
You can simulate and plot the results using sbiosimulate (or a SimFunction) and sbioplot:
simData = sbiosimulate(model);
Hope this helps,

Sign in to comment.


More Answers in the  SimBiology Community


Find more on Biotech and Pharmaceutical in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by