Información de la revista
Respuestas rápidas
Descargar PDF
Más opciones de artículo
No disponible
DOI: 10.1016/j.gaceta.2020.05.003
Open Access
Analysis of the impact of lockdown on the reproduction number of the SARS-Cov-2 in Spain
Análisis del impacto del confinamiento en el número de reproducción del SARS-Cov-2 en España
Alexandre Hyafila,b,
Autor para correspondencia

Corresponding author.
, David Moriñab,c
a Centre de Recerca Matemàtica, Edifici C, Universitat Autònoma de Barcelona, Cerdanyola del Vallès (Barcelona), Spain
b Barcelona Graduate School of Mathematics, Departament de Matemàtiques, Universitat Autònoma de Barcelona, Cerdanyola del Vallès (Barcelona), Spain
c Department of Econometrics, Statistics and Applied Economics, Riskcenter-IREA, Universitat de Barcelona, Barcelona, Spain
Este artículo ha recibido
No disponible
(Actualización diaria de datos)

Under a Creative Commons license
Recibido 18 abril 2020. Aceptado 06 mayo 2020
Información del artículo
Texto completo
Descargar PDF
Figuras (4)
Mostrar másMostrar menos
Material adicional (1)

The late 2019 COVID-19 outbreak has put the health systems of many countries to the limit of their capacity. The most affected European countries are, so far, Italy and Spain. In both countries (and others), the authorities decreed a lockdown, with local specificities. The objective of this work is to evaluate the impact of the measures undertaken in Spain to deal with the pandemic.


We estimated the number of cases and the impact of lockdown on the reproducibility number based on the hospitalization reports up to April 15th 2020.


The estimated number of cases shows a sharp increase until the lockdown, followed by a slowing down and then a decrease after full quarantine was implemented. Differences in the basic reproduction ratio are also significant, dropping from 5.89 (95% confidence interval [95%CI]: 5.46-7.09) before the lockdown to 0.48 (95%CI: 0.15-1.17) afterwards.


Handling a pandemic like COVID-19 is complex and requires quick decision making. The large differences found in the speed of propagation of the disease show us that being able to implement interventions at the earliest stage is crucial to minimise the impact of a potential infectious threat. Our work also stresses the importance of reliable up to date epidemiological data in order to accurately assess the impact of Public Health policies on viral outbreak.

Evaluation study
Public health

El brote de COVID-19 a finales de 2019ha puesto los sistemas de salud de muchos países al límite de su capacidad. Los países europeos más afectados son, hasta ahora, Italia y España. En ambos (y en otros países), las autoridades decretaron un confinamiento, con especificidades locales. El objetivo de este trabajo es evaluar el impacto de las medidas adoptadas en España para hacer frente a la pandemia.


Estimamos el número de casos y el impacto del confinamiento en el número básico de reproducción según los informes de hospitalización hasta el 15 de abril de 2020.


El número estimado de casos muestra un fuerte aumento hasta el bloqueo, seguido de una desaceleración y luego una disminución tras la implementación del confinamiento total. Las diferencias en el número básico de reproducción también son muy significativas, cayendo de 5,89 (intervalo de confianza del 95% [IC95%]: 5,46-7,09) antes del bloqueo a 0,48 (IC95%: 0,15-1,17) después.


Gestionar una pandemia como la de COVID-19 es muy complejo y requiere una rápida toma de decisiones. Las grandes diferencias encontradas en la velocidad de propagación de la enfermedad muestran que poder implementar intervenciones en la etapa más temprana es crucial para minimizar el impacto de una potencial amenaza. Nuestro trabajo también indica la importancia de contar con datos epidemiológicos actualizados y confiables para evaluar con precisión el impacto de las políticas de salud pública en la pandemia.

Palabras clave:
Estudio de evaluación
Salud pública
Texto completo

