Analytical Parameter Estimation of the SIR Epidemic Model. Applications to the COVID-19 Pandemic

The SIR (Susceptible-Infected-Removed) model is a simple mathematical model of epidemic outbreaks, yet for decades it evaded the efforts of the mathematical community to derive an explicit solution. The present paper reports novel analytical results and numerical algorithms suitable for parametric estimation of the SIR model. Notably, a series solution of the incidence variable of the model is derived. It is proven that the explicit solution of the model requires the introduction of a new transcendental special function, describing the incidence, which is a solution of a non-elementary integral equation. The paper introduces iterative algorithms approximating the incidence variable, which allows for estimation of the model parameters from the numbers of observed cases. The approach is applied to the case study of the ongoing coronavirus disease 2019 (COVID-19) pandemic in five European countries: Belgium, Bulgaria, Germany, Italy and the Netherlands. Incidence and case fatality data obtained from the European Centre for Disease Prevention and Control (ECDC) are analysed and the model parameters are estimated and compared for the period Jan-Dec 2020.


Introduction
The dramatic outbreak of the coronavirus disease 2019 (COVID- 19) pandemics and its ongoing progression boosted the scientific community's interest in epidemic modelling and forecasting. The coronavirus 2019 (COVID- 19) disease was reported to appear for the first time in Wuhan, China, and later it spread to Europe, which is the subject of the presented case studies, and eventually worldwide. While there are individual clinical reports for COVID-19 re-infections, the present stage of the pandemic still allows for the application of a relatively simple epidemic model, which is the subject of the present report. The motivation behind the presented research was the intention to accurately model the short-term dynamics of the outbreaks of COVID-19 pandemics, which by the time of the first submission of the present article, has infected more than 27 million individuals worldwide. The efforts to contain the spread of the pandemic induce sustained social and economic damage. Therefore, the ability to accurately forecast short to medium-term epidemic outbreak's dynamics is of substantial public interest.
The present paper focuses on the utility of the SIR (Susceptible-Infected-Removed) epidemiological model in epidemic outbreak modelling. The SIR model was introduced in 1927 by Kermack and McKendrick in 1927 to study the plague and cholera epidemics in London and Bombay [1]. To date the SIR model remains as a cornerstone of mathematical epidemiology. It is a deterministic model formulated in terms of ordinary differential equations (ODEs). The model has been extensively used to study the spread of various infectious diseases (see the monograph of Martcheva [2]). Outside epidemiology, the SIR model is also extensively used in modelling of online social networks, viral marketing, diffusion of ideas, spread of computer viruses, financial network contagion, etc. (see recent survey by Rodrigues and the references therein [3]).
The SIR model can be modified in several ways, for example by including demographics, deceased population (i.e., SIRD) or hidden populations (i.e., "exposed" individuals-SEIR) [2]. As the conditions of an accelerating epidemic outbreak often make contact tracing problematic, the SEIR model needs to make additional assumptions. Therefore, outcome variables, such as mortality, can be foretasted more easily using a simpler model, e.g., using the SIR model. Recently, several authors demonstrated that the first wave of COVID-19 followed SIR dynamic, which by itself, is an interesting finding [4][5][6][7][8][9].
The present paper has two main objectives -(i) to report some new analytical results about SIR model and (ii) to introduce an algorithm for the estimation of the parameters of the SIR model from empirical time series data. A challenge with the forecasting, based on empirical estimation of the parameters, is the inherent uncertainty built in such estimates. This combined with the multiplicative interactions in the SIR model variables can lead to huge discrepancies between the observed and forecasted values. While the SIR model has been modified to include also other sub-populations the empirical estimation of the model parameters poses even greater challenge. In contrast to previous approaches, the paper does not approach the SIR model as an initial value problem but as a problem in the theory of special functions. This change of perspective allows for relative ease of handling of noisy data, e.g., time series having fluctuations caused by delays and accumulation of case reporting. The numerical approach was applied to the COVID-19 incidence and case fatality data from different European countries, having different population densities and dynamics of the epidemic outbreaks. The methods of the present paper go beyond the presented COVID-19 application case and can be used in a variety of fields as indicated above.

