LINK to Github repository with the Python 2.7 code, data and analysis.
All data provided by Ministerio de Sanidad, Gobierno de España
Last analysis and projections using data available up to April 21st: FOLLOW THIS LINK
For analysis obtained using data for previous days: FOLLOW THIS LINK
Analysis is based on the simultaneous study of four different collection of data for the whole Spain: Cases, deaths, ICUs and cured.
For each set of data both accumulated numbers and numbers per day are analyzed. That it, we analyze both the sigmoid function and its derivative. This provide some extra robustness to the analysis. Therefore there are two curves for each set of data, one based on the accumulated data an the other based on data per day. In an ideal situation both curves should be identical, the separation reflects tjhe fact that the used sigmoid may not be fully able to represent the reality.
In addition, information obtained from some data can be useful to impose restrictions on others. For example: number of cured cases cannot be larger than the number of cases, and the sigmoid representing the number of deaths or number of cured cases must be delayed a few days compared with the sigmoid representing the number of cases.
The range of variation for this delay is set on the basis of evidences provided by:
Sanche S, Lin YT, Xu C, Romero-Severson E, Hengartner N, Ke R. High contagiousness and rapid spread of severe acute respiratory syndrome coronavirus 2. Emerg Infect Dis. 2020 Jul [date cited]. https://doi.org/10.3201/eid2607.200282
The basic idea of the analysis is to consider that, like many other phenomena in physics, chemistry, biology, ecology, technology, etc… this complex problem of the fight against thecovid-19 can be simulated by a sigmoid function.
The employed sigmoid function is related to the logistic function:
introduced by Pierre Francois Verhulst in the context of the study of population evolution. This function has a sigmoid shape and is solution of the differential equation:
where A = 1 and we allow for a time delay:
Fitting this sigmoid into the experimental data is not difficult as only three parameters are involved. This fitting provides then and estimation for Max (maximum value of the sigmoid), r (rate of change) and t0 (location, in time, of the point of inflection).
Modification of our behavior, new measurements taken in the fight against the virus, lack of resources, etc, they all compete in this complex problem, so one of the questions is, would we observe a deviation of the evolution away from a simple sigmoid thank to our measures to fight against the virus or, on the contrary, due to our lack of capability to do it…. or on the contrary, the problem evolution responds to a simple sigmoid in spite of all our good and bad choices ?
You can see how the calculated sigmoid changes as the days pass and we accumulate more data… and so far, there are little deviation away from the initial guesses made in the last days of march (?)
There are many natural phenomena that can be describe by differential equations whose solution has a sigmoid shape. Applications are numerous. Just to limit the analysis to the simplest cases, let’s have a look at two simple examples: the Gompertz sigmoid and the SIR model (susceptible- infected – removed).
Gompertz sigmoid is due to Benjamin Gompertz (1825):
The SIR model, that is more especific for the analysis of infectious diseases, is a little bit more complex. And is the solution of these three differential equations:
As it can be seen in the analyses shown in the different days, fitting of these three models to the data is similar, but future projections can slightly differ. As an example, the estimations obtained on April 17th ans 21st are show below
LINK to Github repository with the Python 2.7 code, data and analysis.
All data provided by Ministerio de Sanidad, Gobierno de España
Last analysis and projections using data available up to April 21st: FOLLOW THIS LINK
For analysis obtained using data for previous days: FOLLOW THIS LINK
.