1 Introduction

Air pollution, mainly in big cities, is one consequence of economic development in contexts that rely primarily on fossil fuels. According to the WHO (2022), outdoor air pollution is estimated to have caused 4.2 million premature deaths worldwide in 2019. The geographical location of the city of Medellín and its metropolitan area (also known as Aburrá Valley) in Antioquia-Colombia generates poor ventilation conditions (Área Metropolitana del Valle de Aburrá 2018), which facilitates the concentration of air pollutants that can cause adverse health effects (Kampa and Castanas 2008). High pollution outbreaks have been more frequent in this region over the last decade. This increase in the presence of air pollutants is also due to a considerable growth of vehicle fleets in the city, where official statistics have shown a rise of 54% from 2011 to 2018 (Área Metropolitana del Valle de Aburrá AMVA 2018). The effect of the vehicle fleet on the presence of pollutants in the air of the city of Medellín has been discussed multiple times by several authors (Posada et al. 2017; Cardenas 2017; Aguiar-Gil et al. 2020). For instance, in March 2016, the local authorities of the Aburrá Valley declared an atmospheric contingency due to some studies (Área Metropolitana del Valle de Aburrá 2016) showing a significant increase in the levels of air pollution. Those studies showed that the primary pollutant sources were private vehicles, such as cars and motorcycles, representing more than 90% of the vehicular traffic from the whole Valley. Even several years before these red flags, Bedoya and Martínez (2009) reported concentrations of breathable particulate matter \(\hbox {PM}_{{10}}\) of \(70\,\mu \text {g}/\text {m}^3\), more than three times the recommended limit of \(20\,\mu \text {g}/\text {m}^3\) suggested by National Health Organization at the time. Additionally, some studies showed that between 1980 and 2015, observed concentrations of breathable \(\hbox {PM}_{{10}}\) particles had increased in \(30\mu \text {g}/\text {m}^3\) and that increments of around \(10\mu \text {g}/\text {m}^3\) produced a rise up to 20% in the mortality rates related to lung cancer and respiratory diseases (Alcaldía 2012; Ministerio 2012; Martínez-Jaramillo et al. 2017; Martínez et al. 2013). More recently, Área Metropolitana del Valle de Aburrá (2018) showed that 79% of the \(\hbox {PM}_{2.5}\) particles in the air were emitted by engine vehicles with a total of 1534 tons per year. Empirical evidence has shown that exposition to atmospheric pollutants affects public health by increasing the risk of lung cancer and respiratory and cardiovascular diseases (Ling-Yun and Lu-Yi 2016; Weichenthal et al. 2011). According to Contraloría General de Medellín (2019), there was evidence that in the city of Medellín, 4500 people die per year due to acute respiratory diseases, with the majority of the cases occurring in regions of high vehicular traffic. Thus, in order to tackle emissions from the vehicular fleet, local authorities have implemented transit restrictions on private and public vehicles based on car license plates. These restrictions were first implemented in 2004 and since then have evolved along with the growth of the vehicular fleet. Initially, vehicles were restricted from transit during peak hours, such as 6:30–8:30 am and 5:30–7:30 pm. These restrictions helped to ease transit during these hours but worsened traffic for the rest of the day (Posada Henao et al. 2011). Since 2022 restrictions have been tightened, and all motorcycles and vehicles are not allowed to transit the city roads one day per week based on their car license plates (Área Metropolitana del Valle de Aburrá AMVA 2022). Those contingency measures have not been free from controversy, with some sectors of society, usually middle and higher-class groups, against them. A clear necessity in this context is to provide the local authorities and the general public with scientific analyses that support policies designed to improve air quality in the city. In this sense, Martínez-Jaramillo et al. (2017), using energy system simulation for the period 2010 and 2040, found that promoting both remote work and public transport would reduce 9.4% of the emissions of \(\text {CO}_{2}\) for the year 2040 in the city Medellín and its metropolitan area. Taking advantage of the mobility restrictions imposed at the beginning of the COVID-19 pandemic, which provided a set of conditions as close as possible to the scenario of removing the vehicle fleet, Mendez-Espinosa et al. (2020) performed an impact analysis of these conditions on the air quality in the cities of Medellín and Bogotá. They employed information from two monitoring stations (different localizations in each city) related to \(\hbox {PM}_{{10}}\), \(\hbox {PM}_{2.5}\), and \(\hbox {NO}_{{2}}\) from February 21 to June 30, 2022. Using tools analysis such as surface measurements and satellite and modeled data, they found short-term background \(\hbox {NO}_{{2}}\), \(\hbox {PM}_{{10}}\), and \(\hbox {PM}_{2.5}\) concentration reductions of 60%, 44%, and 40%, respectively, for the strict lockdown; and 62%, 58%, and 69% for the relaxed lockdown. The study of the impact of lockdowns due to the COVID-19 pandemic on environmental pollutants has gained considerable attention in the literature. For instance, Shakoor et al. (2020) described the variations in the environmental pollutants between 2019 and 2020 for some states and provinces of the USA and China, respectively. They analyzed and compared the first quarter period for both years using descriptive statistical analysis and non-parametric correlation tests. They found an overall reduction of CO, \(\hbox {NO}_{{2}}\), and \(\hbox {PM}_{2.5}\) in some states in the USA and a reduction in CO, \(\hbox {NO}_{{2}}\), \(\hbox {SO}_{{2}}\), \(\hbox {PM}_{2.5}\), and \(\hbox {PM}_{{10}}\) in some provinces from China. Ropkins and Tate (2021) applied break-point/segment methods to air pollutant time series from monitoring stations across the UK. They analyzed the observations from the first half of 2020 for O, \(\hbox {NO}_{{2}}\), \(\hbox {NO}_{{x}}\), \(\hbox {O}_{{3}}\), \(\hbox {PM}_{{10}}\), and \(\hbox {PM}_{2.5}\) and found that all exhibited abrupt decreases at the time the UK locked down. Similarly, Briz-Redón et al. (2021) studied the impact of short-term lockdown from March 15th to April 12th, 2020, on the atmospheric levels of CO, \(\hbox {SO}_{{2}}\)over 11 representative Spanish cities. Using linear regression models and controlling by some meteorological factors (temperature, precipitation, wind, sunlight hours, minimum and maximum pressure), they found that the 4-week lockdown had a significant impact on reducing the atmospheric levels of \(\hbox {NO}_{{2}}\) in all cities except for the small city of Santander as well as CO, \(\hbox {SO}_{{2}}\), and \(\hbox {PM}_{{10}}\) in some cities, but resulted in an increase of \(\hbox {O}_{{3}}\) level.

