Next Article in Journal / Special Issue
Rapid and Convenient Quantitative Analysis of SARS-CoV-2 RNA in Serous Saliva with a Direct PCR Method
Previous Article in Journal
Analysis of Delayed Vaccination Regimens: A Mathematical Modeling Approach
Previous Article in Special Issue
Epidemiology of COVID-19 in the State of Sergipe/Brazil and Its Relationship with Social Indicators
Order Article Reprints
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

The Role of Mobility and Sanitary Measures on the Delay of Community Transmission of COVID-19 in Costa Rica

Centro de Investigación en Matemática Pura y Aplicada-Escuela de Matemática, Universidad de Costa Rica, San Pedro Montes de Oca 11501, Costa Rica
Pan America Health Organization, World Health Organization, San José 10102, Costa Rica
Department of Public Health Sciences, University of California, Davis, CA 95616, USA
Ministry of Health, San José 10102, Costa Rica
Author to whom correspondence should be addressed.
Epidemiologia 2021, 2(3), 294-304;
Received: 13 May 2021 / Revised: 16 June 2021 / Accepted: 12 July 2021 / Published: 21 July 2021
(This article belongs to the Special Issue Evolving COVID-19 Epidemiology and Dynamics)


The aim of this paper is to infer the effects that change on human mobility had on the transmission dynamics during the first four months of the SARS-CoV-2 pandemic in Costa Rica, which could have played a role in delaying community transmission in the country. First, by using parametric and non-parametric change-point detection techniques, we were able to identify two different periods when the trend of daily new cases significantly changed. Second, we explored the association of these changes with data on population mobility. This also allowed us to estimate the lag between changes in human mobility and rates of daily new cases. The information was then used to establish an association between changes in population mobility and the sanitary measures adopted during the study period. Results showed that during the initial two months of the pandemic in Costa Rica, the implementation of sanitary measures and their impact on reducing human mobility translated to a mean reduction of 54% in the number of daily cases from the projected number, delaying community transmission.

1. Introduction

The pandemic caused by the severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) has produced an unprecedented global sanitary crisis that has deeply disrupted societies and decimated economies.
After attempts to contain the virus failed and COVID-19 spread to practically every country in the world, nations implemented an arsenal of public health measures in an effort to avoid or at least delay community transmission. Such measures included a diverse range of lockdown-type interventions and different forms of business restrictions, which basically aim at limiting population mobility and therefore reducing physical contact among individuals outside their family nucleus [1,2].
As the pandemic unfolded, these measures had been lifted, reimposed, and modified multiple times in an effort to avoid the collapse of health services and to mitigate the number of deaths, at the same time allowing the return of different degrees of personal freedom and giving a break to struggling economies. In this ongoing effort to balance these two often opposing sides of the equation, the effectiveness of specific sanitary measures in controlling the spread of COVID-19 has been largely disputed [3,4,5]. The concurrence of numerous simultaneous sanitary measures, added to countless societal variables, makes determining the effect of every individual measure a nearly impossible task.
One way to study whether sanitary measures or sets of measures had a significant impact on disease transmission is through establishing their association with changes in population mobility and determining the impact of these changes in the speed of disease transmission.
Studies on the issue of human mobility were first focused on restrictive measures to avoid the geographic spread of SARS-CoV-2 in China [6,7] and on demonstrating associations in theoretical models [8,9].
Badr et al. [10] used United States mobile phone data to study this issue outside China. They were able to correlate mobility patterns with COVID-19 case growth rates. More recently, Cot et al. [11] showed strong decreases in infection rates using Google and Apple mobility data. The study focused on the effect of social distancing at the beginning of the pandemic in Europe and the United States. Cazelles et al. [12] reached similar conclusions in the period between the first and second waves in Europe using the effective reproduction number.
Costa Rica represents a distinctive setting to test these assumptions. In this particular Central American country, an initial effective control of the pandemic allowed avoiding community transmission for the first four months—between March and July 2020—when the virus was rapidly spreading in neighboring countries and almost across the whole Americas [13]. Moreover, Costa Rica never imposed a total lockdown but rather imposed restrictions to vehicular circulation combined with several restrictions to commercial activity, public gatherings and school closures [14]. This situation allowed us to test our hypotheses before community transmission was established and the detection of new cases became more challenging.

2. Materials and Methods