The SIR Model
The SIR model is formulated in terms of three populations of individuals. The S population consists of all individuals susceptible to the infection of concern. The I population comprises the infected individuals. These persons have the disease and can transmit it to the susceptible individuals. The R population represents the immune individuals, who cannot become infected and cannot transmit the disease to others. The model comprises a system of three ODEs:Ṡ The model assumes a constant overall population N = S + I + R [1]. A disease carrier infects on average β individuals per day, for an average time of 1/γ days. The β parameter is called disease transmission rate, while γ -recovery rate. The average number of infections arising from an infected individual is then modelled by the number R 0 = β γ , the basic reproduction number. Typical initial conditions are S(0) = S 0 , The model can be re-parametrized using normalized variables aṡ subject to normalization s + i + r = 1 and time rescaling τ = βt. This is a model in dimensionless time τ. It this way, g also becomes a dimensionless parameter. Since i(τ) is integrable on [0, ∞) then i(∞) = 0.

The Implicit Analytical Solution
The analytical solution will be formulated first in an implicit form. Since there is a first integral by construction the system can be reduced to two equations: must hold for the infection to propagate. R e is called the effective reproductive number, while the basic reproduction number is R 0 = R e N [10].
In order to solve the model we will consider the two equations separately. Direct integration of Equation (7) gives where the constant c can be determined from the initial conditions. In the present treatment, the constant c will be left indeterminate to be assigned by the different re-parametrization procedures. The s variable can be expressed explicitly in terms of the Lambert W function [11]: where the signs denote the two different real-valued branches of the function. Note, that both branches are of interest since the argument of the Lambert W function is negative. Therefore, Equation (5) can be reduced to the first-order autonomous systeṁ valid for two disjoined domains on the real line. The equation can be solved for the time τ by quadrature as Remark 2. There is another equivalent form of the system using the Wright Ω function [12] since where j represents the imaginary unit.
The s variable can be determined by substitution in Equation (4), resulting in the autonomous systemṡ = −s(−s + g log s + c) (12) which can be solved implicitly as Remark 3. This implicit solution for the s-variable has been derived originally in [13]. Note that in the present case it was not necessary to derive and solve a Bernoulli differential equation [13,14]. Therefore, this is a new method of proof. The authors did not establish the non-elementary character of the integral. The results for the i-variable are original.
Finally, the r variable can also be conveniently expressed in terms of i. For this purpose we solve the differential equation For the purposes of curve fitting we assume that i(−∞) = r(−∞) = 0. Therefore,

Peak Value Parametrization
The peak-value parametrization is necessary for the treatment of the problem as a special function. The initial value parametrization is sensitive to the noise in the initial value conditions, and is therefore unsuitable for curve-fitting. The upper terminal of integration can be determined by the requirement for the real-valuedness of i. This value of i is denoted as i m ; that is The peak-value parametrization is supported by the fact that i(t) attains a global maximum i = i m = c − g log g − g (Proposition A1).
If we consider formally the phase space z × y = −gz W ± −e z−im g −1 + 1 the following argument allows for the correct branch identification. For i → −∞ it follows that Furthermore, the recovered population under this parametrization is under the same choice of origin.

Initial Value Parametrization
As customarily accepted, the SIR model can be solved as an initial value problem. The indeterminate constant c can be eliminated using the initial condition For this case, the following autonomous differential equation can be formulated: This can be solved implicitly by separation of variables as It is noteworthy that the time to the peak of infections t m can be calculated as The result follows by considering the autonomous system Equation (7) and fixing the upper terminal of integration s = g. However, by Proposition A3 this definite integral can be evaluated only numerically.

Is the Incidence Function "New"?
The incidence i-function of the SIR model appears to be an interesting object of study on its own. One may pose the question about the representation of this function by other, possibly, elementary functions. The answer to this question is in the negative as will be demonstrated below. In precise terms, this function is non-Liouvillian. However, this does not mean that the function can not be well approximated. Fortunately, this is the case as the i-function can be approximated for a sufficiently wide domain of parameter values by Newtonian iteration. Allowing for the underlying field to be complex numbers C, the trigonometric functions become elementary as well.

Definition 2 (Liouvillian function).
We say that f (x) is a Liouvillian function if it lies in some Liouvillian extension of (C(x), ) for some constant field C.
As a first point we establish the non-elementary character of the integral in Equation (11). The necessary introduction to the theory of differential fields is given in the Appendix C. From the work of Liouville it is known that if a function F(x) = f (x)e q(x) , where f , q are elementary functions, has an elementary anti-derivative of the form [15] F(x)dx = f e q dx = he q for some elementary function h(x) [16]. Therefore, differentiating we obtain f e q = h e q + hq e q so that if e q = 0 h + hq = f holds. The claim can be strengthened to demand that h be algebraic for algebraic f and q.

