Mathematical analysis and modeling help to better understand the transmission of infectious diseases [1] . They are essential to predict the speed of an emerging outbreak, as well as the peak of infection and total amount of infected people and deaths. These mathematical tools become crucial when trying to control unknown diseases having mortality and transmission potential to become epidemic. Effectively, they can be used to identify potential public health interventions, to predict their impact and to retrospectively assess their efficacy [2, 3] . This is the case of the COVID-19 disease first registered in China by December 2019 and rapidly spread with pandemic proportions and devastating effects [4] . Lockdown, social distancing, testing and tracing policies implemented by governments around the world have allowed tackling and mitigating the effects caused by the SARS-CoV-2 virus.
can affect the involved metrics. Finally, general conclusions are drawn in Section 6.
One of the simplest compartmental models in epidemiology, which is the basis for more complex ones is the SIR model [1] . It aggregates the total population N in three compartments: the susceptible S, the infectious I and the removed R ones. The equations describing the model dynamics are
where β 0 is the average of contacts per person per time and γ −1 is the average time period that an individual is infective. The infective individuals are capable of infecting susceptible ones. In fact, after an infectious contact, the susceptible individual transitions to the infectious compartment. Removed individuals are those that are no more infective, either because they recovered or died. Transition from compartment S to compartment I takes place at the rate β 0 I(t)S(t) N where S(t) N is the probability of contacting a susceptible individual. Then, β 0 S(t) N is the average of infections per time transmitted by an infective individual, called also infection rate or contagion rate. On the other hand, the transition from compartment I to compartment R occurs at the removal rate γ.
The SIR model (1) does not include the so-called vital dynamics, assuming births and deaths occur at much lower rates than the compartment transition rates. Otherwise, they should be included in the model. Also, (1) can be modified to account for the loss of immunity, in which case removed individuals move back to the susceptible compartment at the immunity rate. This is the so-called SIRS model [20] . Another variation of the SIR model is the SEIR one, which includes an intermediate compartment in the transition from S to I. This compartment E refers to exposed individuals who are infected but not yet infective. This model is used when the incubation period is comparable to the infectious one [4] .
The susceptible compartment has very important effects in the long-term evolution of the disease, steady state and stability. In contrast, when the disease is studied over a relatively short period of time, or the transition rates are derived from data, or during an initial exponential phase of a disease, the S compartment can be disregarded. In that case, the epidemic can be described by a two-compartmental model. In this work, we conveniently rearrange the population in the infectious compartment I and the cumulative infected compartment C. The C compartment merges all individuals that have been infected, that is C = I + R:
In (2), the transition rates are explicitly written as function of time. The time-varying β(t) accounts for the S(t)/N ratio in (1) as well as for changes in habits and interventions. For instance, the use of mouth caps or masks and hygiene care reduce the probability of a contact to be infectious, and therefore reduce β. Also β is reduced by social distancing and lockdown. Obviously, β increases back when these measures are relaxed. On the other side, the removal rate γ varies with time because of new treatments, drugs, etc. Also, time-varying rates are typically obtained when fitting the model to collected data.
Consider the transition rates in (2) are constant:
It is clear that the model dynamics is governed by the infectives. In fact, the I dynamics is autonomous, whereas the C (and R) dynamics are given by integration of I(t). We therefore focus for the moment on the I dynamics. The solution to the first equation of (3) is
The infectious compartment increases exponentially when the contagion rate is greater than the removal one (β > γ), decays exponentially when β < γ and remains constant when β = γ. A measure commonly used to quantify the progress of a disease is the so-called reproduction ratio R e , which is defined as the average number of infections caused by a single infective individual during his infectious period [15] . Taking into account that β is the average infectious contacts per person per time and the average infectious period is γ −1 , it is clear that the reproduction ratio can be written in terms of the transition rates of (3) as
Using (5), the solution (4) can be rewritten as
Because of the definition of the reproduction ratio R e , it is of particular interest to determine the change in the infective population one infectious period γ −1 ahead:
= e (Re−1) ,
A reproduction ratio R e > 1 means that the disease expands, whereas R e < 1 means that the epidemic goes extinct. If R e ≈ 1, the probability that an individual infects another one during the infection period of who infected him is very low, therefore the epidemic progresses in proportion to R e . Conversely, if R e is high, this probability is not negligible and the epidemic grows faster than what R e predicts. Obviously, in this time-invariant case, R e applies forward and backward in time. The reproduction ratio uniquely determines the progress of a disease when the time unit is the infectious period. In fact, if time is scaled as
where dτ is the probability that an infective individual is removed from compartment I during the time interval dt, the disease dynamics is governed by
so that the infective people one average infectious period ahead is
Another metric, closely related to the reproduction ratio, usually used to measure the progress of a disease is the doubling time t 2e . As its name suggests, it is the time elapsed until the infective population doubles. The doubling time is easily obtained from (4):
yielding
Obviously, the doubling time in a constant rate exponential phase is valid both forward and backward in time. Furthermore, in case the disease is in a contraction phase, the doubling time will take a negative value.
By properties of logarithmic functions, I(t) in (4) can be rewritten as
Both metrics R e and t 2e are obviously related by
,
where τ 2e is the doubling time given in average infectious periods. For instance, for R e = 1.69, the amount of infective individuals doubles every average infectious period.
The solution to (3) from arbitrary initial conditions I(t 0 ) > 0 and C(t 0 ) ≥ I(t 0 ) is
Let focus on the expanding case with β > γ, which means that I grows exponentially and doubles every t 2e . Furthermore, consider initial conditions
The particular solution from them is the following permanent-state exponential solution
which means that C grows in proportion to I from t 0 :
That is C * (t 0 ) is compatible with the permanent-state exponential growth. Because of the proportionality among variables, equations (7), (10), (12) and (14) apply also to C(t). This also means that the doubling time can be indistinctly calculated from the data of infective or cumulative infected population.
It should be noticed that a permanent-state exponential decay cannot be defined. In fact, from (3), C is always increasing, whereas I is decreasing whenever β < γ. So, for C(t) to be proportional to I(t) the condition C(t) < 0 would be required, which is obviously infeasible.
Reconsider the solution to (3) from arbitrary initial conditions I(t 0 ) > 0 and C(t 0 ) ≥ I(t 0 ). Comparing with the particular solution (16) , during an exponential growth (15) can be rewritten as
The dynamics of I remains the same, and so the doubling time (12) . Now, C(t) is not proportional to I(t) because of δ(t) that vanishes exponentially. Depending on the initial error δ(t 0 ), it may take several doubling times for δ(t) to be negligible. More precisely, for any 0 < a < 1 and δ > a,
. That is, it may take several doubling times for the cumulative cases C to approach the permanent-state exponential growth.
This transient behavior in C-dynamics has some important implications. Particularly, the doubling time for infective and cumulative infected populations are no more the same even though the transition rates are constant. We can say that the disease reaches the new permanent-state exponential phase just when δ(t) vanishes. During the transient, although transition rates are constant and doubling time of infective people is constant, the doubling time of cumulative cases t 2C varies with time. Indeed, for any t > t 0 , the doubling time t 2C satisfies C(t + t 2C ) = 2C(t):
thus,
It is common practice to compute the doubling time from confirmed cases data, in which case the relative error e t 2C between t 2C (t) and t 2e is obtained by comparison with (12):
The time t ǫ elapsed to bound the error |e t 2C (t ǫ + t 0 )| < ǫ provided |e t 2C (t 0 )| > ǫ can be derived from the previous equations:
.
Also, the relationship among the reproduction of C and the reproduction ratio R e can be similarly determined. In fact, from the second equation of (18) evaluated at t and one infectious period ahead yields
As expected, the reproduction of C approaches that of the permanent-state exponential growth as δ(t) vanishes.
This example aims to illustrate the evolution of the doubling time during the initial transient of an exponential phase from arbitrary initial conditions. Furthermore, the error of approximating the doubling time using data of cumulative infected cases C is quantified. Suppose the disease grows exponentially until t = 0 with a constant reproduction ratio R − e . At t = 0, the contagious rate β is stepped so that a new exponential phase with reproduction ratio R + e starts from initial conditions determined by the previous exponential phase. Two cases are considered:
1. R − e = 1.5 and R + e = 2. 2. R − e = 3 and R + e = 2. The doubling time for t ≥ 0 (measured in infectious periods) is τ + 2e = ln(2) ≈ 0.69. The initial value of δ(t) can be computed from the reproduction ratios before and after t = 0:
so that e t 2C (0) = log 2 (5/4) ≈ 0.32 and e t 2C (0) = log 2 (7/8) ≈ −0.19 for the two cases, respectively. Figure 1 shows the evolution of the doubling times during the initial transient of the exponential phases from arbitrary initial conditions. The left and right columns correspond to cases 1 and 2, respectively. The top row depicts the state planes C − I, with a diamond indicating time t = 0. The middle row shows the time response of both cumulative infected (black) and infective (red) populations. It can be observed that the condition at t = 0 is imposed by the previous exponential phase. Finally, the bottom row compares the doubling time for cumulative infected (t 2C in black) and infective (t 2 = t + 2e in red) population. The doubling time is t + 2e = γ −1 ln(2) for all t > 0, while the doubling time of cumulative infected population t 2C varies with time and converges to t + 2e after 5 doubling times approx. Therefore, we can say that it takes 5 doubling times for the disease to reach the new exponential phase. However, a shorter time would be probably needed to bound the error |e t 2C |. For instance, if an error ǫ = .05 is acceptable, a period t ǫ ≈ 2.8t + 2e and t ǫ ≈ 1.9t + 2e would be enough according to (22), respectively. Anyway, the transient form arbitrary initial conditions to the permanent-state exponential growth is longer as the disease growth is slower.
Let go back to the time-varying model (2) . The solution of the differential equation for I is:
The doubling time t 2 (t) obviously varies with time, and can be defined forward (t + 2 (t)) and backward (t − 2 (t)) in time:
From (25)-(26), t + 2 (t) y t − 2 (t) are the solutions of t + 2 0 (β(t + s) − γ(t + s))ds = ln (2),
The computation of the doubling time for the C-population (t 2C (t)) requires integrating the second equation of (2) after replacing I(t) with (25). As can be expected, t 2C (t) generally differs from t 2 (t). Figure 2 qualitatively compares these doubling times.
The top-left plot illustrates a constant-rate exponential phase where doubling of C and I occurs simultaneously (t 2C = t 2 ). The bottom-left plot depicts the case of disease deceleration from (2I 0 , 2C 0 ) with infective population growing slower than the cumulative infected one, thus resulting in t 2C (t) < t 2 (t). The case of a disease in acceleration is shown in the top-right plot, with the infective population growing faster from (2I 0 , 2C 0 ), so that t 2C (t) > t 2 (t). Finally, the bottom-right plot illustrates the case of a regrowth of the disease from (I 0 , C 0 ), where the previous conclusion is much more evident. In many cases, particularly in the latter one, the initial conditions should be reset to reduce the difference among doubling times. In the same way as with doubling time, the reproduction ratio can be defined forward (R + (t)) and backward (R − (t)) in time. It is convenient to scale time as in (8):
Defining
yields expressions similar to (10):
Obviously, since they are defined over different time windows, there is no more a direct relationship between doubling time and reproduction ratio as in the time invariant case (see (14) ). Solution for t ± 2 (t) to (27) can be obtained numerically in the general case. A possible algorithm that makes use of a numerical integrator (e.g. a trapezoidal method) is described in Fig. 3 . Figure 4 shows the reconstruction of t + 2 , t − 2 based on the algorithm described in Fig. 3 . The input data correspond to Argentina COVID-19 cases from March 3rd to August 6th (157 days). From top to bottom the plotted signals are C(t), I(t), β(t) and γ(t), t + 2 (t) and t − 2 (t). Time-varying estimates of β and γ denoted as β(t), γ(t) were obtained with an observer. The convergence errors of the observer are responsible for the discrepancies among the different computations of the doubling times.
Computing t + 2 (t) requires knowing the transition rates for a time window [t, t + t + 2 (t)], where t + 2 (t) is to be calculated. Therefore, when t + 2 (t) is being computed on-line, a prediction of the transition ratesβ andγ for a long enough time horizon is required.
The simplest prediction is Require: vectors t, β(t), γ(t) and time instant t * . Figure 3 : Numerical algorithm for solving t + 2 , t − 2 in eq. (27) for the function z(t) = β(t) − γ(t) at t = t * . Function CumulativeIntegral(·) returns a vector corresponding to the cumulative integral at each sampling time. β (t + s) = β(t) ∀s > 0,
In practice, this is equivalent to assume an exponential phase from arbitrary initial conditions begins at t with constant transition rates β(t) and γ(t). The estimated doubling time of the infective populationt + 2 (t) is, as expected,
We have previously studied the discrepancy among doubling times for cumulative infected and active infective populations under exponential phases from arbitrary initial conditions.
A prediction that accounts for the drift of the transition rates can alternatively be used to compute t + 2 from (27). Consider,
where, for the sake of brevity and without loss of generality, a zero-order prediction of γ(t + s) is used. The estimated doubling timet + 2 (t) can be derived from (27). After some trivial algebraic steps, one arrives to the following expression as function of t 2e (t):
that for small enough driftβ(t) approximateŝ (4) .
In the case that a first-order prediction γ(t + s) = γ(t) +γ(t)s is used, thenβ(t) in (35)-(36) should be replaced with (β(t) −γ(t)).
Consider that some intervention is taken in order to set a new contagion rate, and that the response of the contagion rate to this intervention is known beforehand. The transient from the state before intervention to the new steady-state is modeled here in the following general form
where β − = β(t ≤ 0), β + = β(t ≥ T ), f (t) is continuous and non-increasing function satisfying
We are particularly interested in quantifying the effect of the transient on the doubling time. So, we consider the case 0 ≤ t < T < t + t 2 (t). Defining δβ = β + − β − , Equation
where F (·) is the primitive of f (·). Using the mean value theorem, for each t ∈ [0, T ],
where t + 2e = ln(2) β + −γ is the doubling time of the constant-rates exponential phase starting at t = T and 0 < f * (·) < 1. Particularly, at t = 0:
with F (T ) < T . Therefore, the error of assuming that the doubling time after t = 0 is that of the ongoing exponential phase, ignoring the transient settled by f (t) is e t 2 (t) =t 
Since 0 < f * (·) < 1, an upper-bound for e t 2 (t) is e t 2 (t) < E t 2 (t) = δβ ln(2) (T − t). In the previous equations, the step δβ can be written in terms of the doubling time (or reproduction ratio) of the past and following exponential phases t − 2e = ln(2) β − −γ (Re − = β − γ ) and t + 2e = ln(2) β + −γ (Re + = β + γ ):
Consider a piece-wise linear contagion rate such that R − e = 2, R + e = 1.2, f (t) = 1 − t/T , with T = 1 2 γ −1 . The primitive of f (t) is F (t) = t 1 − t 2T , so F (T ) = T /2. The doubling time for the previous and next exponential phases are, in infection period units, τ − 2e = 0.69 and τ + 2e = 3.47, while the transient duration is T = γT = 1/2. Therefore, evaluating (41)-(43) at the above values rendersτ 2 (0) = τ + 2e (1 + e t 2 (0)) = 2.47 with a relative error w.r.t. t + 2e equal to e t 2 (0) = Re + −Re − 4 ln (2) = −0.29. That is, because of the linear transient, the doubling time at t = 0 is about 30% shorter than the expected one for the new exponential phase.
The definitions of key metrics that characterize the strength of infectious disease outbreaks as function of transition rates were generalized to cope with time-varying exponential growths. It was shown that, even for the case of constant growth rate, the differences in calculating these metrics from active and confirmed infections can be large and vanish too slow. Thus, their computation using confirmed cases should be discouraged despite being more reliable data. The results allow also predicting these metrics from estimated time-varying transition rates. These results can be used to determine how much and how fast the contagion rate must be reduced in order to achieve a desired objective. Therefore, they provide valuable tools for epidemic outbreaks control.