By late 2019 an outbreak of COVID-19, caused by SARS-Cov-2 virus, started in the region of Hubei (China), more specifically in the city of Wuhan. Since then, the disease has spread all over the world, being declared pandemic by the World Health Organization on 2020 March 11th. The rapid propagation of the virus around the world has stressed the health systems of many countries to their limit. In Europe, the most affected countries in terms of number of detected cases, hospitalizations and deaths are, to the date, Italy and Spain. This unprecedented situation for the public health systems of these countries forced decision makers to act very quickly in order to minimize the impact of the disease and to avoid collapse. In Spain, the emergency state was declared on 2020 March 14th and was hardened with mandatory home confinement except for vital sectors workers (including health professionals, food supply, etc.) on March 30th. Under this situation, it is urgent to assess the efficiency of social distancing and other non-pharmaceutical interventions undertaken to control the pandemics of COVID-19.1,2 One of the main challenges in evaluating the impact of these actions is that data are only partially available, as many of the cases are asymptomatic or with mild symptoms,3 and shortage of testing kits prevent testing all patients with possible COVID-19 symptoms. Therefore, the number of cases might be severely underestimated. This issue is common in epidemiology and several methods have been recently proposed to address it under specific circumstances.4,5 Another issue is that, when no massive viral testing of the population is performed, new cases are only detected once symptoms appear, at a variable delay after contamination. This complicates the assessment of the impact of interventions to reduce/slow down the spread of a virus.

Here, we aimed at evaluating the impact of the COVID-19 related non-pharmaceutical interventions undertaken in Spain over the basic reproduction ratio R0, considering three periods of time in 2020: no intervention (until March 13th), emergency state (March 16-30th and April 13th-15th) and mandatory confinement (March 31st to April 12th). We inferred retrospectively the number of contamination in each Spanish autonomous community from the patterns of hospitalizations, deaths and detected cases. Analyses were performed with data up to April 15th 2020.


We modelled the dynamics of infection with a discrete-time SIR (Susceptible-Infected-Recovered) model with time-varying R0 defined for each region r and day d. We also assumed the stock of susceptible population Sr,d is almost constant through time at S r,d ≈ Nr, (where Nr is the size of the total population in the region; i.e. a small percentage of the population is contaminated) as is probably valid up to now. The dynamics of infected people Ir,d an region r at day d thus varies as:

where γ is the recovery rate of the infection and R0 is a stochastic variable whose expected value is defined by the ongoing social distancing measures (no measure, state emergency or mandatory confinement). Those three expected values are parameters that are estimated from the reports. Formally, the priors over R0 for each region are defined as independent Gaussian processes. The prior mean is defined by the distancing measures, while the prior covariance is squared exponential covariance K with variance σ2=0.12 and length l=1 day.6 Such prior allows to capture differences in the spread between different regions as well as temporary change of R0 within a region (Gaussian processes enforce that these fluctuations are smooth in time). The variance term σ2 was set so it is unlikely that the infected population goes down in a single day by a proportion larger than the recovery rate γ. Based on the mean 20 days of contagious before recovery (duration of viral shedding7), we set γ=0.05day−1. We assumed that the value of infected people at the beginning of the period studied (20th of February 2020) was drawn from a log-normal distribution with mean xir and variance 1, where xi is a parameter specific to each autonomous community (estimated from the data). This variability allowed us to capture initial variations in the spread of the epidemics at the beginning of the period of study.

