The effective reproduction number R(t) is one of the most important epidemiological characteristics of the COVID-19 pandemic. It is constantly invoked by politicians and their scientific advisers to steer the social distancing measures. R(t) represents the expected number of secondary cases produced by a primary case at each time t. It can be computed from the incidence curve i(t) and the serial interval Φ, which is the empirical probability distribution of the time between the onset of symptoms in a primary case and the onset of symptoms in secondary cases. There are different strategies to estimate R(t) from i(t) and Φ: EpiEstim, the method proposed in [4] is widely used. In the online interface available at www.ipol.im/ern, we compare our estimate of R(t) with the one of EpiEstim. In [11] a technique to compute R(t) separating local transmission and imported cases is proposed. In [6] the authors make a detailed comparison of the methods proposed in [4] , [2] and [13] . A systematic review and analysis of the serial interval is presented in [12] . In [10] , [5] , [7] different statistical distributions of the serial interval Φ for the SARS-CoV-2 are proposed.
The so-called renewal equation (see [9] ) is a key epidemiological model linking the daily count of new detected cases of infections, i(t), with the reproductive power, A(t, s), at time t and infection-age s at which an infected individual generates secondary cases. A(t, s) depends on R(t) and Φ(s) and the renewal equation can be expressed as
where t c represents the current time (the last time at which i(t) is available). For instance, in [4] and [3] the following formulation of the renewal equation is used to compute R(t) from i(t) and Φ(s):
This model is a simplification of the Nishiura equation [8] :
In the original formulation of this model it was assumed that Φ(s) = 0 for s ≤ 0. However, in the case of SARS-CoV-2 a patient can show symptoms before the patient who infected him/her shows symptoms him/herself. This means that, actually, Φ(s) can be positive for s < 0. In [1] , the above model is used without any restriction on the support of Φ(s). Since measurements are generally made daily, a discrete formulation of model (3) is sound. It can be expressed as
where f 0 is, in general, negative.
In the technique we propose in this work, either of the above expressions of the renewal equation can be used. In the experiments presented, we use the model F 2 (i, R, Φ, t), and the method developed in [1] to estimate R t from i t and Φ s . This method is based on the the minimization of the following energy:
3 . CC-BY-NC-ND 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint
The copyright holder for this this version posted November 18, 2020. ; https://doi.org/10.1101/2020.11.16.20232405 doi: medRxiv preprint where p 90 (i) is the 90th percentile of {i t } t=0,..,tc used to normalize the energy with respect to the size of i t . The first term of E is a data adjustment term which forces the renewal equation (4) to be satisfied as much as possible. The second term forces R t to be a smooth curve; w t ≥ 0 represents the weight of the regularization at each time t. The higher the value of w t the smoother R t . The last term of E forces R tm to be close to an initial estimate given byR tm for some particular times t m . Roughly speaking, minimizing the energy E leads to satisfy approximately the renewal equation (4) with a reasonably smooth R t and, optionally, prescribed initial values for some particular times t m .
The daily number of new detected cases, i t , is strongly affected by the "weekend effect". During the weekend, fewer tests are carried out and there is a delay in the registration of cases. It follows that the actual number of cases is systematically underestimated in some days of the week and overestimated in others. The usual way to deal with this weekly administrative noise is to use a 7-day moving average of i t , but this procedure negatively affects the accuracy of the point estimate of the trend of i t when approaching the current date and forces stopping the estimate three days before present.
The main assumption of this paper is that a significant part of the discrepancy between i t and its expected value F (i, R, Φ, t) is given by the weekend effect. We therefore assume that the quotient
follows a 7-day periodic-dynamic, that is,
. In other words, the ratio between F (i, R, Φ, t) and i t depends mainly on the day of the week. In the experiments shown in this article, it will be observed that, indeed, q(i, R, Φ, t) follows accurately this periodic pattern in several countries 1 . For example, in Sweden every Monday the registered value i t is systematically underestimated and on Saturdays the opposite effect occurs. So we propose to approximate q(i, R, Φ, t) using a 7-day periodic function given by the vectorq(i, R, Φ) = (q 0 ,q 1 ,q 2 ,q 3 ,q 4 ,q 5 ,q 6 ). Therefore q(i, R, Φ, t) ≈q t%7 where the symbol % represents the modulo operation, that is, the remainder of the division between two numbers.
To computeq(i, R, Φ) we proceed to a least square estimatê q(i, R, Φ) = arg min q=(q 0 ,q 1 ,q 2 ,q 3 ,q 4 ,q 5 ,q 6 )
where T represents the number of days used in the estimation (in our experiments we use T = 56, that is 8 weeks). We point out that the valueî t =q t%7 i t can be considered as an update of i t where we have removed the weekly administrative noise. To preserve the number of accumulated cases in the period of estimation, we add to the minimization problem (7) the constraint
In that way, the multiplication by the factorq t%7 produces a redistribution of the cases i t during the period of estimation, but it does not change the global amount of cases. Notice that we could add weights to some particular days in the expression of E(i, R, Φ, q) in (7). For example, 1 To test this assumption on many more countries, the reader is invited to the online demo www.ipol.im/ern 4 . CC-BY-NC-ND 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint
The copyright holder for this this version posted November 18, 2020. ; https://doi.org/10.1101/2020.11.16.20232405 doi: medRxiv preprint if a day is a holiday in the middle of the week, one might reduce, in the energy E(i, R, Φ, q), the weight of that day and the following ones.
Once i t is updated usingî t =q t%7 i t , we can useî t to recompute R t using the renewal equation (1) . We denote byR t the updated version of R t . This whole procedure is repeated to update iterativelyî t andR t until convergence. The final valueî t andR t provides a more realistic trend of the evolution of i t and improves the estimation of R t . The final vectorq(i,R, Φ) represents the set of multiplicative factors used to remove the weekly administrative noise. In Fig. 1 we present a flowchart of the whole procedure and in the appendix we give technical details. Figure 1 : Flowchart of the estimation ofî t ,R t andq(i,R, Φ). First R t is computed from i t and Φ s using the method proposed in [1] andR t = R t is initialized. Next,q(i,R,Φ) is obtained by minimizing (7) with the constraint (8) . Then i t is updated asî t =q t%7 i t . The iteration is stopped when the efficiency measure I defined in formula (9) does not improve in the current iteration. Otherwise,R t is updated by the method proposed in [1] fromî t and Φ s and the iteration goes on.
All of the experiments made here can be reproduced with the online interface available at www.ipol.im/ern. In the appendix, we have included some details about the use of this online demo. To measure how well the removal of the weekly administrative noise improves the explanation of i t by the renewal equation F (i, R, Φ, t), we use the following efficiency measure:
where E(.) is defined in (7). I represents the reduction, after the removal of the weekly administrative noise, of the average distance between i t and F (i, R, Φ, t). The smaller I, the more efficient the noise reduction has been. In fact, the value of I can be used to assess whether it is worth applying the proposed method to a given country and in a given time interval.
In Fig. 2 we plot, for Sweden, Germany, France and Spain the values of the vectorq(i,R, Φ) obtained for each day of the week. We observe that in Sweden and Germany, Monday is the day of the week where the value of i t is most underestimated (the higherq k is, the more underestimated is i t in the day k). However, in France, that day corresponds to Tuesday. This suggests that in France there is an additional delay of one day due to the way France records and reports the number of new cases. In these three countries, the effect of weekly administrative noise is mainly concentrated on Monday, Tuesday and Wednesday (with a 1-day 5 . CC-BY-NC-ND 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint 
lag in the case of France). The case of Spain is special because it does not provide data on the weekend. In that case we have assumed that on Saturday, Sunday and Monday the number of cases is constant and equal to the accumulated number of cases on Saturday, Sunday and Monday divided by 3. Moreover, in Spain, some regions sometimes do not report data for one or several days, which produces an additional administrative noise different from the weekend effect. The more orderly the daily count of new infected, the better the result obtained by our method.
In table 1 we present the numerical values of the vectorq(i,R, Φ), the efficiency measure I and the effective reproduction number in the current time before and after the weekly administrative noise removal given by R tc andR tc respectively. Notably, and with the exception of Spain, the efficiency value I shows a high reduction of the administrative noise. At the end of the period chosen for the study, between September 9 and October 28, there is a strong expansion of the virus. This period ends on a Wednesday. In the previous days the number of cases was underestimated. It follows that the estimated effective reproduction number becomes considerably higher after eliminating the weekly administrative noise.
6 . CC-BY-NC-ND 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint for each day of the week, the efficiency measure, I, and the effective reproduction number in the current time before and after the administrative noise removal given by R tc andR tc respectively.
In Fig. 3 -6 we plot on the one hand the quotient q(i,R, Φ, t) and its periodic approximation q t%7 , and on the other hand the values of i t , its updateî t after the removal of the weekly administrative noise and the expected value using F 2 (î,R, Φ, t). For Sweden, Germany and France we observe a quite a good agreement between the quotient q(i,R, Φ, t) and its periodic approximationq t%7 , which supports the validity of the proposed method and our assumption that the evolution of q(i,R, Φ, t) follows a 7-day periodic dynamic. For these countries,î t = q 7%t i t , the number of new cases after the removal of the administrative noise, is less oscillating than i t and very close to its expected value following the renewal equation F 2 (î,R, Φ, t). In the case of Spain, the obtained improvement is minor. On the one hand, Spain does not report data during the weekend, which introduces an additional disturbance in the data that hinders the application of the proposed method. In addition, in two of the weeks included in the period of the study, q(i,R, Φ, t) diverges significantly from its periodic approximationq t%7 .
. CC-BY-NC-ND 4.0 International license It is made available under a perpetuity.
is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint
The copyright holder for this this version posted November 18, 2020. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint
The copyright holder for this this version posted November 18, 2020. ; https://doi.org/10.1101/2020.11.16.20232405 doi: medRxiv preprint
We proposed a technique to remove the weekly administrative noise in the incidence curves of COVID-19, based on the improvement of the agreement between i t and its expected value using the renewal equation F (i, R, Φ, t). The method boils down to multiplying i t by a factor q t%7 which depends on the day of the week. The main assumption supporting the validity of this approach is that the quotient of i t and F (i, R, Φ, t) follows approximately a 7-day periodic dynamic. We verified this assumption on Sweden, Germany and France. In the case of Spain the method brings less improvement, due to the fact that Spain does not report data on weekends. The proposed method updates iteratively i t and the effective reproduction number R t . The number of cases after the removal of the weekly administrative noiseî t =q t%7 i t is much less oscillating than i t and very close to its expected value following the used renewal equation. Fromî t we obtain a more accurate value of the effective reproduction number R t . An implementation of this technique is available at www.ipol.im/ern. In this online interface we compare the final estimation of R t with the estimate obtained by EpiEstim. As shown in [3] , in practice, EpiEstim uses a 7-day moving average to remove the administrative weekly noise. As can be observed using the online interface, this 7-day moving average introduces a shift towards the past that is not observed in our estimate. Therefore our method seems to provide a more to date estimate of R t than EpiEstim. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint
The copyright holder for this this version posted November 18, 2020. ; https://doi.org/10.1101/2020.11.16.20232405 doi: medRxiv preprint