Theorem 1. The integrals
are not Liouvillian.
Proof. We use i m parametrization. Let c = i m + g − g log g. The proof proceeds by change of variables -first ξ = g log y − yg + g + i m ; followed by z = log ((g log y + i m + g)/g).
The last integral has the form Ae z e e z − Ae z dz which allows for the application of the Liouville theorem in the form of Corollary A1. We can identify for some unknown algebraic h(z). Since the left-hand side of the equation is transcendental in z so is the right-hand side. Therefore, the integrand has no elementary antiderivative. Theorem 2. The incidence function i(t), defined by the differential Equation (10), is not Liouvillian.
Proof. For the present case, let us assume that i(0) = i m so that i attains the maximum by Proposition A1. Therefore, Without loss of generality let g = 1, which amounts to scaling of the solution by the factor of 1/g. Suppose further that for some algebraic function u (log-extension case). Then On the other hand, However, if u is algebraic so is u by Theorem A1. Therefore, we have a contradiction, since the left-hand-side is transcendental. Hence, i is not part of a logarithmic elementary extension. Suppose that u is exponential, i. e., u = e f for some algebraic function f . In this case, Therefore, the right-hand-side is exponential and can not be algebraic as it is demanded by Corollary A1. This is a contradiction, hence f can not be algebraic, hence u is not part of an exponential elementary extension. Finally, suppose that i(t) is algebraic. Since the Wright function Ω(z) is transcendental [12] it follows that W −e i−i m −1 = Ω(i − i m − 1 + iπ) can not be algebraic in i. Therefore, i /i and hence i must be transcendental. Hence, the case of an algebraic i(t) can not hold either.
In summary all three cases are rejected, therefore, i is not Liouvillian.

Explicit Series Solutions
We will derive two types of series for the i-function in view of the different reparametrizations of the SIR model. The series can be derived starting from Equation (10) and applying the Taylor theorem.

Series for the i m Parametrization
The natural parametrization is fixing the peak at the origin. The Taylor development can be computed as follows: and for the logarithm

Series for the i 0 -Parametrization
The Taylor series starting from an initial value i 0 is The Taylor series for the logarithm starting from an initial value i 0 is The series follow directly from successive differentiation of the differential Equation (19).

Numerical Approximation
The i-function can be efficiently approximated by the Newton's method. The Newton iteration scheme is given as follows for the c-parametrization: This is a conceptually simple representation. However, it has the disadvantage of using the Lambert function inside the quadrature routine. Another equivalent representation is ). This form has the advantage of requiring only 1 Lambert function evaluation per iteration and using only elementary functions in the quadrature routine.
A point of attention here is the choice of the initial value for the iteration scheme. Despite the present author's best efforts, a rigorous analytical asymptotic valid on the entire real line and for all parameter values could not be found. Numerical experiments gave acceptable results using the formula f (x) = b e 1−xc−e −xc g > 0, c = 2bg or c = 2 bg/e, and additionally c ← c/ √ e, x > 0 for the initial value of The analytical formula involving first exponentiation and then computation of the Lambert W function has disadvantages for large arguments due to float under or overflows [12]. Therefore, another special function can be used in principle, notably the Wright Ω function. On the other hand, optimized routines for its calculation are not readily available in MATLAB.

Plots
Plots of the branches of the integral I(x) (Figure 1) were obtained by direct numerical integration using the QUADPACK [17] routines in the Computer Algebra System Maxima. Plots of the SIR model ( Figure 2) were obtained using a Java routine [18] implementing the double exponential integration method [19,20]. Both methods turn out to be suitable for the numerical integration problem.

Datasets
The COVID datasets were downloaded from the European Centre for Disease Prevention and Control (ECDC) website: https://opendata.ecdc.europa.eu/covid19/casedistribution/csv. The downloadable data file was updated daily until 14 December 2020 and contains the latest available public data on COVID-19 aggregated per country. The data collection policy is available from https://www.ecdc.europa.eu/en/covid-19/data-collection.

Data Analysis Pipeline
The SIR model was formulated to model epidemic outbreaks with short incubation period [1]. The model has only two independent variables and two parameters, which allow for their estimation from raw data. This allows for efficient curve-fitting approach as demonstrated further.
The SIR model can be modified into SIRD to account for the deceased population. This modification will not result in qualitative difference in the observed dynamics as it does not change the structure of the equations for the i and s-variables. Hence, it allows for an analysis using the SIR model.

Data Processing
The data were imported in the SQLite https://www.sqlite.org database, filtered by country and transferred to MATLAB for parametric fitting using native routines. Quadratures were estimated by the default MATLAB integration algorithms Estimated parameter values were stored in the same database.