The number of new cases per day is Nr,d=Ir,d−Ir,d−1+γIr,d−1=Ir,d−1−γIr,d−1. This true number of cases however cannot be observed directly. Here we use a latent-state approach: we estimated the evolution of the number of true cases in each autonomous community based on the recorded accumulated number of detected cases, hospitalizations and deaths provided by Instituto de Salud Carlos III7. We used estimates for the proportion of cases pC that are detected by the Spanish Health system, the proportion of cases pH that are hospitalized, and the lethality rate pD, as the well as the distribution of latency between infection and this three types of events lid (Fig. 1). We used the following estimates: 15% of contaminated persons are hospitalized; 1% die from disease8,9; 30% of cases get detected (this latter number was defined arbitrarily, since the number of detected cases is roughly twice the number of hospitalizations). Note that these percentages affect the estimated number of true cases by a scaling factor, but do not affect the estimation of reproduction parameters. We used estimates of the distribution of duration of infection-to-detection, infection-to-hospitalization based on published literature.8,9 Lauer and colleagues describe that the incubation period can be captured by log-normal distribution with median 5.1 days. To capture the extra time from the apparition of symptoms to case detection/hospitalization, we increased the median time of the log-normal distribution by 50% for case detection and 100% for hospitalization, i.e. 7.65 days and 10.2 days, respectively, while keeping the same dispersion parameter σ. For infection-to-death, we used the sum of two gamma distributions for infection-to-onset and onset-to-death with overall mean 23.9 days.10 Thus the expected numbers of events yir,d in a certain autonomous communities is given by convolving the pattern of new cases with the distribution of infection-to-event:

Figure 1.

Normalized distribution for the latency from contamination to detected case, hospitalization and death event.


with wd=pilid−1−γlid−1. We assumed that the actual number of events recorded at that day and time was drawn from a negative binomial distribution with mean Eyir,d as defined above and parameter r=2.10 The reports provide accumulated time series, so in principle new events correspond to the difference between two successive days. However new events are sometimes reported later than on the day of occurrence (especially during weekends). We estimated that 30% of events were reported on the following day, 10% two days later. Assigning this proportion of events to one or two days before they are reported allowed us to smooth the event time series. Finally, for the case of two autonomous communities (Madrid and Castilla-La Mancha, until April 12th for the latter), the reported number of hospitalizations was not cumulative but corresponded to the current number of hospitalized patients related to COVID-19. For Castilla-La Mancha, we found that we could recover the reported cumulative number of hospitalizations on April 12th by assuming that the duration of hospitalization is distributed uniformly between 5 and 15 days. We used this rule to estimate the cumulative number of hospitalizations for this autonomous community, and applied it similarly for Madrid.

There is a debate about the reliability of these data. It is believed that hospitalizations report is the most reliable of these indicators,11 as many cases go undetected (some patients are asymptomatic or suffer mild symptoms; saturation of health systems have led to testing only more severely affected patients in some autonomous community), and some deaths are not integrated in the official count because of the lack of viral charge testing. There is indeed a large variability between the fraction of hospitalizations per reported case between autonomous communities: it is 31% in Galicia but 82% in Comunidad de Madrid. This difference is more likely to be due to differences in detecting and reporting cases rather than in the true proportion of infected people requiring hospitalization. It is also more difficult to assess reliably the number of cases from death reports as the latency from infection to death is long and can be very variable across individuals.

Parameters of the model, including the value of R0 in the different conditions, were estimated from the data using an expectation-maximization algorithm (see Appendix A for details). We ran three alternative analyses: the principal analysis estimated model parameters using hospitalizations reports; two control analyses were run using either detected cases or deaths reports, which are two less reliable indicators.


We present the number of COVID-19 cases in all 19 autonomous communities inferred from the pattern of hospitalizations in Figure 2 (see also Figure I in the online Appendix for breakdown by autonomous community). The estimated cases display a sharp increase until the lockdown followed by a plateau, and then a decrease. We estimated the R0 before state of emergency, during state emergency and during enforced lockdown. R0 was found to drop from 5.89 (95% confidence interval [95%CI]: 5.46-7.09) to 1.86 (95%CI: 1.10-2.63) after state of emergency, and down to 0.48 (95%CI: 0.15-1.17) after full lockdown. We estimate a total number of 0.871 million COVID-19 cases in Spain by April 15th 2020, including 0.294 active cases, 0.559 recovered and 0.018 deceased (see Fig. 3 for breakdown by autonomous community).

Figure 2.

Number of estimated COVID-19 cases in Spain, inferred from the number of hospitalizations until April 15th 2020. The posterior mean of inferred cases is plotted in blue. Cumulative number of detected cases, hospitalizations and deaths are plotted in green, red and black curves, respectively. Grey curves represent the inferred number of cases in each autonomous community. The onset of state of emergency and mandatory confinement are indicated by a vertical bar.