2.1. Data. The Analysis Uses Three Different Sources of Information

  • Epidemiological data: The number of daily confirmed COVID-19 cases in Costa Rica from 6 March 2020 to 2 July 2020 was obtained from the Ministry of Health [14]. The data covers 4023 laboratory-confirmed cases from 82 municipalities across the country. On March 6, Costa Rica became the 89th country to confirm a COVID-19 patient within the national territory, a 49-year-old woman visiting from New York [14]. During the initial months of the pandemic, the growth of confirmed cases was relatively stable in Costa Rica, and the majority of patients had a known chain of transmission. Two months into the pandemic, the country was even highlighted as having the lowest COVID-19 case fatality rate in the region [15]. However, by the second week of June 2020, the daily new cases began a progressive growth. On 2 July 2020, with 4024 total confirmed cases, a 14-day case notification rate of 40.3 cases per 100,000 population and 17 deaths, the Ministry of Health declared community transmission in the Greater Metropolitan Area after being unable to establish the epidemiological nexus to 65% of all new positive cases detected over the last five days [14]. This region comprises about 50% of the national population.
  • Google’s Community Mobility Reports [16]: This data contains relative changes of mobility according to Google’s applications with respect to the data observed on a certain baseline. The baseline day is the median value using a five-week period in January and February 2020. The relative changes are computed using the following categories: Retail and Recreation, Parks, Transit stations, Residential, Grocery and Pharmacy, and Workplaces.
  • Sanitary measures: Since the first reported case of COVID-19 in Costa Rica, an inter-institutional and comprehensive approach has guided the country’s response to mitigate the impact of the COVID-19 pandemic. One of the first measures aimed to promote and facilitate physical distancing took place on 10 March 2020, with the cancellation of all massive events and the instruction of working from home [14]. In the days to come, the country restricted the capacity of public meeting spaces to 50%, closed schools and universities, all air and land borders, bars, beaches, churches, gyms, theaters, and cinemas [14]. By 23 March 2020, with a total of 158 confirmed cases spread across 30 municipalities (from a total of 82), public health authorities imposed the first restriction to vehicle circulation, beginning with a nighttime restriction to circulate from 10 p.m. to 5 a.m. [14]. The opening, closure, and allowed capacity for both commercial activities and social gathering places, as well as the vehicle restrictions, have been adjusted throughout the pandemic.

2.2. Methods

The methodological purpose of the study is three-fold. First, we determined significant changes in the speed of disease transmission before the community transmission started in Costa Rica. Second, we attempted to determine the validity of the association between population mobility within the national territory and the speed of disease transmission using a Bayesian approach in order to measure the impact of the detected changes. Third, we identified which measures were adopted when those changes in mobility occurred in order to explore the effectiveness of such sanitary measures in the control of the disease using MANOVA.
The estimation of time points where the series of newly infected cases changed in terms of trend, variability, or more distributional properties, can give an insight of the approximate days where a certain intervention measure, or a combination of several measures, impact the underlying behavior of the transmission dynamics. Those time points are commonly referred to in the statistical literature as change-points. In this effort, the detection of single and multiple change-points in the time series of new cases has been a way to infer the impact of interventions in different countries. For example, Dehning et al. combined Bayesian inference with compartmental models to identify plausible change-points on the COVID-19 spreading rate in Germany [17], and Jiang et al. used a novel combination of algorithms to detect multiple change-points in the series of confirmed cases and deaths of COVID-19 over more than 30 countries [18]. Recently, Coughlin et al. showed an interesting application of change-point detection in COVID-19 using the information of new cases in 20 individual countries (excluding Costa Rica) and the European Union in an aggregated way [19]. They were able to identify change-points in trend and variability using a Bayesian Change Point model together with a B-spline procedure. In order to estimate where those changes probably occurred in the series of newly infected cases, we use non-parametric and parametric change-point detection techniques. In the case of non-parametric, we used the Change Point model (CPM) for sequential multiple change detection introduced in [20,21], implemented in [22,23,24] and broadly used in different environmental applications, for example [25,26,27,28]. We used several hypothesis tests to apply the non-parametric procedure on the Change Point model detection: Mood [29], Lepage [30], and the well-known Kolmogorov–Smirnov, Mann–Whitney, and Cramer–von-Mises tests. In the case of a parametric sequential detection of phase changes through outlier identification according to [31] (Chen-Liu). The change-points detected are likely due to the impact of mobility restrictions or allowances on the days before the effect was quantified. A cross-correlation analysis among the rate of change of new cases and Google’s Mobility Trends allowed us to determine which lags are more significant under a Pearson hypothesis test.
To determine the association between changes detected in disease transmission and population mobility, we used a Bayesian Structural Time (BST) series model fitted with a Markov chain Monte Carlo (MCMC) sampling algorithm. The model was then combined with data from Google’s Community Mobility Reports to infer the cumulative difference between the observed and expected number of the projected cases after the change- points were detected. In this way, we attempt to combine the above information to infer the causal impact of the mobility preceding each change-point. Here we use a certain type of BST model called the Bayesian structural time-series model [32] with a set of K lagged covariates with significant association with respect to the dependent variable. The covariate lags can be determined by means of cross-correlation analysis. Two advantages of this model are that: (1) it is able to keep the temporal association in the modeling process without using the restrictive assumption of independence in observations and (2) the Bayesian approach combined with a state-space structure assures a natural way to propagate the uncertainty along the model hierarchy. In our case, the BST model can be written as:
y t = μ t + x t T β + σ y ε t μ t = μ t 1 + σ μ η t
where yt are the new infections due to COVID-19 at day t, x t T = ( M t l 1 1 ,   M t l 2 2 , M t l K K ) are lagged mobility covariates with their respective lags l k (k = 1,…, K), β = ( β 1 , , β K ) T , σy and σµ are parameters, µt is a latent variable indicating the trend behavior of yt, and ε t and ηt are normally-distributed white noises.
We use the MCMC algorithm to fit the model according to Equation (1), using the available data before each change-point occurred and assuming for the subsequent change-point that the data starts immediately after the previous change-point happened. The parameter set θ = (β, σy, σµ) is assumed to follow a spike-and-slab prior according to Equation 2.8 in [32]. The MCMC is performed with the R package CausalImpact [32], where posterior samples of the observed series and model parameters θ are computed. For each model, the time period can be divided into two different sets: a pre-intervention period containing the time before the change-point occurs and where the MCMC process is performed and a post-intervention period, where the MCMC process gives estimates of the observed series that we then compare with real values in order to approximate the causal effect of interventions.
In general, BST models provide methodological alternatives to include different sources of information together with a hierarchical structure of latent variables and error terms [33]. The BST approach during the estimation process provides a natural way to combine prior and sample information in the specification of the posterior distributions of both latent variables and parameters. In this sense, the MCMC algorithm helps to obtain those posterior distributions with many computational advantages. Bayesian and frequentist structural models have been widely used in epidemiological and environmental applications [34,35,36,37].
To explore associations between the variations detected in population mobility and the sanitary measures adopted by the health authorities, we identify all sets of measures imposed from March through June 2020, just before the appearance of the COVID-19 community transmission in Costa Rica. For simplicity, we assume that each set of measures is represented by an indicator at a unique date, chosen as the midpoint of the period where the set of measures is valid. We then apply a MANOVA model among the four mobility series (Retail and Recreation, Parks, Transit stations and Residential) and two temporal components: (1) a weekly seasonal effect and (2) a conditional effect of the set of measures given that the time of the previous set is taken as the start of the fitting set of observations. Finally, we apply a Pillai test to infer the effect of each individual set of measures given its preceding set to quantify its conditional impact on the mobility series. In this way, we were able to associate the set of measures with the mobility information to deduce their qualitative impact on the number of cases of COVID-19.