Parametric Fitting
The parametric fitting was conducted using the fminsearchbnd routine which implements least-squares constrained optimization algorithm and is an alternative to the proprietary non-linear least squares routine of MATLAB [21]. To reduce the impact of the fluctuation in the weekly reporting of data the parametric fitting procedure was applied first to three day moving average of the time series. The fitting equation is given by where I t is the observed incidence or case fatality, respectively. For numerical stability reasons the time variable was rescaled by a factor of 10. The i m and T were estimated from the observed data as the apparent peak and the time to the apparent peak, respectively. The initial estimate of N was fixed to 1. An initial estimate of 0.75 was used (i.e., corresponding to R 0 = 1.33) for the g parameter.

Case Studies
The approach in the present paper is exemplified with data from ECDC for several European countries in the period Januanry 2020-December 2020. The data analysis is limited to 14 Dec, since then ECDC changed reporting policy to weekly averages instead of daily averages. The dataset is available from https://zenodo.org/record/4383118 [22]. The paper focuses on five European countries -Bulgaria, Belgium, the Netherlands, Germany and Italy for the following reasons. Italy was selected as the country where the first outbreak erupted in Europe. Germany was selected as another example of a large European country with very intense internal and cross-border traffic. Belgium and the Netherlands were selected as densely populated European countries with intense internal and cross-border traffic. Moreover, the outbreaks in both countries could be traced to the North Italian outbreak. Finally, Bulgaria was selected as an example of an European country with relatively few cases during the first half of 2020.

Analysis of Case Fatality Data
The observed case fatality represented a parameter, which could be established with more confidence in the beginning of the pandemic due to the lack of testing and the non-specificity of the clinical signs of COVID-19. Hence, it was the primary target of the parametric fitting. The data fitting procedures are illustrated with the case fatality data of Belgium and are presented in Figure 3. The intermediate parameters are initially estimated on the 3-day moving average data. The final fit was performed on the raw data, using the intermediate parameters as initial values. The cumulative mortality data were estimated from Equation (17). As can be appreciated from Figure 3 fluctuations in reporting did not have a detrimental effect on the estimation procedure. The results for Belgium, the Netherlands, Germany and Italy are presented in Table 1 and

Analysis of Incidence Data
The raw data demonstrated weekly fluctuations most probably caused by the reporting irregularity due to weekend breaks and fluctuations in the testing demand. It is especially pronounced for the morbidity data of Germany for the presented period. The incidence data were analysed in the same way using the fitted parameters for the case fatality as initial values. The fitting results demonstrate different lags of the peaks of incidence vs case fatality in the studied countries. For example, for Germany it was 2.2 weeks, while for the Netherlands it was 0.3 weeks.

Analysis of the Second Wave
Changes of containment policies are meant to result in changes in the epidemic outbreak dynamics. This can be followed by the SIR model as demonstrated in the Bulgarian incidence dataset for the period March-July 2020, where resuming of public sports events in the end of June correlates with the third increase of incidence ( Figure 5). The process is difficult to automate because of the fluctuations in the data. Nevertheless, it was possible to accurately track the first three outbreaks. The same approach was applied in the analysis of the second pandemic wave generally appearing after week 20 in the reported dataset. The results are presented in Figure 6 and Tables 2-4. Bulgaria was added to Tables 2-4 since the data exhibited pronounced peaks in both case fatality and incidence. Regarding the case fatality, Belgium, the Netherlands, and Italy exhibited smaller peaks during the second wave. All countries (except Bulgaria, since there was no pronounced first wave, Figure 5) exhibited an increase of R 0 for the case fatality. The case fatality peaks exhibited synchrony for Belgium and the Netherlands, corresponding to their geographical proximity. This was also true for the incidence peaks.  Table 3. Incidence parameters, first wave. T is given in weeks and refers to the time passed since 1 January 2020; R 0 = 1/g; i m corresponds to the peak of the case fatality.  Table 4. Incidence parameters, second wave. T is given in weeks and refers to the time passed since 1 January 2020; R 0 = 1/g; i m corresponds to the peak of the case fatality. Regarding the incidence, the peaks of the second wave were larger everywhere. Belgium and Italy exhibited a drop in R 0 . The R 0 for Germany and the Netherlands appear to be anomalous as they are at large odds with the respective parameters for the case fatality. The raw data are smoothed with a 3-day moving average filter; mortality represents the case fatality, morbidity represents the incidence.

