Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Estimating Model Parameters from External Data
Contents
Introduction
STEM provides a way for users to input data from CSV Files and Estimated model parameters in, for example, an SIR or SEIR model so that model will best approximate the input data.
Mathematics
SI Models and Parameter Estimation
SIR Models and Parameter Estimation
SEIR Models and Parameter Estimation
There are four equations with four parameters that the SEIR model is defined by:
dS/dt = -βSI + αR
dE/dt = βSI - εE
dI/dt = εE - γI
dR/dt = γI - αR
where:
β is the infection rate
α is the immunity loss rate
γ is the infectious recovery rate
ε is the incubation rate
When rearranged by simple algebra, these four equations turn into the following:
(Eqn 1) (1/I)(dlnS/dt) = α (R/(SI)) - β
(Eqn 2) dlnE/dt = β (SI/E) - ε
(Eqn 3) dlnI/dt = ε (E/I) - γ
(Eqn 4) dlnR/dt = γ (I/R) - α
All four of the above equations are in the form y = mx + b, where:
(Eqn 1) x = R/(SI) and y = (1/I)(dlnS/dt)
(Eqn 2) x = SI/E and y = dlnE/dt
(Eqn 3) x = E/I and y = dlnI/dt
(Eqn 4) x = I/R and y = dlnR/dt
Using the method of least squares, we can fit all four equations to a line (y = mx + b) and get the slope (m) and intercept (b) from each equation. The slopes and interecepts in each equation corresponds to a parameter in the model equations.
Implementation
Package
All of the analysis is in the package org.eclipse.ohf.stem.analysis and projects within
Classes
ModelParameters.java
This class holds all of the parameters that we want to estimate and their variances and standard deviations. Also holds the local population density, local population, and a reference population density of 100 for fixing the β parameter.
There is an empty constructor that initializes all values to zero, and there is a constructor for each method of SEIR and SIR.
To find the average of the parameters found from each location, the average() method averages using standard deviations to weight each parameter.
The same is done to find the standard deviation of the average of the parameters, calculateStdAvg().
The toString() method will return the values of all of the parameters and the standard deviations of each.