3. Results

Using the change-point for sequential multiple change detection, we detected significant points with the non-parametric Mood [29] and Lepage [30] tests using the series of log-differences of newly infected cases as a way to quantify the rate of change of the overall series. Figure 1 shows the series of new infected COVID-19 cases with the estimated change-points with the available methodologies.
Note that all the procedures were able to identify at least three different periods where the distributional properties of the newly infected cases significantly changed. Since the methods detect different elements, the periods identified are not the same, but when combined, they show a larger consensus that the series of newly infected cases experiences change-points in dates between 14 April 2020 and 18 April 2020 and between 3 June 2020 and 19 June 2020. For ease of analysis, we chose 18 April 2020 and 19 June 2020 as the estimated dates where the change-points occurred.
A cross-correlation analysis among the rate of change of new cases during mid-April and mid-June 2020 and Google’s Mobility Trends allowed us to determine that seven-to-eight-day lags are more significant under a Pearson hypothesis test, as shown in Table 1.
We then fit two BST models. The first one assumes that 18 April 2020 is a change point, and the second one does the same with 19 June 2020, using the MCMC procedure with 1000 samples. We used the set of Google’s mobility series along with their lags as covariates.
The upper panels of Figure 2 contain the Bayesian estimation of the observed process for both periods together with their respective 95% predictive regions. The lower panels contain the posterior estimation of the cumulative effect of the intervention along the post-intervention period.
The upper-left panel in Figure 2 shows the Bayesian estimation of the causal effect using 14 March 2020 through 18 April 2020 data as the pre-intervention period and 19 April 2020 through 2 June 2020 as the post-intervention period. We remark that between 342 and 697 cases represent a 95% confidence interval of the cumulative effect on 2 June 2020 of the set of interventions before 18 April 2020, with a mean value of 526 cases. This mean value approximately represents 47% of the observed cumulative cases on 2 June 2020. The daily difference between the expected (under the pre-intervention conditions) and the observed number of cases is between 6 and 15 cases with the same confidence level, with a mean difference of 11 cases. In relative terms, there is a mean reduction of 54% in the number of daily cases with a confidence interval of (35%, 71%) approximately.
The upper-right panel in Figure 2 shows the fitting with 19 April 2020 through 19 June 2020 as pre-intervention period and 20 June 2020 through 2 July 2020 as post-intervention period. In this case, the effect is the opposite. There is a mean cumulative difference between observed and estimated cases of 1965 cases on 2 July 2020. This represents 48.8% of the observed cumulative cases on the same date. The daily difference among the observed and the expected number of cases (under the pre-intervention conditions) is between 109 and 131 cases with the same confidence level, with a mean difference of 120 cases. In relative terms, there is a mean increase of 387% in the number of daily cases with a confidence interval of (351%, 423%) approximately.
Table 2 contains the sets of measures from 10 March 2020 to 21 June 2020, just before the community transmission started in Costa Rica. The conditional effect of each set of measures is shown in the fourth column, measured by the p-value of the Pillai test. Note that all the sets cause a significant effect on the group of mobility covariates when we consider the weekly effect of mobility patterns. However, the effect of mobility with respect to sanitary measures varies across time periods. The first two sets are expected to show a larger effect because of the abrupt change in mobility behavior during March 2020 (see Figure 3). In these initial periods, although sanitary measures greatly impacted human mobility, they are not expected to correlate with significant changes in disease transmission because infected cases were still too low. Afterward, the conditional effect of additional measures is smaller, but set 4 shows a larger impact due to the general mobility restriction during the period between April 8 and 12 (Holy Week in Costa Rica). Starting from set 5, the subsequent mobility openings had a significant impact on Google’s indices, and the effect tends to decline by the end of June 2020. That is, the effect of lifting sanitary measures significantly increased the mobility in the period associated with an increase in newly reported cases.

