ABSTRACT
We investigate the problem of determining time dependent parameters for discrete-time epidemiological compartmental models such as the Susceptible-Infected-Recovered (SIR). We show how to determine parameters based on minimal error type iterative schemes. Such methods involve the computation of the adjoint of the derivative operator of a nonlinear function. This is a nontrivial task that we accomplish by carefully crafting auxiliary problems. To show the efficiency of the method, we consider examples involving real COVID-19 data.
Keywords:
COVID-19; discrete SIR model; parameter estimation; inverse problem; minimal error method
1 INTRODUCTION
Compartmental models for infectious diseases are pervasive in theoretical epidemiology, and became even more popular when the scientific community was faced with the challenge of predicting the dynamics of the COVID-19 pandemics. However, concealed in the models apparent simplicity, there is the difficult problem of determining time dependent parameters. In the case of diseases that affect humans, this is even more subtle since people’s behavior depend on the very dynamics of the disease, government policies, etc. Given enough data, computational methods provide tools to determine parameters, even when the data is noisy.
The Susceptible-Infected-Recovered SIR model is one of the simplest and commonly used epidemiological models 20, and many authors use SIR-like models to analyze and estimate the dynamics of various diseases such as Ebola, HIV and Zika viruses 11), (19), (22 among many others. See 14 for details on compartmental models and a through review of the last century literature, and 10 for more recent literature, specially related to COVID-19 modeling.
In our variant of SIR model, the susceptibles are part of the total population that is healthy but at risk of becoming infected. The infected are those who have and might transmit the disease. Those who recover are immune, and, for simplicity, those who die are also counted as “recovered.” We assume that the population is homogeneous, and that the initial number of infectious patients is known.
Since the outbreak of COVID-19, a considerable number of studies related to the computational modeling of the evolution of COVID-19 have been published, often based on SIR-like compartmental models. Regarding parameter estimation, 12), (15), (30 use the maximum likelihood method to estimate the basic reproduction method. The basic reproduction number is also estimated in 7), (24), (28, but this time based on the least square method. Different techniques to estimate several parameters from real data are considered in the literature, as statistical based arguments 2), (3), (4, machine learning 5), (6, or genetic algorithms 1. See also 9), (26 for interesting considerations and other approaches.
In this work we propose a new method to estimate the basic time dependent reproduction number, among other parameters. The method can be extended to other compartmental models, e.g. SIRD, SEIR and SEAIR.
Consider a population of size P > 0. The discrete time SIR compartmental model determines for all discrete time j = 1, 2, 3, . . . , the size of the susceptible population 𝒮j , the number of infectious ℐj , and the size of the “removed” population ℛj . Let S j = 𝒮j /P be the susceptible fraction of the population, I j = ℐj /P the infected fraction of the population, and R j = ℛj /P the recovered fraction of the population. The dynamics is determined by
The initial conditions are determined by a given I 1 infected individuals (to avoid trivialities, we assume that I 1 is positive and smaller than 1), and S 1 = 1 − I 1, and R 1 = 0. Note that at all times, S j + I j + R j = 1, reflecting the assumption that demographic changes are irrelevant due to the short time scale of the disease.
At a time j fixed, the parameters β j and γ j represent the probability of adequate contacts and the recovery probability 23. We assume that both are unknown and we use the available data to estimate them. In our case, the data is the daily number of new infected individuals.
Note that these parameters are not available in practice, and it is hard (impossible?) to extract them directly from the data. But they are of paramount importance since they determine the dynamics of the disease. They also allow the computation of the basic and reproductive numbers, revealing whether the disease is subsiding or not. We present here a method to estimate those parameters, and show in two simulations, using real data, that the correct dynamics can be captured.
In what follows we summarize the contents of the article. In Section 2 we make some new definitions and describe how we handle the data. In Section 3, we define the Minimal Error Method, leaving the mathematical derivations for Section 4. Section 5 contains numerical tests related to our method applied to two cities of different sizes, while Section 6 concludes the paper. Appendix A describes the smoothing method, and Appendix B outlines the Minimal Error Method in its generality.
2 HANDLING THE DATA
Consider that there are N days of data available, and let
Then, (1.1) is equivalent to
Assume that and is the cumulative number of infections on day j, resulting from smoothing the real data using exponential moving average techniques (EMA details in the Appendix A). Let
In this paper, we estimate B and Γ from (2.1), such that S 1 , ..., S N is close to . In the following section, we describe how we do so.
3 MINIMAL ERROR METHOD
Let
Consider the nonlinear operator F: ℝ2N → ℝ3N that takes the parameters B and Γ and returns D , i.e., D = F(B, Γ), where (2.1) holds. Our goal is to find (B, Γ) such that . Here, is as D where S j is replaced by .
We use an iterative method of Minimal Error Method type that, given and an initial guess (B 1 , Γ 1) determines a sequence (B k , Γ k ) by
for k = 1, 2, ... , where D k = F(B k , Γ k ),
such that M > 1/2 is chosen by the user 25. We consider M = N.
Above, ∥ · ∥ denotes the Euclidean norm, and F ′(B k , Γ k )T denotes the transpose of the Jacobian matrix of F computed at (B k , Γ k ). The above iteration is provably convergent under certain assumptions 25, and has the advantage that no matrix inversions are necessary. However, it requires the computation of F ′, a nontrivial task.
A theoretical result of this paper shows how to compute without explicitly computing F ′(B k , Γ k )T . We postpone the statement and the lengthy proof of this result to Section 4, but its application yields that
The terms above are defined as follows. First, A k , M k are defined as A , M at the kth step of the iterative scheme. Next, consider the recurrence relation
with final conditions , and define similarly to A but using instead. Also,
It follows from the iterative method (3.1) and identity (3.2) that
where we denote
For given B 1 and Γ 1, the above steps completely describe the method. Indeed, from (3.3) we compute à k and then ξ k , ζ k follow from (3.5). That allows the computation of B k+1 , Γ k+1 from (3.4).
It becomes clear from the numerical simulations that the algorithm performance was sensible to the initial guesses of B 1 and Γ 1. Approximating Γ from the data is usually easier since it depends on the recovering period of the infected patients. That does not hold for B . To come up with a fair B 1, we propose an preprocessing algorithm based on a SI (Susceptible-Infected) model.
The SI model is a simple compartmental models, written as
where we replace the susceptible and infected by the known data and Î, leaving B 1 as the only unknown. It follows from the first equation that
and we set . Note that the second equation in (3.6) is also satisfied since .
For Γ 1, we consider
assuming that patients recover in week, in average.
As a way to measure the overall quality of our approximations and as a stopping criteria of our iterative scheme, we employ the regression (or determination) coefficient
Such coefficient is often used to evaluate the fitting ability of various methods 7), (13), (16), (21), (27. It ranges from zero to one, where being close to one indicates good approximations.
In this work, we stop our iterations as soon as > 0.99999; See Algorithm 1.
4 APPLICATION OF THE MINIMUM ERROR METHOD TO THE MODEL
In this section, we show how to compute the action of the dual of F. Indeed, the following theorem holds.
Theorem 1.Let F be described as above, where (2.1) holds. Then
where we define as follows. Consider first the recurrence relation
with final conditions , and define à as A but using . Let,
Proof. Let F(x ) = D , where x = (B, Γ ) and D is such that (2.1) holds. Let be arbitrary vectors, and λ ∈ ℝ be nonzero. Evaluating the operator F at x + λΘ , we obtain F(x + λΘ ) = D λ , where D λ is such that
As in (2.1), we gather that
with initial condition
The Gateaux derivative of F at x in the direction Θ is given by
where . We denote the following limits
Considering the difference between (4.2) and (2.1), dividing by λ and taking the limit λ → 0, we have
with initial condition
This last equation is yet another system of coupled nonlinear difference equations, depending on the parameter Θ, representing an arbitrary point in ℝ2N . From the minimal error iteration (3.1) and Θ ∈ ℝ2N arbitrary, we have
by definition of adjoint operator. From Eq. (4.3) and the previous equation, we obtain
Multiplying (4.5) by , we obtain
We denote
then, from (3.3), we have
Multiplying (4.8) by , it follows that
Note that
Substituting (4.10) in (4.9), we have
Subtracting equations (4.7) and (4.11),
From (3.3), , and previous equation, we gather that
So we have
From equation (4.5) and the previous equation, we obtain
Then
From Eqs. (4.12) and (4.6)
Since Θ ∈ ℝ2N is arbitrary, we obtain
5 NUMERICAL RESULTS
We consider numerical results for the evolution of the COVID-19 pandemics using data from two cities in Brazil: Rio de Janeiro, with a total population of 6.775.561 people, and the city of Petrópolis, with a population of “only” 307.144 people. The epidemiological data was obtained from the Brazilian Ministry of Health (https://covid.saude.gov.br), for the period March 28, 2020 up to February 10, 2021, when the Brazilian Government started vaccination campaigns. Due to the EMA-smoothing procedure of the data, we consider for practical purposes that the available data starts on April 03, 2020.
Using the minimal error method, implemented as in Algorithm 1, we estimate the time-dependent transmission probability B and removal probability Γ, using as data the susceptible population . In the process, we also estimate R , the size of the immune population at a certain given moment, and I , the total number of infected people. Note that I cannot be obtained directly from since this later data refer to the total amount of infected patients since the start of the pandemic, and I is related to the total amount of sick patients at a fixed day. Knowing B and Γ, we compute the discrete-time basic and effective reproduction numbers
and , ℛ = (ℛ1, ℛ2, ..., ℛN ).
We start by showing that the smoothing step preserves accuracy while smoothing the data. Figure 1, displays and for the cities of Rio de Janeiro and Petrópolis. Note that is able to smooth out the rough data.
Plots for Rio de Janeiro and Petrópolis. The red line represents the cumulative number of confirmed cases from March 28, 2020, to February 10, 2021. The blue line is the EMA of the cumulative number of confirmed cases from April 03, 2020, to February 10, 2021.
Next we show the numerical results related to our scheme. The data estimation for the final days suffer from a minor instability, and to avoid that we disregard the last five days from the data.
Figure 2 presents the results obtained from the SIR model (1.1) using the estimated parameters B and Γ. Subplot (A) compares the susceptible population real data (in red) with the model results (in blue). Note that are no perceptive difference between data and our computer simulation, showing that our parameter estimation algorithm is effective. Subplots (B) and (C) represent the infected and removed population obtained from the SIR model. See also Figure 4 for similar results for Petrópolis.
Plots for Rio de Janeiro. The y-axis represents the population. Subplot (A) shows the susceptible population, where the red line is the real data and the blue line is the approximation obtained from the SIR model (1.1) using the estimated parameters. Subplots (B) and (C) represent the infected and removed population obtained from the SIR model, respectively.
Plots for Rio de Janeiro. In Subplot (A), the blue line represents the transmission probability and red line shows the removal probability. Subplot (B) displays the basic and effective reproduction numbers (we also plot the constant line equal to one as a reference). In Subplot (C), the green line represents the new daily cases from March 28, 2020, to February 10, 2021. The blue line is the EMA of the new daily cases from April 03, 2020, to February 10, 2021. The red plot depicts the predicted new cases using the estimated parameters.
Figure 3-A displays the estimated infection and recovery probability parameters. We point out that the recovery probability is roughly 1/10, very similar to what is used for numerical simulations. Figure 3-B shows the computed basic and effective reproduction numbers. Finally, Figure 3-C shows the number of new reported cases. Note that running SIR model with the estimated parameters yields an accurate aproximation of the smoothed data.
The results for Petrópolis are similar (see Figures 4 and 5) indicating that the method also works for cities with smaller populations.
Remark 1.In this paper, we estimate the parameters βiand γifor i = 1, 2, . . . , N based on known data. Regarding predictions, one could, for instance, use constants β and γ for predictions. In10, the authors predict pessimistic/optimistic outcomes of up to 70 days based on maximum/minimum values of β of a prior period. In29, the author employs the Gomperz model combined with an iterative method to estimate future points.
6 CONCLUSION
Computational modeling yields a powerful helping hand in understanding the dynamics of complex phenomena, but it is often the case that model parameters are not all available. That is the case with epidemiological models, in particular when human activity is involved. Here, we employ a SIR model combined with real data to understand the dynamics of COVID-19 infections. To find out important time dependent parameters modeling the probability of contacts and probability of recovery, we use a minimal error method. This type of scheme yields an iterative way to approximate parameters. There is a caveat however: one of the steps of the algorithm is extremely hard to compute, specially for nonlinear problems as ours. We circumvent such hurdle by carefully constructing auxiliary problems that makes the algorithm feasible.
We show that the scheme is reliable by testing with data from two different Brazilian cities: Rio de Janeiro and Petrópolis. The first one with a population of almost seven million people, and Petrópolis with roughly three hundred thousand people. After approximating the parameters, we use them in the model and reproduce the dynamics of the disease with surprising accuracy. That shows that the estimation of parameters was correct. We point out that the results for both cities were qualitative analogous, indicating that the method does not depend on the population size.
Acknowledgments
The authors acknowledge the financial support of PCI-CNPq (first author) Grant number 301525/2023-4, and FAPERJ (second author) Grants SEI-260003/012979/2021 and SEI-260003/009792/2021.
REFERENCES
-
1 E. Acosta-González, J. Andrada-Félix & F. Fernández-Rodríguez. On the evolution of the COVID19 epidemiological parameters using only the series of deceased. A study of the Spanish outbreak using Genetic Algorithms. Mathematics and Computers in Simulation, 197 (2022), 91-104. doi:https://doi.org/10.1016/j.matcom.2022.02.007 URL https://www.sciencedirect.com/science/article/pii/S037847542200060X
» https://doi.org/10.1016/j.matcom.2022.02.007» https://www.sciencedirect.com/science/article/pii/S037847542200060X -
2 V. Albani, J. Loria, E. Massad & J. Zubelli. COVID-19 underreporting and its impact on vaccination strategies. BMC Infectious Diseases, 21(1) (2021), 1111. doi:10.1186/s12879-021-06780-7. URL https://doi.org/10.1186/s12879-021-06780-7
» https://doi.org/10.1186/s12879-021-06780-7» https://doi.org/10.1186/s12879-021-06780-7 -
3 V.V. Albani, J. Loria, E. Massad & J.P. Zubelli. The impact of COVID-19 vaccination delay: A data-driven modeling analysis for Chicago and New York City. Vaccine, 39(41) (2021), 6088- 6094. doi:https://doi.org/10.1016/j.vaccine.2021.08.098 URL https://www.sciencedirect.com/science/article/pii/S0264410X21011580
» https://doi.org/10.1016/j.vaccine.2021.08.098» https://www.sciencedirect.com/science/article/pii/S0264410X21011580 -
4 V.V.L. Albani, R.M. Velho & J.P. Zubelli. Estimating, monitoring, and forecasting COVID-19 epidemics: a spatiotemporal approach applied to NYC data. Scientific Reports, 11(1) (2021), 9089. doi:10.1038/s41598-021-88281-w. URL https://doi.org/10.1038/s41598-021-88281-w
» https://doi.org/10.1038/s41598-021-88281-w» https://doi.org/10.1038/s41598-021-88281-w -
5 F. Amaral, W. Casaca, C.M. Oishi & J.A. Cuminato. Simulating Immunization Campaigns and Vaccine Protection Against COVID-19 Pandemic in Brazil. IEEE Access, 9 (2021), 126011-126022. doi:10.1109/ACCESS.2021.3112036.
» https://doi.org/10.1109/ACCESS.2021.3112036 -
6 F. Amaral, W. Casaca, C.M. Oishi & J.A. Cuminato. Towards Providing Effective Data-Driven Responses to Predict the COVID-19 in São Paulo and Brazil. Sensors, 21(2) (2021), 540. URL https://doi.org/10.3390/s21020540
» https://doi.org/10.3390/s21020540 -
7 C. Anastassopoulou, L. Russo, A. Tsakris & S. C. Data-based analysis, modelling and forecasting of the COVID-19 outbreak. PLoS ONE, 15(3) (2020). doi:https://doi.org/10.1371/journal.pone.0230405
» https://doi.org/10.1371/journal.pone.0230405 - 8 K. Atkinson & W. Han. “Theoretical numerical analysis”, volume 39. Springer (2005).
-
9 L. Brotherhood, P. Kircher, C. Santos & M. Tertilt. An Economic Model of the COVID-19 Epidemic: The Importance of Testing and Age-Specific Policies. report 13265, IZA Institute of Labor Economics (2020). URL https://www.iza.org/publications/dp/13265
» https://www.iza.org/publications/dp/13265 - 10 E.L. Campos, R.P. Cysne, A.L. Madureira & G.L. Mendes. Multi-generational SIR modeling: Determination of parameters, epidemiological forecasting and age-dependent vaccination policies. Infectious Disease Modelling, 6 (2021), 751-765.
- 11 W. Chen. A mathematical model of Ebola virus based on SIR model. In “2015 International Conference on Industrial Informatics-Computing Technology, Intelligent Technology, Industrial Information Integration”. IEEE (2015), p. 213-216.
- 12 J. Chu. A statistical analysis of the novel coronavirus (COVID-19) in Italy and Spain. PloS one, 16(3) (2021), e0249037.
- 13 Y. Hao, T. Xu, H. Hu, P. Wang & Y. Bai. Prediction and analysis of corona virus disease 2019. PloS one, 15(10) (2020), e0239960.
-
14 H.W. Hethcote. The Mathematics of Infectious Diseases. SIAM Review, 42(4) (2000), 599-653. URL http://www.jstor.org/stable/2653135
» http://www.jstor.org/stable/2653135 - 15 H.G. Hong & Y. Li. Estimation of time-varying reproduction numbers underlying epidemiological processes: A new statistical tool for the COVID-19 pandemic. PloS one, 15(7) (2020), e0236464.
- 16 Y.H. Hsieh, S. Ma, J.X.V. Hernandez, V.J. Lee & W.Y. Lim. Early outbreak of 2009 influenza A (H1N1) in Mexico prior to identification of pH1N1 virus. PLoS One, 6(8) (2011).
- 17 J. Jahn. “Introduction to the theory of nonlinear optimization”. Springer Nature (2020).
- 18 B. Kaltenbacher, A. Neubauer & O. Scherzer. “Iterative regularization methods for nonlinear ill-posed problems”, volume 6. Walter de Gruyter (2008).
- 19 K.M. Kamina, S. Mwalili & A. Wanjoya. The modeling of a stochastic SIR model for HIV/AIDS epidemic using Gillespie’s algorithm. Int. J. Data Sci. Anal, 5(6) (2019), 117.
- 20 W.O. Kermack & A.G. McKendrick. A contribution to the mathematical theory of epidemics. Proceedings of the royal society of london. Series A, Containing papers of a mathematical and physical character, 115(772) (1927), 700-721.
- 21 N. Khan, A. Arshad, M. Azam, A.H. Al-marshadi & M. Aslam. Modeling and forecasting the total number of cases and deaths due to pandemic. Journal of Medical Virology, 94(4) (2022), 1592-1605.
- 22 I.E. Kibona & C. Yang. SIR model of spread of Zika virus infections: ZIKV linked to microcephaly simulations. Health, 9(8) (2017), 1190-1210.
- 23 B. Li & Z. Eskandari. Dynamical analysis of a discrete-time SIR epidemic model. Journal of the Franklin Institute, 360(12) (2023), 7989-8007.
- 24 Z. Liao, P. Lan, Z. Liao, Y. Zhang & S. Liu. TW-SIR: time-window based SIR for COVID-19 forecasts. Scientific reports, 10(1) (2020), 1-15.
- 25 A. Neubauer. A new gradient method for ill-posed problems. Numerical Functional Analysis and Optimization, 39(6) (2018), 737-762.
-
26 W.C. Roda, M.B. Varughese, D. Han & M.Y. Li. Why is it difficult to accurately predict the COVID-19 epidemic?. Infectious Disease Modelling, 5 (2020), 271-281. doi:https://doi.org/10.1016/j.idm.2020.03.001 URL http://www.sciencedirect.com/science/article/pii/S2468042720300075
» https://doi.org/10.1016/j.idm.2020.03.001» http://www.sciencedirect.com/science/article/pii/S2468042720300075 - 27 S. Sannigrahi, F. Pilla, B. Basu, A.S. Basu & A. Molter. Examining the association between sociodemographic composition and COVID-19 fatalities in the European region using spatial regression approach. Sustainable cities and society, 62 (2020), 102418.
- 28 T.E. Simos, C. Tsitouras, V.N. Kovalnogov, R.V. Fedorov & D.A. Generalov. Real-time estimation of R0 for COVID-19 spread. Mathematics, 9(6) (2021), 664.
- 29 J.A.M. Valle. Predicting the number of total COVID-19 cases and deaths in Brazil by the Gompertz model. Nonlinear Dynamics, 102(4) (2020), 2951-2957.
- 30 C. You, Y. Deng, W. Hu, J. Sun, Q. Lin, F. Zhou, C.H. Pang, Y. Zhang, Z. Chen & X.H. Zhou. Estimation of the time-varying reproduction number of COVID-19 outbreak in China. International Journal of Hygiene and Environmental Health, 228 (2020), 113555.
Funding:
Data availability
Data availability statement
APPENDIX A EXPONENTIAL MOVING AVERAGE (EMA)
The real data indicating the number of daily infected patients is too “rough”, and hampers the convergence of the algorithm. That can be avoided by replacing the data with a exponential moving average
as described below.
Moving average techniques smooth data over a specified period of time. There is a wide variety of moving averages, and the Simple Moving Average (SMA), and Exponential Moving Average (EMA) are of interest.
An EMA gives “more weight” to recent numbers in an attempt to make it more responsive to new information. To calculate an EMA, you first choose a window of d days. In our case, we choose d = 10. Then, compute the SMA using the first d days, i.e., simply take the data average of the first d days. Next, it is enough to compute the EMA using appropriate weights. Then, the EMA of the rough data containing the cumulative number of confirmed cases
follows the formula
and represents EMA of at day j. Note that the smoothed data “starts” at day d + 1. Again, we consider d = 10.
APPENDIX B MINIMAL ERROR METHOD
In this appendix we outline mathematical details of the Minimal Error Method. Let F: 𝒟(F) ⊂ ℝp → ℝq be a nonlinear operator, where 𝒟(F) is domain of F, and F(x ) = ( f 1(x ), f 2(x ), ..., fq(x )) = y . The problem is to estimate x , given y .
The transpose of a vector x is denoted by x T . The linear continuous operator F′(x ) : ℝp → ℝq is called the Fréchet derivative of F at x , and in finite dimensional problems this operator is the Jacobian matrix evaluated at x T = (x 1, x 2, ..., x p ) 8), (17.
The transpose (or adjoint operator) F'(x )T (or F'(x )∗) of F'(x ) is an operator F'(x )T: ℝq → ℝp satisfying
where denotes the inner product of the vectors a and b in ℝp .
To obtain an approximation for x , given y and guess initial x 1, we used the minimal error method
where the weight
Above, is the Euclidean norm and 1/M < 2; see 25. In our numerical tests, M = p delivered the best results.
It is possible to show that, under certain conditions, x k converges to a solution of F(x ) = y ; see [18, Theorem 3.21] or [25, Theorem 2.6].
From iteration (B.1), to get x k+1 we need to calculate the transpose of Jacobian matrix F'(x k )T , that makes the algorithm impractical. In this work, we show that it is possible to calculate x k+1 without computing the transpose of the Jacobian matrix.












