Being able to forecast accurately the number of Covid-19 cases and deaths in the very short-run, say the next few days or weeks, is crucial to manage properly the health system. Depending on the next days pressure on the health system capacity, one can make more informed decisions on how to allocate hospital beds and ventilators, on whether to set more field hospitals, on whether to train more health workers, and so on and so forth.
In this note, we propose a statistical method to forecast in real-time the very short-run evolution of the number of Covid-19 cases and deaths in countries that are latecomers. Given that these latecomers were hit by the Covid-19 pandemic only after several other countries, we can use information from these other countries when they were at a similar stage of the pandemic, a few days or weeks before. In particular, we propose a penalized LASSO regression (Tibshirani, 1996) to construct an error correction model (ECM) of a latecomer in terms of the other countries. By tracking the number of cases and deaths in those countries, we can forecast the short-run number of cases and deaths in the latecomer. As the pandemic evolves, one can run the model on a daily basis, and in a adaptive rolling window scheme, to obtain updated forecasts for the next days.
The rolling window (adaptive) scheme is important to acknowledge the dynamic nature of the pandemic and to attenuate the effects of outliers and potential structural breaks (due to, for example, more or less testing after a given period or changes in the relations between countries used as explanatory variables and the latecomer). Nonetheless, it is important to emphasize that despite this attenuation, one might expect a worsen of the forecasts a few days after a structural break as the model adapts. Hence, and needless to say, the use of the proposed forecasting method should be complemented with evaluations on how the pandemic is evolving. 1
We apply the methodology to Brazil, and show that (so far) it has been performing very well in forecasting the out-of-sample number of cases and deaths up to the next 11 days, albeit our model and data allows us to forecast up to 14 days ahead. 2 In Brazil, the number of cases used correspond to those that are detected by the health system, which is the proper measure to track if the concern is to evaluate the impact on its capacity.
Tracking the evolution of the Covid-19 has been posing several challenges. The proposed method overcomes some of them. First, standard epidemiological models used to track the evolution of an epidemic are hard to discipline quantitatively to a new disease. Despite the enormous effort worldwide to understand transmission, recovery and death rates, many parameters one needs to calibrate remain uncertain (Atkeson, 2020), and behavioral responses of individuals as well as containment policies should affect these parameters (Eichenbaum, Rebelo, and Trabandt, 2020) . 3 The proposed forecasting method, instead, has the advantage of being model-free, and makes projections based solely on available data.
Second, even if possible to discipline those epidemiological models reliably, they speak to the evolution of the infected population. From the perspective of managing health resources, the relevant figure is the number infected individuals that end up pressuring the health system.
Note that a lot of individuals who end up being infected are asymptomatic or do not need to access the health system. Hence, the evolution of the virus among the sub-population that actually needs health care, which possesses certain characteristics that differ from the rest of the population, might be different from the evolution in the whole population. The proposed method avoid this problem by forecasting directly the number of infected individuals who are detected by the health system or specific parts of it that are of interest to be monitored, e.g., specific regions within a country.
Finally, alternative methods to track the evolution of the Covid-19, and forecast the pressure on health resources, such as massive testing, are expensive and unavailable to many countries.
The methodology and our codes are immediately and cheaply reproducible to any latecomer that tracks the number of Covid-19 cases (and deaths). 4
The aforementioned challenges are even harder to overcome in poor and developing countries, mostly latecomers, due to the lack of high-quality research, reliable data and limited budget. By tracking the very short-run evolution of the number of Covid-19 cases (and deaths) in real-time, we hope that this methodology can be useful to inform policymakers and the general public. In the authors' point of view, an adaptive and accurate data-driven forecast is critical to foster better management of the health system, especially in those countries that lack proper resources. This note is organized as follows. Section 2 presents the methodology. Section 3 applies it to Brazil. Finally, Section 4 concludes.
Let τ = 1, 2, . . . , T , represents the number of days after the 100th confirmed case of Covid-19 in a given country/region. Define y τ as the natural logarithm of the number of confirmed cases τ days after the 100th case of the disease in this specific country/region. In addition, let x τ be a vector containing the logarithm of the number of reported cases for p other countries also τ days after the 100th case has been reported. The idea is that, in the regular time scale, x τ may be ahead of time of y τ . For example, in France and Spain, the 100th was reported on February 29 and March 2, respectively. On the other hand, in Brazil, a latecomer, the 100th case was confirmed only on March 14. Hence, the idea is to use, for instance, data from France on February 29 and Spain on March 2 to explain the number of cases in Brazil on March 14. The statistical approach considered in this paper is an error correction model (ECM) which maps x τ into y τ as:
where u τ is zero-mean random noise with variance σ 2 , ∆y τ = y τ − y τ −1 , ∆x τ = x τ − x τ −1 , and π, γ, and β are unknown parameters to be estimated. The idea of the ECM is to model the dynamics and the reactions to departs from the equilibrium between y τ and x τ . As can be seen in Figure 1(a) , the number of cases in τ -scale in different countries display a strong common exponential trend. The logarithm transformation is important to turn the exponential trend into a linear one.
The model is estimated in two steps. In the first step, we estimate β in a long-run equilibrium model:
Due to the limited amount of data and the large dimension of x t as compared to the sample size, we use the least absolute and shrinkage operator (LASSO) to recover the parameter vector.
The goal of the LASSO is to balance the trade-off between bias and variance and is a useful tool to select the relevant peers in an environment with very few data points. Therefore, the estimator of the unknown parameter β T in equation (2.2) is defined as:
where K is the number of days in the estimation window, and λ > 0 is the penalty parameter which is selected by the Bayesian Information Criterion; see Medeiros and Mendes (2016) . Theoretical justification for the use of LASSO to estimate the parameters in this setup with trends can be found in Masini and Medeiros (2019) .
Once we estimated equation (2.2), we proceed to a second step estimating the ECM by Ordinary Least Squares with the variables selected in the first step with the LASSO. The final prediction reads as:
where y τ +h−1 is the forecast for the previous day. Confidence intervals were obtained through simulation by assuming that the error term u τ in (2.1) is normally distributed.
Finally, our interest relies on the forecasts for number of cases in levels not in logs: Y τ := exp(y τ ). Therefore, for the horizon T + h, the forecasts are constructed as:
is a correction which is essential to attenuate the induced bias when we take the exponential of the forecasted value of y T +h . Note that, in the τ -scale, the peers are "in the future" and we can plug-in actual values of x T +h to construct our forecasts. Note also that a rolling estimation window of K = 21 days induce an adaptive forecasting framework suitable to capture the dynamic nature of the pandemic and to attenuate the effects of outliers and potential structural breaks. Finally, in order to give more weight to the newest observations, we inflated the data by repeating the last four observations where the last observation is repeated four times with a linear decay for the observations before.
In this section analyze the Brazilian case. We used the John Hopkins compiled data 5 of all countries with Covid-19 cases and the Brazilian Ministry of Health official data. 6 Figure 1 illustrates the methodology. In Figure 1(a) , we plot the evolution of the total number of reported cases after the 100th case for some countries that the methodology chose to represent Brazil, 7 along with the series for Brazil and the 14-days ahead forecast for the total number of reported cases (full black line after the vertical dashed-line). The shadow area represents the 95 percent confidence interval, and dots represent the observed values. 1(b) shows the same exercise for the growth rate of reported cases. Squared-line represents actual figures, whereas the full line and the shadow are the forecasts and the 95 percent confidence interval. The model predicts a rate of approximately 10% new cases per day, which has been corroborated by the recent observations. Finally, Figure 1(c) shows the adaptability of our forecasting method to new income data. This figure depicts three different curves, each of which forecasting the next 14 days in Brazil at a different point in time.
It is worth emphasizing that this model is only an local approximation of a more complex and dynamic process. Therefore, its best use relies on fresh and updated data, and the rolling window scheme takes care of that. Although, so far, the model has been providing reasonable adherence to predicted confidence intervals, the change of the slopes of the forecast warns that the model needs to be fed with a few observations more after a big change in the dynamics.
Thus, the use of the proposed forecasting method should be complemented with indexes, such as proxies for social distancing, to guide evaluation of the future dynamics affecting the number of cases and deaths. This is part of our ongoing research on how the pandemic's dynamics is evolving. Figure 2 reports the most recent forecasts for both cases (first column) and deaths (second column), along with 95 percent confidence intervals (shadow area). On the first row, the forecast for the cumulative number of cases is depicted, whereas in the second and third rows we present the forecasts for the number of new cases and rate of growth (in percentage) per day. For instance, based on the forecast of new cases on a daily basis, we hope to promote more informed decisions on how to allocate scarce health resources, such as hospital beds, ventilators, and so on. Importantly, the methodology and codes are easily and readily adaptable to other contexts, such as the number of cases in another latecomer or any specific case (e.g., cases that need intensive care) health authorities might be interest on. In the Appendix A (Additional Results), Table 2 presents the data related to Figure 2 .
The first and second panels in Table 1 present the output of the rolling window scheme of forecasts for the last eleven days (columns 3-14) of accumulated reported cases and deaths, respectively. Column 1 reports the forecasting date, and column 2 reports observed data on cases and fatalities up to date (11 observations). 5 John Hopkins data available at https://github.com/CSSEGISandData/COVID-19 6 Brazilian Ministry of Health data available at https://covid.saude.gov.br/ 7 The selected countries were Iran, Italy, Japan, South Korea and Singapore. Consider, first, the number of cases (top panel). By comparing with observed data, a total mean absolute percentage error of 6.8% is found, with worst case value reaching 22.3%. Now consider accumulated forecasts of the number of fatalities (bottom panel). The total mean absolute percentage error is 10.7%, with a worst case value of 30.1%, somewhat larger figures than those for the number of cases. These statistics reveal two features of the model. It has been performing very well on average. Also, although the model might generate large errors, it is flexible enough to adjust and revise the forecasts to incoming data. Indeed, Figure 3 reports mean absolute percentage errors per forecasting horizon for both number of cases (blue bars) and deaths (red bars), and note that larger errors are concentrated at longer horizons.
14-day ahead forecast (total reported cases) per day 
In this paper, we propose a statistical model to forecast in the very short-run the reported number of cases and deaths by the Covid-19 in countries/regions that are latecomers. We believe this is a useful tool to inform health management. Nonetheless, structural breaks might worsen forecasts a few days after such breaks. So the use of this tool should complemented with other external information, such as proxies for social distancing, to guide subjective or objective assessments on potential dynamic changes on the pandemic's evolution. We hope to keep improving the model by improving the methodology and incorporating more information. And we aim to keep forecasts, methodology and codes updated on a daily basis at https://covid19analytics.com.br/. Table 2 : Additional Results -Actual (until April, 15th) and forecasted (April, 16th to 29th) number of reported cases and deaths. Last line presents the 95% confidence interval for the last day (2000-04-29) in terms of deviations (below and above) from the forecasted value.