4. Discussion

As the transmission of the SARS-CoV-2 virus has progressed around the world, a primary focus of decision-makers has been to implement comprehensive public health measures adapted to each country’s unique capacities and context [38]. Our findings show several conclusions that may prove useful to inform on the effectiveness of some of such measures to slow down the transmission of the disease or the role that they may have had in delaying community transmission.
First, through the use of change-point detection algorithms, we were able to identify two periods where the tendency of cases significantly varied. Then BTS models found a direct association between human mobility and this reduction in the transmission rate of the disease. After the first detected change-point on 18 April 2020, we were able to estimate a mean reduction of 54% in the number of daily cases from the projected number. We identified an association between some sanitary measures and this significant variation in human mobility patterns. Based on the estimated lag period of seven days and the high correlation estimated by the Pillai test, this reduction in the number of cases can be traced back to the set of sanitary measures taken by the health authorities during Holy Week, from 3 April 2020 to 12 April 2020 [14], in which the circulation of vehicles and public transportation was suspended. This finding proves wrong arguments against restrictions in vehicular circulation as not effective at reducing the transmission of SARS-CoV-2 in Costa Rica.
During March and April 2020, the epidemiological context of the country was led by well-established clusters of cases and a slow increase in the number of daily cases. However, the country was also in a race to increase hospital capacity, mainly for intensive care units. This health crisis drove the Ministry of Health to implement restrictive measures in order to flatten the curve of new cases, to avoid the saturation of health care services, and to give time to health officials to increase the human resources, hospital beds, ventilators, and personal protective equipment necessary to care for the patients.
It is also noteworthy that the effect of these restrictions was significant even compared to the previous period, when human mobility was already reduced due to major sanitary measures, such as the cancellation of massive events, school closures, and restrictions on all non-essential commercial activities. Indeed, in 2021, Costa Rica has seen the largest surge in cases and hospital admissions so far; this led to health authorities imposing restrictions in commercial activity and school closures. In light of the research presented in this article, the consideration of adopting restrictions in the circulation of vehicles may be supported by findings in this study.
The epidemiological context and results of the second detected change-point was vastly different from the first period. The analysis showed an increase of 387% in the number of new daily cases with respect to the projection by the BTS analysis. Before 20 June 2020, the country started the gradual reopening of commercial activities, as the number of new cases was stabilizing, and health officials had started to increase hospital capacity. These measures started on 1 May 2020 [14], divided into periods of 14 days each and involved the gradual opening of businesses such as gymnasiums, movie theaters, beauty salons, hotels, as well as the opening of beaches with restrictive schedules, and national parks [14].
Overall, during this second period of the analysis, although mobility dynamics were positively correlated with easing public health measures, the results of the Pillai test showed a weaker conditional effect compared to the first period of analysis. This can be expected due to the complex interaction of the other social, economic, and behavioral factors in this period. For example, besides the gradual reopening of commerce, the country was also starting to witness an increase in the number of new cases detected in areas located near the northern border of Costa Rica with Nicaragua. The cases were mostly linked with clusters being reported in locations with agricultural activities and processing factories [14], which typically receive a significant number of migrant workers who cross illegally, despite the border being closed. These phenomena may have limited the capacity of the models to accurately associate the increase in daily new cases with the public health measures implemented during that period.
Our findings of 7–8 days lag effect on infections after the onset of mobility reduction contrast with those of Cot et al. [11], who reported 2–5 weeks and are closer to the 9–12 days described by Badr et al. [10]. Our numbers are consistent with the incubation time of SARS-CoV-2, which may reflect a more direct effect on the mobility measures captured in our study. Our reduction effect on infection rates of 54% is about the average of what Cot et al. [11] found for Europe and the United States and are comparable to the 35% and 63% reported by Badr et al. in [10].
We remark that one of the limitations of the study is that mobility data is aggregated at a national level. Therefore, it was not possible to analyze differences in mobility by region. Moreover, the statistical analysis relied on a series of assumptions. For example, the use of a single midpoint to represent each set of measures can change their real effect over the mobility series, or the effect not accounted for by the mobility data on the detected change-points can have more temporal structure than the one assumed in Equation (1). The study also has limitations on capturing the effect of behavioral changes associated with sanitary measures in different periods of the pandemic. The imposition of restrictions in the early stages of the disease might have had a larger impact due to the fear in the general population of a new deadly virus. The widespread use of personal protective measures such as face masks also changed during the pandemic.
Despite these limitations, results from our study provide an insight into the critical role of sanitary measures in controlling the spread of the virus in the initial phases, when countries and health systems are preparing to receive a surge in severe cases. It is important to communicate these results and their conclusions to public health experts and decision makers currently battling to control the pandemic and to those in charge of preparing for future (similar) events.
Further research should explore the effect of human mobility and the role that sanitary measures play in the context of vaccination roll-outs and the emergence of new variants of SARS-CoV-2. Beyond the elevated death toll of COVID-19, the cost of having had an international community poorly prepared to confront the challenges of the pandemic prior to 2020 will bring serious and lasting consequences to the whole world, some of which we are only starting to understand. In an effort to learn our lessons, it is important to study which measures have been effective to contain, control, or mitigate the spread of the disease. This study can contribute to being better prepared for future pandemics but can also inform on tools to transition out of the current situation.