Figure 3.

Cumulative number of cases in each autonomous community, and breakdown into active cases, recovered cases and deceased patients.


Estimates were similar when we used detected cases rather than hospitalizations. Using detected case reports, we estimated the R0 to be 6.91 (95%CI: 6.75-7.39) before the state of urgency, 2.22 (95%CI: 1.92-2.74) during the state of emergency and 0.85 (95%CI: 0.5-1.05) during the full lockdown. The estimate for the cumulative number of cases was 0.823 million overall in Spain (0.351 million active).

Because deaths occur after a long and variable interval after contamination, we could not reliably estimate the value of R0 separately for the state emergency and full lockdown measures, so we simply estimated R0 before and after declaring the state of emergency. We estimated the R0 to be 6.48 before the lockdown (95%CI: 5.5-7.51), and 0.49 afterwards (95%CI: 0.16 - 1.57). The estimate for the cumulative number of cases was 2.82 millions overall in Spain (0.72 millions active).

Finally, we assessed how much our results depended on some of our assumptions, using hospitalization reports. We estimated the parameters using a different pattern of delays of notification for hospitalizations (50% reported on the same day; 20% on the next day; 20% two days later; 10% three days later). This change in delays induced a relatively small change in estimated R0: 5.60 before the state of emergency (95%CI: 4.77-7.05), 1.66 (95%CI: 1.14-2.55) during the state of emergency and 0.60 (95%CI: 0.13-1.35) during the full lockdown. The assumed probability of hospitalizations had no impact at all on the estimated R0, and had an inversely proportional influence on the estimated number of cases: assuming 7.5% of hospitalizations instead of 15% would lead a twofold increase in the estimated number of cases.


We found similar estimates of reproducibility number and the proportion of the Spanish population contaminated by the new coronavirus, whether they were estimated from hospitalization numbers or detected cases. Both estimates from case reports and hospitalizations suggest that only mandatory quarantine achieved R0 lower than 1, while R0 during state of emergency before non-essential services were shut down was estimated to be well beyond 1. This predicts that the opening of the non-essential services by April 13 may lead to a new surge of cases. Based on this empirical study, mandatory confinement is the only state-wise measure that effectively reduces the number of contaminations.

Estimates based on death reports differed considerably from those based on either hospitalizations or detected cases. This suggests that some of the assumptions and data our modeling is based on may not be accurate (although commonly used in previous studies), and shows that this can induce very large biases in the estimation of the propagation of the new coronavirus in Spain. A crucial pre-requisite for the reliability of our estimates is that the proportion of events do not vary in time. That was likely not the case neither for detected cases, as the testing policy evolved during the period of study, nor for deaths, as the saturation of health systems may have led to higher death tolls and reporting of deaths in retirement homes evolved. As the proportion of hospitalized cases is believed to be more stable across time, we believe that estimates based on the latter are more reliable than estimates based on either reported cases or deaths. Below, we further comment on the results obtained with the hospitalization reports.

Our approach is similar to a study by an Imperial College team published last week inferring the impact of non-pharmaceutical measures (including lockdown) on propagation of the new coronavirus in 11 European countries.10 Both studies rely on fitting a model of infection dynamics to observed data (here hospitalizations). This contrasts with other approaches based on fitting a curve to the observed time series (e.g., for patterns of fatalities in United States12 or patterns of cases in China13), or to model simulations studies that capture how the pattern of contacts in different scenarios (with or without social distancing measures) affect virus propagation.14–16,19 Other studies have also estimated the number of cases from the reported deaths, assuming a fixed duration from infection to death.17