In this work, we employed Bayesian Dynamic Linear Models (BDLM) to estimate the impact of the automotive fleet halt and the suspension of industrial activities on reducing the presence of pollutants in the air. In particular, we analyzed the case of Medellín during the strict lockdown at the beginning of the COVID-19 pandemic. In contrast with the works cited above, we take into account the spatiotemporal structure usually present in this type of application. Additionally, compared with the study by Mendez-Espinosa et al. (2020), we take more than two locations or monitoring stations. For the impact assessment, we followed a similar approach as in Brodersen et al. (2015), but instead of using univariate DLMs, we have developed the methodology for the multivariate case. Additionally, we proposed several metrics to compute an aggregated impact for the whole collection of monitoring stations considered in the analysis. We used information from the public monitoring networks across Medellín and its metropolitan area, taking the information from 27 locations or monitoring stations. That information is freely available on SIATA (https://siata.gov.co/siata_nuevo/). The method and contribution presented in this work have been implemented on the R Core Team (2018) package dynamicimpact available on https://github.com/CarlosAndres12/dynamicimpact. In the next section, we introduce the models and the impact measures employed in this work. In Sect. 3, a simulation analysis is performed to evaluate the capacity of the proposed method to identify different types of impacts. In Sect. 4, an application of the method regarding the case of Medellín is presented. In Sect. 6, some conclusions and potential open problems for future development are presented.

2 Models

Let \(\textbf{Y}_t\) be a random matrix of dimension \(r \times q\), where for the context of this work, r represents the number of monitored pollutants and dimension q represents the number of monitoring stations where the pollutants have been measured. Following the approach defined in Quintana (1985), Quintana (1987) and West and Harrison (1997), the response \(\textbf{Y}_t\) is modeled under a dynamic or state-space structure as follows:

$$\begin{aligned} \begin{array}{lccll} \text {Observation}\ & \textbf{Y}_t & =& \textbf{F}_t\mathbf {\Theta }_t + \mathbf {\varepsilon }_t, & \mathbf {\varepsilon }_t \sim N(0, \textbf{V}_t, \mathbf {\Sigma }_{\text {obs}}), \\ \text {Evolution:}\ & \mathbf {\Theta }_t& =& \mathbf {\Theta }_{t-1} + \mathbf {\Omega }_t, & \mathbf {\Omega }_t \sim N(0, \textbf{W}_t, \mathbf {\Sigma }_{\text {evol}}),\\ \end{array} \end{aligned}$$
(1)

where \(\textbf{F}_t\) is a matrix of \(r \times (p+1)\) that contains a column of ones representing the intercept and p predictors or covariates related to r monitored pollutants. \(\mathbf {\Theta }_t\) is a matrix of unknown parameters of dimensions \((p+1) \times q\). \(\textbf{W}_t\), \(\mathbf {\Sigma }_{\text {obs}}\), \(\mathbf {\Sigma }_{\text {evol}}\) and \(\textbf{V}_t\) are covariance matrices for the observation and evolution structures of dimensions \((p+1)\times (p+1)\), \(q \times q\), \(q \times q\) and \(r\times r\) respectively. The matrices of observational and evolution errors, \(\mathbf {\varepsilon }_t\) and \(\mathbf {\Omega }_t\), follow matrix-variate normal distributions, the multivariate version of normal distributions for random matrices (Dawid 1981). To perform inference on the parameters and predictions for the response variable, we follow a Bayesian approach. When setting the prior distributions, we consider several scenarios. One of them is the original propose by Quintana (1987), where it is supposed that \(\mathbf {\Sigma }_{\text {obs}}=\mathbf {\Sigma }_{\text {evol}}\) and, for \(t=0\), \((\mathbf {\Theta }_0, \mathbf {\Sigma }_{\text {obs}})\sim NW^{-1}(\textbf{M}_{0}, \textbf{C}_{0}, \textbf{S}_{0}, d_{0})\), where \(NW^{-1}\) is the matrix-variate version of the Normal-inverse-Wishart distribution. Under this prior setting, we have the matrices \(\textbf{M}_{t}, \textbf{C}_{t}\), and \(\textbf{S}_{t}\) of dimensions \((p+1) \times q\), \((p+1)\times (p+1)\) and \(q \times q\) respectively. \(\textbf{M}_{t}\) can serve as a point estimate of \(\mathbf {\Theta }_t\), and \(\textbf{C}_{t}\), and \(\textbf{S}_{t}\) represent the covariance structures related to the rows and columns of \(\mathbf {\Theta }_t\). The parameter \(d_t\) represents the degrees of freedom related to the marginal Wishart distribution. Thus, the \(NW^{-1}\) prior distribution is sequentially updated from time \(t=1\) to \(t=T\), which is one of the advantages of using the Bayesian approach for the model (1) under this setting. It is also assumed that the matrices \(\textbf{W}_t\), \(\textbf{V}_t\) are known, however, in this work, we employ a discount factors approach to estimate \(\textbf{W}_t\) as it is proposed in Ameen and Harrison (1985) and West et al. (1985), and set \(\textbf{V}_t={\textbf {I}}_r\). Under this first scenario, conjugacy is easily attained as it is shown in the Appendix section 7. A second scenario consists of using Hamiltonian MCMC (Brooks et al. 2011) implemented in the programming language Stan (Stan Development Team 2024) to simulate samples from the posterior distributions of the model parameters. Following this last approach, we define vague or noninformative prior distributions and obtain posterior approximations for all the unknown quantities, including \(\textbf{W}_t\) and \(\textbf{V}_t\). The main advantage of using the model structure defined in (1) is that the temporal and spatial components in the type of applications presented in this work can be addressed simultaneously in a straightforward way. The temporal dependence is modeled in the evolution equation in (1), where a Markovian structure describes the temporal dependence of the time series pollutants. These types of state-space models are known for taking advantage of the latent structure related to the state equation to define conditional independence structures, which facilitates the sequential computation of the posterior distributions. For more details about the conditional independence assumptions, the interested reader can see West and Harrison (1997). On the other hand, the dependence between monitoring stations is captured by the covariance structure contained in \(\mathbf {\Sigma }_{\text {obs}}\). Each off-diagonal element of \(\mathbf {\Sigma }_{\text {obs}}\) represents the covariance between monitoring stations. It is worth mentioning that despite modeling the dependence between monitoring stations, model (1) is not a spatial model. That is important because, in the analysis developed in the following sections, the location of the monitoring stations is not a relevant or necessary factor to compute the impact. Our modeling mainly focuses on predicting the temporal component and not on new locations. However, during the development of this work, we also explore a spatial version of the model (1), precisely the one proposed by Stroud et al. (2001). However, this model does not allow conjugacy, is computationally more expensive, and the results for the cases where MCMC convergence is attained are practically the same as the ones obtained with the model (1). Thus, for practicality and usability, we introduce our methodology using only model (1). However, the knowledge-seeking reader can consult our previous work (Pérez Aguirre, 2022, pages 19, 40), where the spatial version of the model (1) is implemented. For more details on matrix-variate modeling using model (1) in a similar context, see Cardona-Jiménez and de B. Pereira (2021).

2.1 Impact assessment

Let \(\textbf{Y}_t\) be the observed series and \(\tilde{\textbf{Y}}_{t}\) the counterfactual series which represents the series “if the intervention had not occurred”. For intervention, we mean a “controlled” treatment. We can define \(\textbf{Y}_t\) in terms of \(\tilde{\textbf{Y}}_{t}\) as shown in (2), where \(T_0\) represent the start of the intervention and T the end of the series. This situation is illustrated in Fig. 1.

Fig. 1
figure 1

Graphical synthetic example of the elements for impact assessment for an univariate example. In this case \(T_0= 70\) and \(T=100\)

$$\begin{aligned} \textbf{Y}_t = \left\{ \begin{array}{ll} \tilde{\textbf{Y}}_{t} & \quad t=1, \ldots , T_0 \\ \tilde{\textbf{Y}}_{t} + \varvec{\delta }_{t} & \quad t=T_0+1, \ldots , T. \end{array} \right. \end{aligned}$$
(2)

Note that before the intervention time \(T_0\), \(\textbf{Y}_t=\tilde{\textbf{Y}}_{t}\). The impact at time t is given by the dynamic parameter \(\varvec{\delta }_{t}\), which is equal to \(\textbf{0}\) before the time \(T_0+1\). We define the cumulative impact as:

$$\begin{aligned} \text {CI}_{t} = \sum _{i=T_0}^{t} \varvec{\delta }_{i}, \end{aligned}$$
(3)

The cumulative sum of impact increments is a useful quantity when \(\textbf{Y}_t\) represents a flow quantity, measured over an interval of time (e.g., a day) (Brodersen et al. 2015). For instance, in the applications addressed in this work, \(\textbf{Y}_t\) represents the pollutant concentration per hour.

We also employ the artificial counterfactual (ArCo) method proposed by Carvalho et al. (2018) as a measure of impact assessment:

$$\begin{aligned} \text {ArCo}_t = \frac{1}{t - T_0 + 1} \sum _{i=T_0}^{t} \delta _{i},\ \ \text {for} \ \ t\ge T_0. \end{aligned}$$
(4)

The ArCo averages the impact over the post-intervention period, which helps to control the variance of the posterior probability intervals related to the estimation of the unknown impact.

For the applications addressed in this article, pollutants are commonly measured in different geographical locations. Thus, in order to have one global result that represents the impact related to a specific pollutant in the hole region of interest, we define the aggregated impact as follows:

$$\begin{aligned} \begin{array}{lccll} & \varvec{\delta }_{t,r, q} & =& Y_{t, r, q} - \tilde{Y}_{t, r, q}& \\ \\ & \varvec{\delta }_{t, r} & =& {1 \over Q} \sum _{q=1}^{Q}\varvec{\delta }_{t, r, q},& \\ \\ \end{array} \end{aligned}$$
(5)

where \(r = 1 \dots R,\) and \(q = 1 \dots Q, \) are the indexes related to pollutants and stations (at different geographical locations), respectively. \(Y_{t, r, q}\) is the observed value at time t at the station q related to pollutant r, and \(\tilde{Y}_{t, r, q}\) is the value of the counterfactual series. Thus, the Eqs. (3) and (4) are computed with the impact defined in (5). An aggregated measure allows a straightforward analysis of the impact of situations like the one addressed in this work, where several locations or stations could be analyzed at once. However, in case one is interested in analyzing one specific location, the problem is reduced to using the impact defined in (2). To perform inference over the significance of the impact, the Bayesian approach adopted in this work allows a straightforward computation of the posterior distribution of (3) and (4) from the MCMC simulations. In particular, the significance of the impact is assessed using posterior probability intervals at 95%.

3 Simulation study

This section presents a simulation analysis of the method defined above under different impact scenarios. We analyze the performance of the metrics (3) and (4) under three impact scenarios: positive impact, negative impact, and no impact at all. A positive and negative impact can be interpreted as growth and reduction in the observed pollutant, respectively. That increment or reduction is obtained when compared with the counterfactual scenario. No impact means that the amount of the observed pollutant is the same as the counterfactual scenario. The counterfactual in this context means the observed pollutant that would have been obtained without the intervention or treatment. The simulation process is performed in two stages. In the first part, the simulation algorithm generates a time series with mean \(\mathbf {\mu }_t = \textbf{F}_t\mathbf {\Theta }_t\) from \(t=1\) until \(T_0\), the time of the start of the treatment. The change in the mean of the process related to the effect of the treatment is given by \(\mathbf {\mu }_t = \textbf{F}_t\mathbf {\Theta }_t + \textbf{F}_t\mathbf {\Phi }_t\) and goes from \(t=T_0+1\) until T. In the second stage of the process, q monitoring stations are simulated for r different pollutants. In order to define the three study scenarios mentioned above, three different values for the parameter \(\mathbf {\Phi }_t\) are defined: \(\mathbf {\Phi }_t>0\) for a positive impact, \(\mathbf {\Phi }_t<0\) for a negative impact and \(\mathbf {\Phi }_t=0\) for the no impact scenario. For interested readers, the algorithm is presented in the Appendix section 8.

Fig. 2
figure 2

Results for simulated data under a positive impact scenario with \(T_0=73\) and \(T=123\)

In Fig. 2 is presented the result for \(\mathbf {\Phi }_t>0\). One can observe that both (3) and (4) detect a positive impact, which is consistent with the value set for \(\mathbf {\Phi }_t\). The results are similar for the case of both negative and no impact scenarios, presented in Figs. 6 and 7. In general, the results presented in this section and other complementary analyses (Pérez Aguirre 2022) using simulated data show that the proposed method works well under different impact scenarios.

4 Application

The main challenge related to the application of the method presented in Sect. 2.1—in the context of air pollution—is to perform a “controlled” experiment that allows the measurement of some impact. In this sense, we take advantage of the strict lockdown imposed during the first stages of the COVID-19 pandemic. At least in Medellín in Colombia, mobility restrictions were too strict during almost the first 40 days of imposed lockdowns. This event can be used as a perfect experiment to measure the impact of halting the vehicle fleets on air pollution. The strict lockdown in Colombia was officially declared on March 25, 2020. However, the public health emergency was declared on March 12, 2020. Given the rapid spread of the COVID-19 virus, restrictions were gradually imposed during this period until the strict lockdown was reached. Mobility restrictions were gradually eased beginning on May 4 of the same year as some services, industrial, and manufacturing sectors reopened. Thus, we take different windows of periods within the interval from March 1 to May 1 for the impact assessment. To build the counterfactual series, we employ the observed time series of the analyzed pollutants in the same observation window of 2019. These time series from the year before of the COVID-19 pandemic are used as covariates or predictors for the event: “if the intervention had not occurred”. The seasonal behavior observed in the pollutants is the primary justification for selecting those covariates as good predictors of the no-intervention scenario. One would expect a similar behavior of the pollutants for the same observation window in the closest years. Then, if a pollutant’s behavior significantly changes from one year to the next, this change is likely induced by a critical external intervention. For the examples presented below, we compute the impact for \(\hbox {PM}_{{10}}\), \(\hbox {PM}_{2.5}\), NO, \(\hbox {NO}_{{x}}\) and \(\hbox {NO}_{{2}}\). Table 1 and Fig. 3 show the pollutants measured and the geographical locations of the monitoring stations considered in this application example.

Fig. 3
figure 3

Geographical location in the Aburrrá Valley of the monitoring stations related to the pollutants analyzed in this work

Table 1 The monitoring stations and pollutants that are measured on each of them

4.1 Analysis of the impact on pollutant concentrations

In this section, the results of the Bayesian dynamic model (1) and the metrics (3), (4) and (5) to assess the impact of reducing vehicular flow on the presence of pollutants \(\hbox {PM}_{{10}}\), \(\hbox {PM}_{2.5}\), NO, \(\hbox {NO}_{{2}}\) and \(\hbox {NO}_{{x}}\) are provided. We select the \(\hbox {PM}_{2.5}\), and \(\hbox {NO}_{{x}}\) for detailed analysis for several reasons. The first is that \(\hbox {PM}_{2.5}\) particles, in contrast with \(\hbox {PM}_{{10}}\), can penetrate deep into the respiratory system, leading to respiratory diseases such as asthma, bronchitis, and lung cancer, as well as cardiovascular diseases, adverse birth outcomes, and premature death. This is because \(\hbox {PM}_{2.5}\) particles often consist of a high proportion of toxic substances such as heavy metals, organic compounds, and other pollutants (Xing et al. 2016; Sosa et al. 2017; Liang et al. 2017). The second is that \(\hbox {NO}_{{x}}\) contained NO, \(\hbox {NO}_{{2}}\) pollutants. Furthermore, the results of the impact observed for \(\hbox {PM}_{2.5}\) and \(\hbox {NO}_{{x}}\) are similar to the ones observed for the rest of the pollutants. The results for \(\hbox {PM}_{{10}}\), NO, \(\hbox {NO}_{{2}}\), as well as the corresponding detailed tables, are presented in the Appendix section 8. Figure 4 shows the results for the aggregated impact computed for \(\hbox {PM}_{2.5}\). The first panel on the left illustrates the average observed time series (average of the original series over all the monitoring stations) along with the average of the fitted time series with model (1) with data until 03/31; it also presents the average of the forecast for the rest of the period analyzed. The fitted model and its forecast are obtained by averaging the q columns of the variable \(\textbf{Y}_t\) after fitting the model (1). The second panel presents the average of the Input time series, which corresponds to the same pollutant observed in the observation window for 2019. That average input is obtained by averaging some of the columns of the matrix \(\textbf{F}_t\). In the panels from the second row are presented the impact measures related to Eqs. (3), (4), and (5) respectively. These results demonstrate that a few days after vehicle fleets were halted, the \(\hbox {PM}_{2.5}\) pollutants in the air significantly decreased, with 95% posterior probability intervals for both the cumulative and the Arco impact excluding the zero value. This finding aligns with other studies conducted in the Aburrá Valley, which also reported reductions in \(\hbox {PM}_{2.5}\) concentrations during the lockdown. The observed time series shows a notable decline in \(\hbox {PM}_{2.5}\) levels following the cessation of vehicle fleets, a trend confirmed by prior studies in the Aburrá Valley (Henao et al. 2021; Mendez-Espinosa et al. 2020). These studies attributed the reduction to a decline in vehicular emissions, which account for more than 80% of PM and \(\hbox {NO}_{{x}}\) emissions (AMVA and Bolivariana 2017), a finding consistent with global observations during the lockdown period (Venter et al. 2020; Chauhan and Singh 2020; Gkatzelis et al. 2021). This evidence underscores the predominant influence of traffic over industrial activities in PM and \(\hbox {NO}_{{x}}\) emissions.

Fig. 4
figure 4

The panel on the left from the first row presents the average fitted time series and the average of the observed time series for \(\hbox {PM}_{2.5}\). The right panel on the same row presents the average of the predictors related to some of the columns of \(\textbf{F}_t\) and the average of the observed time series for \(\hbox {PM}_{2.5}\). The second row presents the results of the aggregate impact for \(\hbox {PM}_{2.5}\) with initial event time 2020-03-31

In Fig. 5, for \(\hbox {NO}_{{x}}\), there is a behavior similar to the one observed with \(\hbox {PM}_{2.5}\). The reduction of this pollutant can be explained for similar reasons we highlighted above for \(\hbox {PM}_{2.5}\) (Henao et al. 2021). For \(\hbox {PM}_{2.5}\), a significant reduction is observed from March 31st and for \(\hbox {NO}_{{x}}\) earlier on March 16th. That difference could be explained by the fact that PM may travel great distances in the air and remain suspended for extended periods of time (Galon-Negru et al. 2019; Correa et al. 2023). The PM composition is also a good explanation of the longest presence time of PM in the air. For instance, Correa et al. (2023) studied the composition of PM for the Medellín city (the most extensive municipality in Aburrá Valley) and found ions such as sulfate, nitrate, and ammonium in concentrations between 70 and 80% and metals like chromium, nickel, lead, cadmium, iron, manganese, copper, and zinc. In general, the results are similar for the rest of the pollutants studied: \(\hbox {PM}_{{10}}\), NO, and \(\hbox {NO}_{{2}}\). A significant reduction in the aggregate impact is observed for all of them. Table 2 presents the impact for \(\hbox {NO}_{{x}}\) in different time windows. In the first period ([2020-03-01, 2020-03-16]), corresponding to the days before the beginning of the strict lockdown, some stations present a nonsignificant impact. However, after this first-time window, all the stations show a significant impact related to a significant reduction of the \(\hbox {NO}_{{x}}\). For NO and \(\hbox {NO}_{{2}}\), the behavior is similar. However, for \(\hbox {PM}_{2.5}\) and \(\hbox {PM}_{{10}}\) (see Table 3), significance is attained from [2020-03-31] to the rest of the analyzed period of time. The possible reasons for that delay in significance are explained above.

Fig. 5
figure 5

The panel on the left from the first row presents the average fitted time series and the average of the observed time series for \(\hbox {NO}_{{x}}\). The right panel on the same row presents the average of the predictors related to some of the columns of \(\textbf{F}_t\) and the average of the observed time series for \(\hbox {NO}_{{x}}\). The second row presents the results of the aggregate impact for \(\hbox {NO}_{{x}}\) with initial event time 2020-03-16

Table 2 Individual and aggregated impact results for \(\hbox {NO}_{{x}}\) presented at different time periods

5 Discussion

Several authors have reported a significant improvement in air quality and associated health benefits due to reduced anthropogenic activities during the COVID-19 lockdown period. The strict lockdown measures implemented to control the spread of COVID-19 resulted in a marked improvement in air quality. Findings from Gansu Province indicate that PM was the primary pollutant, contributing over 85% of the total exposure risk (Cheng et al. 2024). Northern China saw a 35% reduction in \(\hbox {PM}_{2.5}\) and a 60% reduction in \(\hbox {NO}_{{2}}\), with cities like Beijing, Shanghai, Guangzhou, and Wuhan experiencing substantial decreases in \(\hbox {PM}_{2.5}\) levels (Liou et al. 2023). This air quality improvement potentially prevented 15,807 premature deaths, primarily due to reductions in anthropogenic emissions. Significant decreases in \(\hbox {PM}_{2.5}\), \(\hbox {PM}_{{10}}\), \(\hbox {NO}_{{2}}\), and \(\hbox {SO}_{{2}}\) were noted in North China, particularly in Shandong Province (Lv et al. 2023). European studies indicated reductions in \(\hbox {NO}_{{2}}\) and \(\hbox {PM}_{2.5}\) concentrations due to decreased traffic and industrial activities. The lockdown effects varied significantly among countries, with the most notable impact observed in urban areas for \(\hbox {NO}_{{2}}\) concentrations, showing reductions of up to 55% over a two-week average in the second half of March. In contrast, the unusually low \(\hbox {PM}_{2.5}\) concentrations observed in northern central Europe were only marginally attributed to the lockdown effects. These levels were more strongly influenced by weather conditions and showed a limited response to emission changes in individual sectors (Matthias et al. 2021). In Italy, for instance, \(\hbox {NO}_{{2}}\) levels significantly dropped across all urban areas, ranging from a 24.9% reduction in Milan to a 59.1% reduction in Naples, roughly proportional to but lower than the traffic reduction. \(\hbox {PM}_{{10}}\) exhibited reductions of up to 31.5% in Palermo and increases of up to 7.3% in Naples, while \(\hbox {PM}_{2.5}\) showed reductions of approximately 13–17%, counterbalanced by increases of up to 9% (Gualtieri et al. 2020). Similar trends were observed in India, where the concentrations of \(\hbox {PM}_{{10}}\), \(\hbox {PM}_{2.5}\), \(\hbox {NO}_{{2}}\), and \(\hbox {SO}_{{2}}\) were reduced by 55%, 49%, 60%, and 19% in Delhi, and 44%, 37%, 78%, and 39% in Mumbai, respectively, during the post-lockdown phase (Kumari and Toshniwal 2022). In the United States, statistically significant reductions of up to 49% for \(\hbox {NO}_{{2}}\) were reported in 18 of the 28 measured stations. \(\hbox {PM}_{{10}}\) and \(\hbox {PM}_{2.5}\) reductions were most notable in the Northeast and California/Nevada metropolises, where \(\hbox {NO}_{{2}}\) also saw the most significant declines. These findings are consistent with decreased transportation and utility demands, which dominate \(\hbox {NO}_{{2}}\) and CO emissions, especially in major urban areas, due to the lockdown (Chen et al. 2020). In summary, the improvements in air quality detected by our method during the COVID-19 lockdown in Aburrá Valley are consistent with global studies. These changes underscore the significant impact of human activities on air pollution and suggest potential benefits of long-term emission reduction strategies.

Regarding limitations of the method presented in this work, we want to highlight that this first version of our proposal is set up for cases with complete information, i.e., it is not possible to compute an impact for any monitoring station if there is missing data. Unfortunately, missing data is a common situation in this type of application because monitoring stations can be out of service for different reasons at any given time. That was one of the reasons for taking only the pollutants temporal series of 2019 as covariates in \(\textbf{F}_t\). In previous years, several monitoring stations have presented considerable missing data. Thus, it was not possible to include that information to obtain a more potentially accurate prediction or counterfactual temporal series. However, from some simple descriptive analyses not presented in this work, we observe from some monitoring stations with complete information that the behavior of the pollutants for 2019 was similar to previous years. Thus, the results obtained using only this period lead us to get reliable and consistent results when contrasted with the recent literature on this topic.

6 Conclusions

This paper presents a method for assessing the impact of halting vehicular fleets on air pollution. The method is based on multivariate Bayesian DLMs. One key component for impact assessment in this context is the counterfactual series. In this work, the counterfactual series is built using observed pollutants from the year before in the same time window of the event of interest. Through simulation studies, the method proposed is shown to be capable of detecting the three possible impact scenarios: positive impact, negative impact, or no impact at all. The application presented-considering that this methodology is mainly suitable for experimental settings, where a treatment is applied and its impact is measured-is based on the locks imposed during the COVID-19 pandemic. This event allows for the perfect experiment of stopping vehicle transit from the streets of Medellín and measuring the impact of this action on air pollution levels. From the results of this application, it is clear that the transit of vehicular fleets positively affects the increment of air pollution levels. This result is what one would expect in advance; however, having this formal assessment or quantification of this impact would offer policymakers a scientific tool regarding actions to improve air quality in big cities. It is worth mentioning that this methodology can be applied in different events related to halting vehicle fleets. For instance, car-free days, which are dates when people are encouraged to commute by means other than cars, take place in different countries. Those periods of car-free days, shorter than the one analyzed in this work, can be used to build a counterfactual series to measure the impact of this type of policy.

Regarding the modeling, the BDLM has shown to be a flexible option that allows performing inference related to the quantities in Eqs. (2), (3), and (4). The approximated posterior distributions of these impact measures allow us to assess their significance straightforwardly. An initial version of an R package called dynamicimpact available at https://github.com/CarlosAndres12/dynamicimpact, which implements the method proposed in this paper. In future work, we expect to update the package by improving the models, allowing estimation of missing data, assessing other alternatives for priors and approximation methods, and providing helpful documentation. It is also expected to implement examples regarding data on car-free days and other events related to low vehicular flow.