Author Contributions

Conceptualization, L.A.B., P.V., F.S., Y.E.G., J.G.C. and G.M.; methodology, L.A.B.; software, L.A.B.; validation, L.A.B.; formal analysis, L.A.B., P.V., F.S., Y.E.G., J.G.C., G.M., T.R., D.S. and M.D.P.; investigation, L.A.B., T.R. and D.S.; resources, L.A.B., F.S., J.G.C., Y.E.G. and P.V.; data curation, L.A.B., P.V., T.R. and D.S.; writing—original draft preparation, P.V., L.A.B., G.M. and F.S.; writing—review and editing, L.A.B., P.V., F.S. and G.M.; visualization, L.A.B. and P.V.; supervision, L.A.B. and P.V.; project administration, L.A.B. and P.V.; funding acquisition, F.S., J.G.C., L.A.B. and D.S. All authors have read and agreed to the published version of the manuscript. G.M. and M.D.P. are staff members of the Pan American Health Organization. The authors alone are responsible for the views expressed in this publication, and they do not necessarily represent the decisions or policies of the Pan American Health Organization.


This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data used in this paper is available at COVID-19 Community Mobility Reports. Available online: (accessed on 19 July 2021). Data of Covid-19 cases is available at the Ministry of Health web page (accessed on 19 July 2021).


The authors would like to thank the Research Center in Pure and Applied Mathematics and the School of Mathematics at Universidad de Costa Rica for their support during the preparation of this manuscript. They also thank the Ministry of Health for providing data and valuable information for this study.

Conflicts of Interest