Our modeling approach included stochasticity in the reproducibility number in each area. This notably allows to capture distinct trajectories of infection in different areas. We noted a negative correlation across autonomous communities between the proportion of infected people at the onset of state of emergency and the subsequent increase in infection (Fig. 4, Pearson coefficient: r=−0.46, p=0.048). In other words, R0 at the state of emergency was smaller in the regions with more cases. This could be due to a series of factors. First, the communities with the largest proportion of cases could start developing herd immunity, hence limiting the propagation of the infection (which seems unlikely given that in the most affected autonomous communities, only a few percent have been infected according to our estimations). It could also be the result of local policies taken before the national lockdown in the most affected autonomous communities, or a better compliance of lockdown and social distancing in most affected areas. Another factor could be the migration from the most affected (especially Madrid) to less affected region before lockdown was implemented,18 or some distortions in the reporting (under-reporting) of cases in saturated health systems.

Figure 4.

Increase in number of cases (in percent) for each autonomous community in the 10 days following lockdown versus number of cases per 100,000 habitants at the time of lockdown.


Our study has several important limitations. First, as noted previously, it is not clear how reliable is the data the modeling is based on both epidemiological reports, and infectious estimate probability and latency of symptoms, case detection, hospitalization and death. It should be stressed that the unreliability of epidemiologic data (with changes of criterion of inclusion along time and between autonomous communities) induces important biases which impede an accurate estimation of the impact of political measures on the propagation of the new coronavirus. A faster and more reliable tracking of the epidemics could be performed if cases were reported in a systematic way dated by the onset of symptoms rather than detection, as the incubation period has been well characterized.

Second, the model captures the number of new cases each day as a proportion from the pool of infected people in the same area. It does not take into account how the age distribution in each area affects that each infection leads to hospitalizations or death, nor how the probability of infecting depends on the days from infection.10 Nor does it take into account mobility between regions, whose impact is believed to be more important at the initiation of the epidemics. It is also worth noting that in a locked down environment where most contacts are compartmentalized in households, it is possible that at beginning the virus continues to spread rapidly within households, but less so between households. As immunity was not taken care here, R0 may decrease significantly more without further policies, after this first wave of within-household contamination is over. Finally, we only modeled the impact of lockdown, not of other measures which were taken too close apart (banning public events, closing schools, etc.), and simultaneously in most regions, so it is not possible here to disentangle their effects precisely. The analysis also did not take into account other changes that have occurred during this period, such as measures at an individual level or at the level of companies and local institutions (usage of masks, hands washing, etc.).

In conclusion, the greatest interest should be focused on the trends in R0 found in this work, which show drastic successive reductions after the implementation of the state of urgency and forced quarantines.

What is known about the topic?

The late 2019 Covid-19 disease outbreak has put the health systems of many countries to the limit of their capacity. The objective of this work is to evaluate the impact of the measures undertaken in Spain to deal with the pandemic.

What does this study add to the literature?

Using hospitalization reports, we estimate that the basic reproduction number fell from 5.89 before the state of emergency to 0.48 after full lockdown was implemented. Our work show as well the importance of relying on update and reliable epidemiologic data to evaluate precisely the impact of public health policies on the outbreak.

Editor in charge

Miguel Ángel Negrín Hernández.

Authorship contributions

A.H. and D. M. designed the study and defined the considered scenarios. A. H. implemented the codes for the analyses. Both authors participated in writing the manuscript, interpretation and discussion of the obtained results, and approve the publication of the manuscript in its present form.


The authors thank J. Barbosa and P. Puig for useful comments on the manuscript.


A. Hyafil was funded by the Spanish Ministry of Economy and Competitiveness (Ramón y Cajal fellowship RYC-2017-23231). D. Moriña acknowledges financial support from the Spanish Ministry of Economy and Competitiveness, through the María de Maeztu Programme for Units of Excellence in R&D (MDM-2014-0445), Instituto de Salud Carlos III (COV20/00115) and Fundación Santander Universidades.

Conflicts of interest