Discussion
The presented results can be discussed along three main directions.

Analytical Aspects
For decades the SIR model evaded the efforts of the community to derive explicit solution. A formal analytical solution of the SIR model has been found only recently and formulated in the traditional setting of an initial value problem [13]. Yet, another perspective can be also of merit -the model can be treated as a manifold problem, which can be parametrized by any point on the flow. This is precisely the approach implemented by the peak-value parametrization in the present paper. The present paper establishes novel analytical results about the SIR model. The series solutions presented here are original. Other original results are the non-elementarity proofs for most of the presented integrals. Another interesting point is the proof of the non-Liouvillian character of the incidence i-function. An alternative proof could be also given, in principle, based on the work of Prelle and Singer [23].

Numerical Aspects
Presented results demonstrate the robustness of the fitting procedure with regard to the fluctuations in the raw data. On the other hand, more efforts are necessary in establishing a robust asymptotic of the incidence i-function. This is a clear direction for future research. Presented method is an alternative to commonly used phenomenological models (i.e., exponential, Richards, logistic, delayed logistic for R 0 estimation [24]) and can in principle be cast in a maximum likelihood fitting procedure. Such work, however, goes beyond the scope of the present paper.

Epidemiological Implications of the Results
Recorded data necessarily suffer from diverse biases. For example, the marked difference in the availability of tests in the early stages of the pandemics in different countries. Another one is the unsteady reporting resulting in fluctuations of the numbers. This severely limits the usefulness of the model formulation as an initial value problem, which is the standard numerical staring point. This can result in a drastic overestimation of the infection peak (see for example the predictions for UK in [25]).
A key finding of the present report is that simple models can be very useful in studying the epidemic outbreaks. This can be eventually extended to predicting the effects of different containment measures or the lack thereof [8]. Presented analysis corroborates the finding of other authors about the utility of the SIR model in analysing the COVID-19 pandemics [4,[6][7][8]. Presented results indicate that there is a universality in the time evolution of COVID-19 and the same epidemic model, notably SIR, can be applied to countries having large differences in populations sizes and densities. More interestingly, the model seems to fit well also the case fatality data, which can be interpreted in the sense that the vulnerable population forms a distinct subpopulation from all susceptible individuals (e.g., elderly people). The data also lend support to a simple modification of the SIR model: notably -the SIRD model with an independent population of dead (D) persons. This corresponds to the recent findings of other authors [5,9]. Proof. We use the change of variables ξ − c = g log y − y and then simplification by the defining identity of the Lambert W function. The Wright Ω function is related to the Lambert W function [11].
where K(z) = (Im(z) − π)/2π is the unwinding number of z. Moreover, for the principal branch of the logarithm. It is a transcendental function. It obeys the differential equation The Ω function is non-Liovillian [26]. Its indefinite integral is: In what follows is assumed that the differential field is of characteristic zero and has an algebraically closed field of constants. An element y of a differential field is said to be an exponential of an element A if y = Ay, an exponential of an integral of an element A if y = Ay; logarithm of an element A if y = A /A, and an integral of an element A if y = A.
The next definition is due to [26].
θ i /θ i ∈ k(θ 1 , . . . , θ n−1 ) holds. The constant subfield C(K) of K is defined to be the set of c in K, such that c = 0.
The next theorem is due to [16]. Theorem A1. If K is an elementary field, then it is closed under differentiation.
An elementary integrability theorem due to Conrad [16].
Theorem A2 (Rational Liouville criterion). For f , g ∈ C (x) with f and g non-constant the function f (x)e g (x) can be integrated in elementary terms if and only if there exists a rational function h ∈ C (x) such that h + g h = f .
The last result can be extended to algebraic functions as follows.
Corollary A1 (Algebraic Liouville criterion). For f (x), g(x) algebraic and non-constant, the function f (x)e g(x) can be integrated in elementary terms if and only if there exists an algebraic function h(x), for which h + g h = f .
Proof. Suppose that f and g are arbitrary elementary algebraic functions. Denote the primitive of f as f ÷ F. The integral can be integrated by parts I = f (x)e g(x) dx = e g (x)dF = F(x)e g(x) − F(x) e g(x) dx Therefore, f (x) + F(x)g (x) e g(x) dx = F(x)e g(x) We observe that g (x) is elementary by Theorem A1. The L.H.S has the form f e g and since f (x) + F(x)g (x) is elementary we can identify h ≡ F, f 1 ≡ f + Fg = h + hg so that (h + hg )e g = (he g ) and the claim follows.