The authors declare no conflict of interest.


  1. Cowling, B.J.; Aiello, A.E. Public health measures to slow community spread of coronavirus disease 2019. J. Infect. Dis. 2020, 221, 1749–1751. [Google Scholar] [CrossRef][Green Version]
  2. Wilder-Smith, A.; Freedman, D.O. Isolation, quarantine, social distancing and community containment: Pivotal role for old-style public health measures in the novel coronavirus (2019-nCoV) outbreak. J. Travel Med. 2020, 27, taaa020. [Google Scholar] [CrossRef]
  3. Haug, N.; Geyrhofer, L.; Londei, A.; Dervic, E.; Desvars-Larrive, A.; Loreto, V.; Pinior, B.; Thurner, S.; Klimek, P. Ranking the effectiveness of worldwide Covid-19 government interventions. Nat. Hum. Behav. 2020, 4, 1303–1312. [Google Scholar] [CrossRef] [PubMed]
  4. Hsiang, S.; Allen, D.; Annan-Phan, S.; Bell, K.; Bolliger, I.; Chong, T.; Hannah, D.; Huang, L.Y.; Hultgren, A.; Krasovich, E.; et al. The effect of large-scale anti-contagion policies on the covid-19 pandemic. Nature 2020, 584, 262–267. [Google Scholar] [CrossRef]
  5. Flaxman, S.; Mishra, S.; Gandy, A.; Unwin, H.J.; Mellan, T.A.; Coupland, H.; Whittaker, C.; Zhu, H.; Berah, T.; Eaton, J.W.; et al. Estimating the effects of non-pharmaceutical interventions on COVID-19 in Europe. Nature 2020, 584, 257–261. [Google Scholar] [CrossRef]
  6. Chinazzi, M.; Davis, J.T.; Ajelli, M.; Gioannini, C.; Litvinova, M.; Merler, S.; Piontti, A.P.; Mu, K.; Rossi, L.; Sun, K.; et al. The effect of travel restrictions on the spread of the 2019 novel coronavirus (COVID-19) outbreak. Science 2020, 368, 395–400. [Google Scholar] [CrossRef] [PubMed][Green Version]
  7. Kraemer, M.U.G.; Yang, C.-H.; Gutierrez, B.; Wu, C.-H.; Klein, B. The effect of human mobility and control measures on the COVID-19 epidemic in China. Science 2020, 368, 493–497. [Google Scholar] [CrossRef] [PubMed][Green Version]
  8. Prem, K.; Liu, Y.; Russell, T.W.; Kucharski, A.J.; Eggo, R.M.; Davies, N.; Flasche, S.; Clifford, S.; Pearson, C.A.B.; Munday, J.D.; et al. The effect of control strategies to reduce social mixing on outcomes of the COVID-19 epidemic in Wuhan, China: A modelling study. Lancet Public Health 2020, 5, e261–e270. [Google Scholar] [CrossRef][Green Version]
  9. Cacciapaglia, G.; Sannino, F. Interplay of social distancing and border restrictions for pandemics via the epidemic renormalisation group framework. Sci. Rep. 2020, 28, 15828. [Google Scholar] [CrossRef] [PubMed]
  10. Badr, H.S.; Du, H.; Marshall, M.; Dong, E.; Squire, M.M.; Gardner, L.M. Association between mobility patterns and COVID-19 transmission in the USA: A mathematical modelling study. Lancet Infect. Dis. 2020, 20, 1247–1254. [Google Scholar] [CrossRef]
  11. Cot, C.; Cacciapaglia, G.; Sannino, F. Mining Google and Apple mobility data: Temporal anatomy for COVID-19 social distancing. Sci. Rep. 2020, 11, 1–8. [Google Scholar]
  12. Cazelles, B.; Comiskey, C.; Nguyen-Van-Yen, B.; Champagne, C.; Roche, B. Parallel trends in the transmission of SARS-CoV-2 and retail/recreation and public transport mobility during non-lockdown periods. Int. J. Infect. Dis. 2021, 104, 693–695. [Google Scholar] [CrossRef] [PubMed]
  13. World Health Organization. Coronavirus Disease (COVID-19) Weekly Epidemiological Update and Weekly Operational Update. Available online: (accessed on 1 February 2021).
  14. Ministry of Health. National Situation of COVID-19. Available online: (accessed on 1 February 2021).
  15. United Nations. 5 Reasons Costa Rica is Winning Plaudits for Fighting Covid-19: A UN Resident Coordinator Blog. Available online: (accessed on 2 February 2021).
  16. COVID-19 Community Mobility Reports. Available online: (accessed on 15 January 2021).
  17. Dehning, J.; Zierenberg, J.; Spitzner, F.P.; Wibral, M.; Neto, J.P.; Wilczek, M.; Priesemann, V. Inferring change points in the spread of COVID-19 reveals the effectiveness of interventions. Science 2020, 369, eabb9789. [Google Scholar] [CrossRef] [PubMed]
  18. Jiang, F.; Zhao, Z.; Shao, X. Time series analysis of Covid-19 infection curve: A change-point perspective. J. Econom. 2020. [Google Scholar] [CrossRef]
  19. Coughlin, S.S.; Yigiter, A.; Xu, H.; Berman, A.E.; Chen, J. Early detection of change patterns in covid-19 incidence and the implementation of public health policies: A multi-national study. Public Health Pract. 2020, 2, 100064. [Google Scholar] [CrossRef] [PubMed]
  20. Hawkins, D.M.; Qiu, P.H.; Kang, C.W. The Change point Model for Statistical Process Control. J. Qual. Technol. 2003, 35, 355–366. [Google Scholar] [CrossRef]
  21. Hawkins, D.M.; Zamba, K.D. A Change-Point Model for a Shift in Variance. J. Qual. Technol. 2005, 37, 21–31. [Google Scholar] [CrossRef]
  22. Ross, G.J. Parametric and nonparametric sequential change detection in R: The cpm package. J. Stat. Softw. 2015, 66, 1–20. [Google Scholar]
  23. Ross, G.J. Sequential change detection in the presence of unknown parameters. Stat. Comput. 2014, 24, 1017–1030. [Google Scholar] [CrossRef][Green Version]
  24. Ross, G.J.; Adams, N.M.; Tasoulis, D.K.; Hand, D.J. A nonparametric change point model for streaming data. Technometrics 2011, 53, 379–389. [Google Scholar] [CrossRef]
  25. Buendia, C.; Batalla, R.J.; Sabater, S.; Palau, A.; Marcé, R. Runoff trends driven by climate and afforestation in a Pyrenean Basin. Land Degrad. Dev. 2016, 27, 823–838. [Google Scholar] [CrossRef][Green Version]
  26. Killick, R.; Eckley, I.A.; Ewans, K.; Jonathan, P. Detection of changes in variance of oceanographic time-series using changepoint analysis. Ocean Eng. 2010, 37, 1120–1126. [Google Scholar] [CrossRef][Green Version]
  27. Xue, T.; Tang, G.; Sun, L.; Wu, Y.; Liu, Y.; Dou, Y. Long-term trends in precipitation and precipitation extremes and underlying mechanisms in the US Great Basin during 1951–2013. J. Geophys. Res. Atmos. 2017, 122, 6152–6169. [Google Scholar] [CrossRef]
  28. Song, J.; Huang, B.; Li, R. Measuring recovery to build up metrics of flood resilience based on pollutant discharge data: A case study in East China. Water 2017, 9, 619. [Google Scholar] [CrossRef]
  29. Mood, A.M. On the asymptotic efficiency of certain nonparametric two-sample tests. Ann. Math. Stat. 1954, 514–522. [Google Scholar] [CrossRef]
  30. Lepage, Y. A combination of Wilcoxon’s and Ansari-Bradley’s statistics. Biometrika 1971, 58, 213–217. [Google Scholar] [CrossRef]
  31. Chen, C.; Liu, L.M. Joint estimation of model parameters and outlier effects in time series. J. Am. Stat. Assoc. 1993, 88, 284–297. [Google Scholar]
  32. Brodersen, K.H.; Gallusser, F.; Koehler, J.; Remy, N.; Scott, S.L. Inferring causal impact using Bayesian structural time-series models. Ann. Appl. Stat. 2015, 9, 247–274. [Google Scholar] [CrossRef]
  33. Palomo, J.; Dunson, D.B.; Bollen, K. Bayesian Structural Equation Modeling. In Handbook of Latent Variable and Related Models; North-Holland: Amsterdam, The Netherlands; Elsevier: Oxford, UK, 2017; pp. 163–188. [Google Scholar]
  34. Sánchez, B.N.; Budtz-Jørgensen, E.; Ryan, L.M.; Hu, H. Structural equation models: A review with applications to environmental epidemiology. J. Am. Stat. Assoc. 2005, 100, 1443–1455. [Google Scholar] [CrossRef][Green Version]
  35. Baja, E.S.; Schwartz, J.D.; Coull, B.A.; Wellenuis, G.A.; Vokonas, P.S.; Suh, H.H. Structural equation modeling of the inflammatory response to traffic air pollution. J. Expo. Sci. Environ. Epidemiol. 2013, 23, 268–274. [Google Scholar] [CrossRef] [PubMed][Green Version]
  36. Watad, A.; Watad, S.; Mahroum, N.; Sharif, K.; Amital, H.; Bragazzi, N.L.; Adawi, M. Forecasting the West Nile virus in the United States: An extensive novel data streams–based time series analysis and structural equation modeling of related digital searching behavior. JMIR Public Health Surveill. 2019, 5, e9176. [Google Scholar] [CrossRef] [PubMed][Green Version]
  37. Skrondal, A.; Rabe-Hesketh, S. Some applications of generalized linear latent and mixed models in epidemiology: Repeated measures, measurement error and multilevel modeling. Nor. Epidemiol. 2003, 13, 265–278. [Google Scholar]
  38. World Health Organization. COVID-19 Strategy Update. Available online: (accessed on 2 February 2021).