Y. Niu, F. Xu.
Deciphering the power of isolation in controlling COVID-19 outbreaks.
The Lancet Global Health., 8 (2020), pp. 452-453
R.M. Anderson, H. Heesterbeek, D. Klinkenberg, et al.
How will country-based mitigation measures influence the course of the COVID-19 epidemic?.
Lancet., 395 (2020), pp. 931-934
L. Huang, X. Zhang, X. Zhang, et al.
Rapid asymptomatic transmission of covid-19 during the incubation period demonstrating strong infectivity in a cluster of youngsters aged 16-23 years outside Wuhan and characteristics of young patients with covid-19: a prospective contact-tracing study.
A. Fernández-Fontelo, A. Cabaña, P. Puig, et al.
Under-reported data analysis with INAR-hidden Markov chains.
Statistics in Medicine., 35 (2016), pp. 4875-4890
A. Fernández-Fontelo, A. Cabaña, H. Joe, et al.
Untangling serially dependent underreported count data for gender-based violence.
Statistics in Medicine., 38 (2019), pp. 4404-4422
C. Bishop.
Pattern recognition and machine learning.
Springer-Verlag, (2006),
Portal del Instituto Carlos III, 15 de abril 2020. Available at:
F. Zhou, T. Yu, R. Du, et al.
Clinical course and risk factors for mortality of adult inpatients with COVID-19 in Wuhan.
China: a retrospective cohort study. Lancet., 395 (2020), pp. 1054-1062
S.A. Lauer, K.H. Grantz, Q. Bi, et al.
The incubation period of coronavirus disease 2019 (COVID-19) from publicly reported confirmed cases: estimation and application.
Ann Intern Med., (2020),
S. Flaxman, S. Mishra, A. Gandy, et al.
Estimating the number of infections and the impact of non-pharmaceutical interventions on covid-19 in 11 European Countries.
Imperial College preprint., (2020),
Una epidemia en la que todas las cifras son una incógnita. El País, April 3 2020. Available at:
J.L.M. Christopher.
Forecasting COVID-19 impact on hospital bed-days ICU-days, ventilator-days and deaths by US state in the next 4 months.
S. Zhao, Q. Lin, J. Ran, et al.
Preliminary estimation of the basic reproduction number of novel coronavirus (2019-nCoV) in China, from 2019 to 2020: a data-driven analysis in the early phase of the outbreak.
Int J Infect Dis., 92 (2020), pp. 214-217
Q. Lin, S. Zhao, D. Gao, et al.
A conceptual model for the coronavirus disease 2019 (COVID-19) outbreak in Wuhan, China, with individual reaction and governmental action.
Int J Infect Dis., 93 (2020), pp. 211-216
J. Hellewell, S. Abbott, A. Gimma, et al.
Feasibility of controlling COVID-19 outbreaks by isolation of cases and contacts.
Lancet Global Health., 8 (2020), pp. 488-496
N.M. Ferguson, D. Laydon, G. Nedjati-Gilani, et al.
Impact of non-pharmaceutical interventions (NPIs) to reduce COVID-19 mortality and healthcare demand.
Imperial College preprint., (2020),
Short term predictions on Covid-19 in Catalonia, Spain, and European Union. Universitat Politècnica de Catalunya. Available at:
La invasión “temeraria” de los madrileños. El País, April 9th 2020. Available at:
L. Shengjie, N.W. Ruktanonchai, L. Zhou, et al.
Effect of non-pharmaceutical interventions for containing the COVID-19 outbreak in China.
Copyright © 2020. SESPAS
Gaceta Sanitaria

Suscríbase a la newsletter

Opciones de artículo
Material suplementario
es en

¿Es usted profesional sanitario apto para prescribir o dispensar medicamentos?

Are you a health professional able to prescribe or dispense drugs?

es en
Política de cookies Cookies policy
Utilizamos cookies propias y de terceros para mejorar nuestros servicios y mostrarle publicidad relacionada con sus preferencias mediante el análisis de sus hábitos de navegación. Si continua navegando, consideramos que acepta su uso. Puede cambiar la configuración u obtener más información aquí. To improve our services and products, we use "cookies" (own or third parties authorized) to show advertising related to client preferences through the analyses of navigation customer behavior. Continuing navigation will be considered as acceptance of this use. You can change the settings or obtain more information by clicking here.