Figure 1. Estimated change-points (vertical lines) of new COVID-19 infected cases, comparing between the three methods.
Figure 1. Estimated change-points (vertical lines) of new COVID-19 infected cases, comparing between the three methods.
Epidemiologia 02 00022 g001
Figure 2. Upper panels: Bayesian estimation (green line and green shaded 95% credible region) of the observed number of COVID-19 cases (black line) during the study periods: 14 March–2 June 2020 (left) and 18 April–2 July 2020 (right). Lower panels: the estimated cumulative effect of the measures taken before 18 April 2020 (left) and 19 June 2020 (right).
Figure 2. Upper panels: Bayesian estimation (green line and green shaded 95% credible region) of the observed number of COVID-19 cases (black line) during the study periods: 14 March–2 June 2020 (left) and 18 April–2 July 2020 (right). Lower panels: the estimated cumulative effect of the measures taken before 18 April 2020 (left) and 19 June 2020 (right).
Epidemiologia 02 00022 g002
Figure 3. Google mobility indices (solid lines) along with the sets of sanitary and mobility measures (dashed lines). The sets of measures are defined in Table 2. Abscissa: Time (Days), Ordinate: Daily Google Mobility Index.
Figure 3. Google mobility indices (solid lines) along with the sets of sanitary and mobility measures (dashed lines). The sets of measures are defined in Table 2. Abscissa: Time (Days), Ordinate: Daily Google Mobility Index.
Epidemiologia 02 00022 g003
Table 1. Significant cross-correlation lags under a Pearson test. The remaining categories show no-significant lags.
Table 1. Significant cross-correlation lags under a Pearson test. The remaining categories show no-significant lags.
CategoriesNotation in (1)Lag (Days)
Retail and Recreation M t 1 7
Parks M t 2 7
Transit stations M t 3 7
Residential M t 4 8
Table 2. Sanitary and mobility measures from March through June, 2020. The p-value of the Pillai test is shown in the fourth column.
Table 2. Sanitary and mobility measures from March through June, 2020. The p-value of the Pillai test is shown in the fourth column.
SetDateMeasuresPillai Test
13/10–3/22Cancellation of massive events and work from
home instructions; closure of bars and casinos; Government declares National Emergency; Closure of all schools and borders; Closure of movies, theaters, and gymnasiums, malls at 50%.
<2.2 × 10−16
23/23–4/2Closure of beaches, churches, and national parks;
Start of vehicle restrictions from 10 p.m. to 5 a.m.; Vehicle restriction on weekends from 8 p.m. to 5 a.m.; Closure of non-essential commercial activities starting at 8 p.m. and during the weekend.
8.94 × 10−14
34/3–4/7Daytime vehicle restriction from 5 a.m. to 5 p.m.,
with plate distribution and nighttime vehicle restriction from 5 p.m. to 5 a.m.; Restriction of long-distance public transportation; Closure of non-essential commercial activities.
2.38 × 10−3
44/8–4/12The circulation of vehicles and public transportation was suspended.2.71 × 10−11
54/13–4/30Day-time vehicle restriction from 5 a.m. to 7 p.m.
with plate distribution; Total nighttime vehicle restriction from 7 p.m. to 5 a.m.; On weekends, total vehicle restriction (with exceptions to access to essential services); Commerce may function from 5 a.m. to 7 p.m., weekends delivery only.
9.65 × 10−10
65/1–5/15The first phase of gradual reopening of commercial activities; Vehicle restriction from 5 a.m. to 7 p.m. with plate distribution; Total night-time restriction from 7 p.m. to 5 a.m.2.01 × 10−7
75/16–5/31The second phase of the gradual reopening
of commercial activities; Vehicle restriction from 5 a.m. to 10 p.m. with plate distribution; Total nighttime restriction from 10 p.m. to 5 a.m.
2.03 × 10−5
86/1–6/19The third phase of the gradual reopening of
commercial activities; Vehicle restriction from 5 a.m. to 10 p.m. with plate distribution; Total nighttime restriction from 10 p.m. to 5 a.m.; Differentiated vehicle restriction in municipalities located near the northern border area of Costa Rica.
8.84 × 10−4
96/20–6/21Total vehicle restriction with circulation only
to essential services; Closure of non-essential commercial activities.
8.84 × 10−4
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Barboza, L.A.; Vásquez, P.; Mery, G.; Sanchez, F.; García, Y.E.; Calvo, J.G.; Rivas, T.; Pérez, M.D.; Salas, D. The Role of Mobility and Sanitary Measures on the Delay of Community Transmission of COVID-19 in Costa Rica. Epidemiologia 2021, 2, 294-304.

AMA Style

Barboza LA, Vásquez P, Mery G, Sanchez F, García YE, Calvo JG, Rivas T, Pérez MD, Salas D. The Role of Mobility and Sanitary Measures on the Delay of Community Transmission of COVID-19 in Costa Rica. Epidemiologia. 2021; 2(3):294-304.

Chicago/Turabian Style

Barboza, Luis A., Paola Vásquez, Gustavo Mery, Fabio Sanchez, Yury E. García, Juan G. Calvo, Tania Rivas, María Dolores Pérez, and Daniel Salas. 2021. "The Role of Mobility and Sanitary Measures on the Delay of Community Transmission of COVID-19 in Costa Rica" Epidemiologia 2, no. 3: 294-304.

Article Metrics

Back to TopTop