Introduction

The foundations of sustainability are depended on three pillars, i.e., environment, society, and economy. The theme and goals of sustainable development are becoming more prominent all over the world. However, energy resources continue to be exploited for development. Non-renewable energy resources are adverse for the environment and lead to the growth of greenhouse gas emissions. These adverse environmental conditions have prompted a push toward solutions that are helpful in economic development but not at the cost of environmental sustainability (Ansari et al. 2020; Aziz et al. 2020).

A country’s actual output/GDP can be used to calculate its economic growth. Some severe costs to the environment can be incurred for maximal GDP generation and consumption. However, the growth of different sectors becomes the justification for economic development. Interestingly, this growth of economic sectors could positively contribute to environmental sustainability, but in most cases, especially in emerging countries, it has become the reason for environmental degradation. Environmental deterioration is inextricably linked to GDP, agricultural output, foreign direct investment (FDI), and energy use. Increased consumption and production in these areas result in increased economic advancement due to productivity gains. Additionally, it results in environmental degradation.

FDI might become the key to reducing environmental degradation by adapting liberalization and financial openness policies while upgrading research and development (Copeland and Taylor 2004; Tamazian and Rao 2010; Weiqing 2010). Naseem et al. (2020) discussed how environmental sustainability is connected to human sustainability and sustainable development. Trade decreases environmental pollution by robustly increasing the actual national income level (Antweiler 2001; Copeland and Taylor 2004; Khoshnevis Yazdi and Golestani Dariani 2019). As such, trade, income, FDI, and environment are causally related and positively impact environmental quality in developed countries (Baek et al. 2009).

Urbanization affects the environment both positively and negatively. It can decrease the effect of economic growth on the environment. Urban environmental transition theory states that urban areas became more extravagant due industrialization and can contribute to environmental damage. As opposed to this, ecological guidelines and mechanical developments may reduce industry contamination. The concept of a compact city may point to the advantages of urbanization (Hossain). Increased urbanization may empower economies of scale for public infrastructure, and these scale economies may reduce ecological contamination. Lee et al. (2015) found that low-salary bunch urbanization expands CO2 emissions in the center/low-pay and high-pay gatherings using the dynamic panel threshold regression model.

The environmental Kuznets c(EKC) theory supports environmental decay for a growing and industry-based economy. EKC explains an empirical relationship among income per capita and various indicators of environmental degradation. According to the EKC hypothesis, economic growth is expected to have a reversed U-shaped association with environmental degradation. Hafeez et al. (2019) and Haseeb et al. (2020) used CO2 discharge as an intermediary of ecological degradation. Alshubiri et al. (2020) found a positive association between monetary development and carbon dioxide discharges in Tunisia using Johansen cointegration. In India, Sinha and Bhatt (2017) found an N-shaped EKC. Ahmadi et al. (2015) confirmed the ECV’s validity using the PSTR model for ASEAN countries. Kais and Sami (2016) verified the presence of a reverse U-shaped EKC for 58 countries. Churchill et al. (2020), Karimifard and Moghaddam (2018), and De Vita et al. (2015) confirmed the effectiveness of EKC for developing countries by using regression analysis. Arouri et al. (2012) identified a quadratic relationship between GDP and carbon dioxide emissions in the Middle East and North Africa (MENA) countries. Puzon (2012), on the other hand, discovered a negative link between energy consumption and CO2 emissions. He justified his findings by stating that as GDP per unit of energy increases, pollutants emission decreases.

Bhattarai et al. (2003) suggested that avoiding agriculture employment until the country’s income increases to the level of a developed country may help to improve environmental quality. This can be seen in the Indian agriculture sector, which faces several challenges, such as environmental degradation (Singh and Misra 2021). Strict implementation of sustainable environmental strategies can reduce pollution (Wang et al. 2017; Wang and Liu 2019). The fossil fuel combustion and chemical reactions during industrial production directly contribute to greenhouse gas emissions (Dong et al. 2014). As such, industrialization increased energy consumption and CO2 emissions, worsening environmental degradation. Because of its raw materials, processes, and waste, industrialization has drastically harmed the quality of the environment (Wang et al. 2017).

Environmental problems mainly emerge due to urbanization and the expansion of industrialization. Cities are becoming urban clusters due to an increase in population. Pakistan’s urban areas have become highly vulnerable to climate change. Due to massive fuel combustion and GHG emissions, industrial zones damage the urban microclimate. Carbon dioxide comprises more than 60% of all global greenhouse gas emissions. Therefore, innovation shocks should be considered when formulating environmental policies (Weimin et al. 2021).

Pakistan’s economy has shifted from agricultural to industrial development. Industrialization has economic and social importance, but it also has many negative environmental consequences. Rapid industrialization has resulted in a rise in greenhouse gases that have considerably changed Pakistan’s climatic conditions. The industrial sector is the major contributor to all types of greenhouse gas emissions, specifically CO2 emissions. The industrial manufacturing process burns fossil fuels for the steam and heat production process, and fossil fuels are the basis of CO2 emissions. In Pakistan, environmental degradation challenges such as air and water pollutions emerged due to urbanization and industry expansion (Churchill et al. 2020; Dogan et al. 2020; Gormus and Aydin 2020). Notably, in Pakistan, tourist activities have no impact on CO2 emissions (Oad et al. 2021).

Due to this scenario, environmental sustainability has become a critical concern for policymakers, economic academics, and researchers. This research will investigate economic growth, energy use, FDI, agriculture, industrialization, and urban population growth’s impact on environmental sustainability. We have evaluated the effect of variables on sustainability using ARDL, Decoupling Index, VECM, impulse response, and variance decomposition other than EKC. Pakistan is an emerging country trying to shift its economy from developing to developed. This research will be helpful for similar emerging countries that are willing to transform the base of their economy and development. The current study will answer the following questions:

  1. 1.

    Is there any relationship between Pakistan’s economic growth and environmental degradation?

  2. 2.

    Is there a long- or short-run relationship between Pakistan’s economic development and environmental degradation?

  3. 3.

    What type of practical implications can help enhance the quality of the environment with perfect economic growth?

Material and methods

Data source

This study gathered Pakistan’s yearly time series data on carbon dioxide emissions (CO2), GDP, energy use, FDI, agriculture, industrialization, and urban population growth from 1971 to 2018. The variables’ data were derived from the World Development Indicator (WDI), certified by the World Bank. The variables’ specifications are CO2 emission (metric tons per capita), GDP (current US$ per capita), energy use (KG of oil equivalent per capita), foreign direct investment (net inflow of GDP), agriculture (forestry and fishing value added of GDP), industrialization (Including construction value added of GDP), and urban population growth (annual growth).

Log-log function

The initial step of the investigation was to look into the environmental effects of economic development along sectorial lines. These assumptions about the relationship between CO2 emissions and economic growth were used in this analysis:

$${CO}_2=h\left(f(Y)\right)$$
(1)

Y represents economic growth (Alam et al. 2015; Sulaiman and Abdul-Rahim 2018), and h denotes the CO2 emission rate from the traditional production function. Economic growth is segregated into GDP, energy use (ENU), foreign direct investment (FDI), agriculture (AGR), industrialization (IND), and urban population growth (UPG) to capture the influence of sectoral growth on CO2 emissions.

$$Y=\left( GDP, ENU, FDI, AGR, IND, UPG\right)$$
(2)

It is noteworthy that econometrically, the environmental Kuznets curve (EKC) literature is weak because of the functionality of income, income squared, and income cubed for emissions modeling (Stern 2004). The collinearity or multicollinearity problem may occur between income, income squared, and income cubed (Narayan and Narayan 2010; Sulaiman and Abdul-Rahim 2018). So, the linear relationship is more appropriate and accurate (Alkhathlan and Javid 2013). A simple log-linear form model for emission and growth is as follows:

$${CO}_2=f\ \left( GDP, ENU, FDI, AGR, IND, UPG\right)$$
(3)
$${CO}_{2t}={\delta GDP}_t+{\delta ENU}_t+{\delta FDI}_t+{\delta AGR}_t+{\delta IND}_t+{\delta UPG}_t+{\varepsilon}_t$$
(4)

CO2 emissions are expressed in metric tons of carbon dioxide per capita, while GDP is expressed in current US dollars. In Equation 4, ENU denotes energy consumption in kilograms of oil equivalent per capita, and FDI indicates foreign direct investment as a percentage of GDP. AGR is the value contributed to GDP by agriculture, forestry, and fishery, while IND is the value added to GDP by industrialization, including building. UPG denotes annual urban population growth. The sign of εt indicates a data error or disturbance term. Statistically, the unit root test determines the stationarity of the time series variables. The non-stationarity of time series variables suggests the presence of a unit root in the data.

Augmented Dickey-Fuller test (ADF)

The ADF test is used to assess the level and first difference stationarity of selected data series, such as CO2, GDP, ENU, FDI, AGR, IND, and UPG. The ADF test is a unit root test that implements the following equation to measure the least-squares approach for individual intercept: individual intercept:

$$\Delta {y}_t={\alpha}_0+\alpha {y}_{t-1}+\sum\nolimits_{i=1}^p{\beta}_j\Delta {y}_{t-i}+{\varepsilon}_t$$
(5)

Autoregressive distribution lag (ARDL) model

The ARDL model’s technique entailed examining the relationship between variables in the long or short run. Some of this paradigm’s advantages apply to three integration orders: I (1), I (0), and mixed. When variables are integrated at I(0) and I (1), other cointegration approaches, such as Engle and Granger, Johansen and Philips and Hansen, cannot be used (1) (Mohsin et al., n.d.; Naseem et al. 2020). Real-time computations of long- and short-run coefficients, as well as dynamics, were performed. This is also an adequate strategy for obtaining accurate results for a small and finite sample (30–80) time series. The OLS method examines the cointegration relationship of CO2 emissions with a specific set of factors. The following is the conditional error correction model:

$${\varDelta lnCO}_2=\kern0.5em {\alpha}_0+\sum\nolimits_{i=1}^m{\varphi}_i\Delta {lnCO}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnGDP}_{t-i}+\sum\nolimits_{i=0}^m{\beta}_i\Delta {lnENU}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnFDI}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnAGR}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnIND}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnUPG}_{t-i}+{\lambda}_1{lnCO}_{2t-1}+{\lambda}_2{lnGDP}_{t-1}+{\lambda}_3{lnENU}_{t-1}+{\lambda}_4{FDI}_{t-1}+{\lambda}_4{AGR}_{t-1}+{\lambda}_5{IND}_{t-1}+{\lambda}_6{UPG}_{t-1}+{\varepsilon}_t$$
(6)

Equation 6 tests cointegration among λCO2, λGDP, λENU, λFDI, λAGR, λIND, and λUPG. The null and alternative hypothesis of the cointegration relationship is as follows:

$$\mathrm{No}\ \mathrm{cointegration}/\mathrm{H}0:\uplambda \mathrm{CO}2=\uplambda \mathrm{GDP}=\uplambda \mathrm{ENU}=\uplambda \mathrm{FDI}=\uplambda \mathrm{AGR}=\uplambda \mathrm{IND}=\uplambda \mathrm{UPG}=0$$
$$\mathrm{Presence}\ \mathrm{of}\ \mathrm{cointegration}/\mathrm{H}1:\uplambda \mathrm{CO}2\ne \uplambda \mathrm{GDP}\ne \uplambda \mathrm{ENU}\ne \uplambda \mathrm{FDI}\ne \uplambda \mathrm{AGR}\ne \uplambda \mathrm{IND}\ne \uplambda \mathrm{UPG}\ne 0$$
$$\mathrm{Inconclusive}\ \mathrm{cointegration}=\mathrm{Lower}\ \mathrm{Bound}\ \mathrm{Value}<\mathrm{F}-\mathrm{Statictics}<\mathrm{Upper}\ \mathrm{Bound}\ \mathrm{Value}$$

The results demonstrate the cointegration connection’s presence, absence, or inconclusive nature by comparing the computed F-statistics to the upper- and lower-bound values. Cointegration is established when the value of the F-statistics exceeds the upper-bound value. There is no cointegration if the F-statistics value is much smaller than the lower-bound value. If the F-statistics result is between the higher and lower bounds, the presence or absence of cointegration is unknown. The presence of a cointegration relationship between variables enables ARDL models in both the short and long run (Pesaran et al. 2001). The short- and long-run ARDL models have the following equations.

Short-run ARDL model

$${\Delta \mathrm{lnCO}}_2=\kern0.5em {\upalpha}_0+\sum\nolimits_{\mathrm{i}=1}^{\mathrm{m}}{\upvarphi}_{\mathrm{i}}\Delta {\mathrm{lnCO}}_{\mathrm{t}-\mathrm{i}}+\sum\nolimits_{\mathrm{i}=0}^{\mathrm{m}}{\upomega}_{\mathrm{i}}\Delta {\mathrm{lnGDP}}_{\mathrm{t}-\mathrm{i}}+\sum\nolimits_{\mathrm{i}=0}^{\mathrm{m}}{\upbeta}_{\mathrm{i}}\Delta {\mathrm{lnENU}}_{\mathrm{t}-\mathrm{i}}+\sum\nolimits_{\mathrm{i}=0}^{\mathrm{m}}{\upomega}_{\mathrm{i}}\Delta {\mathrm{lnFDI}}_{\mathrm{t}-\mathrm{i}}+\sum\nolimits_{\mathrm{i}=0}^{\mathrm{m}}{\upomega}_{\mathrm{i}}\Delta {\mathrm{lnAGR}}_{\mathrm{t}-\mathrm{i}}+\sum\nolimits_{\mathrm{i}=0}^{\mathrm{m}}{\upomega}_{\mathrm{i}}\Delta {\mathrm{lnIND}}_{\mathrm{t}-\mathrm{i}}+\sum\nolimits_{\mathrm{i}=0}^{\mathrm{m}}{\upomega}_{\mathrm{i}}\Delta {\mathrm{lnUPG}}_{\mathrm{t}-\mathrm{i}}+{\uplambda \mathrm{ECT}}_{\mathrm{t}-1}+{\upvarepsilon}_{\mathrm{t}}$$
(7)

Long-run ARDL model

$${\varDelta lnCO}_2=\kern0.5em {\alpha}_0+\sum\nolimits_{i=1}^m{\varphi}_i\Delta {lnCO}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnGDP}_{t-i}+\sum\nolimits_{i=0}^m{\beta}_i\Delta {lnENU}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnFDI}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnAGR}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnIND}_{t-i}+\sum\nolimits_{i=0}^m{\omega}_i\Delta {lnUPG}_{t-i}+{\varepsilon}_t$$
(8)

In the short-run model, coefficient λ denotes the error correction term (ECT), which indicates the speed with which the variables approach short- to long-run convergence (Pesaran et al. 2001). Through a simple transformation, the error correction model may be easily derived from ARDL, which blends short-run correction with long-run equilibrium without misplacing information. The value of ECT must be between 0 and − 1. The value of lagged ECT indicates that in the current period, the dependent variable is adjusted at the ratio of error in the previous period. It means the whole system gets back to equilibrium at the rate specified by lagged ECT. Finally, this study diagnosed the model using post-tests (serial correlation, heteroskedasticity, CUSUM, and CUSUMSQ) to determine model stability.

Robustness check using VECM Granger causality

A vector error correction model can evaluate the short- and long-run effects. The structure modeling frame of VECM determines the error correction model below:

$$\left[\begin{array}{c}\Delta {lnCO}_{2t}\\ {}\Delta {lnGDP}_t\\ {}\Delta {lnENU}_t\\ {}\Delta {lnFDI}_t\\ {}\Delta {lnAGR}_t\\ {}\Delta {lnIND}_t\\ {}\Delta {lnUPG}_t\end{array}\right]=\left[\begin{array}{c}{\theta}_1\\ {}{\theta}_2\\ {}{\theta}_3\\ {}{\theta}_4\\ {}{\theta}_5\\ {}{\theta}_6\\ {}{\theta}_7\end{array}\right]+\left[\begin{array}{c}{d}_{11m}{d}_{12m}{d}_{13m}{d}_{14m}{d}_{15m}{d}_{16m}{d}_{17m}\\ {}{d}_{21m}{d}_{22m}{d}_{23m}{d}_{24m}{d}_{25m}{d}_{26m}{d}_{27m}\\ {}{d}_{31m}{d}_{32m}{d}_{33m}{d}_{34m}{d}_{35m}{d}_{36m}{d}_{37m}\\ {}{d}_{41m}{d}_{42m}{d}_{43m}{d}_{44m}{d}_{45m}{d}_{46m}{d}_{47m}\\ {}{d}_{51m}{d}_{52m}{d}_{53m}{d}_{54m}{d}_{55m}{d}_{56m}{d}_{57m}\\ {}{d}_{61m}{d}_{62m}{d}_{63m}{d}_{64m}{d}_{65m}{d}_{66m}{d}_{67m}\\ {}{d}_{71m}{d}_{72m}{d}_{73m}{d}_{74m}{d}_{75m}{d}_{76m}{d}_{77m}\end{array}\right]\mathrm{X}\left[\begin{array}{c}\Delta {lnCO}_{2t-1}\\ {}\Delta {lnGDP}_{t-1}\\ {}\Delta {lnENU}_{t-1}\\ {}\Delta {lnFDI}_{t-1}\\ {}\Delta {lnAGR}_{t-1}\\ {}\Delta {lnIND}_{t-1}\\ {}\Delta {lnUPG}_{t-1}\end{array}\right]+\dots +\left[\begin{array}{c}{d}_{11n}{d}_{12n}{d}_{13n}{d}_{14n}{d}_{15n}{d}_{16n}{d}_{17n}\\ {}{d}_{21n}{d}_{22n}{d}_{23n}{d}_{24n}{d}_{25n}{d}_{26n}{d}_{27n}\\ {}{d}_{31n}{d}_{32n}{d}_{33n}{d}_{34n}{d}_{35n}{d}_{36n}{d}_{37n}\\ {}{d}_{41n}{d}_{42n}{d}_{43n}{d}_{44n}{d}_{45n}{d}_{46n}{d}_{47n}\\ {}{d}_{51n}{d}_{52n}{d}_{53n}{d}_{54n}{d}_{55n}{d}_{56n}{d}_{57n}\\ {}{d}_{61n}{d}_{62n}{d}_{63n}{d}_{64n}{d}_{65n}{d}_{66n}{d}_{67n}\\ {}{d}_{71n}{d}_{72n}{d}_{73n}{d}_{74n}{d}_{75n}{d}_{76n}{d}_{77n}\end{array}\right]\mathrm{X}\left[\begin{array}{c}\Delta {lnCO}_{2t-1}\\ {}\Delta {lnGDP}_{t-1}\\ {}\Delta {lnENU}_{t-1}\\ {}\Delta {lnFDI}_{t-1}\\ {}\Delta {lnAGR}_{t-1}\\ {}\Delta {lnIND}_{t-1}\\ {}\Delta {lnUPG}_{t-1}\end{array}\right]+\left[\begin{array}{c}{\boldsymbol{\lambda}}_1\\ {}{\boldsymbol{\lambda}}_2\\ {}{\boldsymbol{\lambda}}_3\\ {}{\boldsymbol{\lambda}}_4\\ {}{\boldsymbol{\lambda}}_5\\ {}{\boldsymbol{\lambda}}_6\\ {}{\boldsymbol{\lambda}}_7\end{array}\right]\left({ECM}_{t-1}\right)+\left[\begin{array}{c}{\boldsymbol{\varepsilon}}_{1t}\\ {}{\boldsymbol{\varepsilon}}_{2t}\\ {}{\boldsymbol{\varepsilon}}_{3t}\\ {}{\boldsymbol{\varepsilon}}_{4t}\\ {}{\boldsymbol{\varepsilon}}_{5t}\\ {}{\boldsymbol{\varepsilon}}_{6t}\\ {}{\boldsymbol{\varepsilon}}_{7t}\end{array}\right]$$
(9)

In the above model, coefficients λ1 − λ7 are representative of error correction terms, ε1t − ε7t denotes homoscedastic disturbance term, and ECMt − 1 indicates periodical equilibrium and adjustment speed from a shorter period to a longer period. The Wald test recommends checking the short-run causality and directional trend using the first difference statistics of the data series (Sulaiman and Abdul-Rahim 2018).

Empirical results

The results of the correlation matrix are presented in Table 1, in which statistical association measures between random pairs of variables are given. The digits − 1 and 1 show perfect downhill and uphill, respectively, toward individual variables. A fairly strong positive relationship between variables has been reported, with values between 0.70 and 0.80. The absence of the mathematical property of probabilistic independence becomes dependent on a random variable. Undoubtedly, most of the variables are correlated with each other. For accurate results and guidance toward the right direction, the ARDL model is used because it can auto-regress and be unbiased if there is any problem in the data series.

Table 1 Correlation matrix

The results of Augmented Dickey-Fuller and Phillips Perron are summarized in Table 2. The alternative hypothesis is tested on two distinct types of stationarity, namely, stationary and trend stationary (Nelson and Plosser 1982; Hegwood and Papell 2007; Mohsin et al. 2021a). Dickey-Fuller and Phillips Perron augmentations are used to verify stationarity with level and first difference. All variables are significant at the first difference, with a 1% and 5% significance level for constant and constant trend, respectively, indicating that all variables are of order one, i.e., I (1). The estimation of the long-run variable (ARDL) assumption necessitates cointegration methodology at the non-stationary level, which is needed by the cointegration approach. ARDL will benefit from the findings of stationarity since it will create an environment in which it can achieve accurate and dependable results (Sulaiman and Abdul-Rahim 2018).

Table 2 Unit root test is using augmented Dickey-Fuller (ADF) and Phillips Perron (PP)

Table 3 presents the optimal lag length selection. The serial independence of the error term must be balanced between lag lengths that are sufficiently long to alleviate residual serial correlation concerns while remaining modest enough to avoid being over parameterized, especially when time-series data analysis is limited (Paseran and Smith, 2001). The SIC identifies the optimum lag length to cover all these results impurities. The Schwarz information criterion (SIC) suggested lag one and moved forward to the next step. It estimates the long-run relationship among all variables by applying OLS.

Table 3 Optimal lag length selection based on SBC for cointegration test

The bound test is summarized in Table 4. The F-statistics value is 7.889273, greater than the tabulated value of 4.43 (Narayan, 2005), and the is significance at the 1% level. As per the F-statistics value, the null hypothesis H0 : λCO2 = λGDP = λENU = λFDI = λAGR = λIND = λUPG = 0 is rejected, and an alternative hypothesis H1 : λCO2 ≠ λGDP ≠ λENU ≠ λFDI ≠ λAGR ≠ λIND ≠ λUPG ≠ 0 is accepted in all variables.

Table 4 Bounds test results

Table 5 illustrates the long-run relationship between GDP as an economic indicator and CO2 emissions as an environmental indicator. The statistics suggest that GDP contributes to CO2 emissions at a 1% level of relevance: a 1% rise in economic growth results in a 0.0000996% increase in CO2 emissions. The GDP, energy consumption, and the coefficient of FDI all are indicated a positive contribution to environmental degradation. Energy consumption and FDI both have a positive significance at the 1% and 10% confidence levels, respectively. The agriculture value adds, industrialization, urban population growth, and CO2 emissions exhibit a negative and long-run solid association (Sulaiman and Abdul-Rahim 2018; Yasin et al. 2020). Environmental degradation may be reversed due to rising income levels, improved awareness of environmentally friendly products, and innovation to prevent environmental degradation in urban areas (Yasin et al. 2020). Natural resources have a damaging effect on the environment. It could be used to develop technology for natural resource extraction. The negative impact of natural resources on the environment’s quality must be minimized through the development of enhanced environmental quality (Fodha and Zaghdoud 2010; Ahmadi et al. 2015).

Table 5 Estimated long-run coefficients based on SBC

The short-run outcomes in Table 6 are derived from the short-run equation. Economic growth (GDP) is statistically significant in explaining CO2 emissions at a 10% level. Energy use is statistically significant at the 1% level, whereas agriculture is statistically significant at the 1% level. The error correction term (− 0.603662) satisfies the econometric assumption and verifies that the feedback system is operating properly, and it is negative and significant at the 1% level. The ECM (− 1) coefficients are − 0.603662, a relatively small value. This value indicated that the time required to restore variables to long-run equilibrium is around 60.3662% for Pakistan, implying that roughly 1.5 periods are necessary to return variables to a long-run equilibrium. FDI is positive, while industrialization and urban population growth are negative (Saboori et al., 2012; Naseem et al. 20201a).

Table 6 The estimated short-run coefficients based on SBC

The reliability test results are summarized in Table 7, including the Breusch-Godfrey serial correlation, heteroskedasticity, omitted variables, and normality tests. The null hypothesis is not rejected for all reliability tests, indicating that the model is free of Breusch-Godfrey serial correlation, heteroskedasticity, omitted variables, and irregularities within the critical limits of 1% and 5% levels of significance. The cumulative sum (CUSUM) and cumulative sum of squares (CUSUMSQ) model stability tests were also performed (Fig. 1) as per the suggestions of Pesaran and Pesaran (2010). In Fig. 1, the control limits are five standard deviations from the center line for CUSUM and 0.3 for CUSUM Square. The center line is located on zero for both tests, shown in black. The controlled lines are in red. The blue line presents the actual position of CUSUM and CUSUM square, which are in between the control lines. The significance of both tests has confirmed the stability of the model.

Table 7 The results of the ARDL tests
Fig. 1
figure 1

CUSUM and CUSUMSQ

In Table 8, the causal relationship among series is measured using VECM, selected because it is an econometrically appropriate technique (Engle and Granger 1987; Granger 1988; Mohsin et al. 2021b), especially when all variables are cointegrated at I (1). The results of the Granger causality test are presented in two parts, i.e., individualistic causal relationship in Table 8 and summarized results in Tables 8 and 9. Integration assumption is fulfilled, and indications are received to check the VECM Granger causal relationship among selected variables (Engle and Granger 1987; Granger 1988). Granger causality’s long-run results divulge that ECTt-1, in all variables, satisfies the assumption of negative sign and significance at the 1% level for CO2, ENU, FDI, AGR, IND, UPG, and 10% GDP. The value of lnCO2 (− 0.390763) and ECTt-1significance at the 1% level exhibits that if the system is exposed to shock, it will require convergence to the long-run equilibrium at a relatively prolonged speed. The results of direction causality are separated into two categories: short-run and long-run relationships, which are depicted in Table 9. The short-run causality test reveals that CO2 emissions result from economic expansion, (GDP =  > CO2 ≠ GDP), energy use (ENU =  > CO2 ≠ ENU), and FDI (FDI =  > CO2 ≠ FDI) at a 1% level. In contrast, CO2 emissions are not Granger’s cause of GDP, ENU, and FDI. Growth in economic activity, energy consumption, and FDI will lead to a rise in CO2 emissions, not the other way around (Hossain, 2011; Lee & Lee, 2009).

Table 8 The results of VECM Granger causality
Table 9 VEC Granger causality/block exogeneity Wald tests

Economic growth (GDP) is Granger’s cause of energy use (GDP =  > ENU) and urban population growth (GDP =  > UPG) at the 10% and 1% significance levels, respectively (Ozturk, 2010; Jian et al., 2019). Economic growth is the Granger cause of FDI, and FDI is the Granger cause of GDP (GDP ⇔ FDI) at 1% and 5%. Energy use is the Granger cause of agriculture (ENU =  > AGR ≠ ENU), FDI is the cause of energy use (FDI =  > ENU ≠ FDI) and agriculture (FDI =  > AGR ≠ FDI). A bidirectional Granger cause is observed between FDI and agriculture (FDI ⇔ AGR) and urban population growth and FDI (UPG ⇔ FDI) for the short-run at 1% and 10% levels.

Therefore, the key carbon-emitting sectors can be identified by this research and a framework can be designed to minimize pollutant particles emission in Pakistan. There is only way for sustainable environment in Pakistan and that is to check individual economic growth sector’s contributions .

Impulse response function analysis

In the impulse response function, the reaction of economic growth for a specific period under vector auto-regression to the behavior of exogenous variables under shock conditions is measured. The innovative effect and behaviors of independent variables toward CO2 emissions are also determined (Hatemi-J 2014). The impulse response function is graphically represented in Fig. 2, in which the responses of CO2 against one standard deviation increases in GDP, ENU, FDI, UPG, IND, and AGR are shown. In Fig. 2, the vertical line indicates the intensity of the response, and the horizontal displays the periodical impulses response. The upward and stable downward trend of FDI in the figure highlights the positive role of FDI in an unsustainable environment.

Fig. 2
figure 2

Impulse response of CO2 emissions

Industrialization’s impulse fluctuates from a negative to a positive response to CO2 emissions, suggesting that it directly responds to CO2 emissions or environmental degradation (Sarfraz et al., n.d.; Sariannidis et al. 2013; Jian et al. 2019). The underdeveloped sector of industrialization in Pakistan will contribute to sustainable economic growth, but low financing and focus on economic development can only increase environmental degradation. Pakistan should be careful about pollutant particles emissions during economic growth, which should be a matter of control and sustainable development. The agriculture sector is responding negatively concerning the degree of consequences of CO2 emissions. At the same time, GDP, urban population growth, and energy use seemed positive in the first two periods and then behaved negatively with a downward trend. The impulse results elucidate the long-term impact of agriculture, urban population growth, energy use, and economic growth (GDP) on environmental degradation (CO2 emissions) (Ohlan 2015).

Variance decomposition analysis

Variance decomposition analysis determines each variable’s contribution to the other variables and interprets the VAR model. Table 10 illustrates the contribution of GDP, energy consumption, FDI, agriculture, industrialization, and urban population increase to CO2 emissions. CO2 emissions are declining, while GDP, agriculture, and industrialization are increasing. Energy consumption, FDI, and urban population growth are declining. The decomposition analysis results recommend that CO2 emissions be reduced by increasing GDP, controlling agricultural and industrial emissions, and bringing about sustainable growth. The decreasing trend in ENU, FDI, and UPD also decreases carbon dioxide emissions.

Table 10 Variance decomposition of CO2 emissions

Discussion

Pakistan is an emerging country that suffers due to various environmental issues. Agriculture is the backbone of Pakistan’s economy, and it has played a crucial part in the country’s development (Mahmood and Munir 2018). CO2 emissions have an impact on crop production (Rehman et al. 2021). Currently, the economy is transforming from agriculture to industrialization but Pakistan has not developed the required industrial technology and financial strength to carry its economic growth and environmental sustainability simultaneously.

This research focused on Pakistan’s different economic sectors, i.e., energy use, FDI, agriculture, industrialization, and urban population growth. At the same time, GDP represents economic growth, and CO2 emissions taken to indicate environmental degradation. The study shows different sectors’ effects on economic development and environmental sustainability. First, we checked the stationarity and serial correlation of the data series and then selected the optimal lag length for the remaining process. The selection-based criterion declared a long-run relationship among all variables, while CO2 emissions, GDP, energy use, and agriculture have shown to have a short-run relationship with a significant ECT-1 term.

The reliability tests, which include the Breusch-Godfrey serial correlation, heteroskedasticity test, omitted variables, and normality test, were used to ensure the accuracy of the results. The cumulative sum (CUSUM) and cumulative sum of squares (CUSUMSQ) test support the model’s stability. The decoupling index more clearly displayed the relationship in different periods and as a whole. The integration of all variables at I(1) confirmed the appropriation for employing VECM. The Schwarz information criterion (SIC) suggested lag one and permitted the study to move forward to determine the long-run relationship among variables. The ECM (-1) coefficients are relatively moderate with 60.3662% and elucidated approximately 1.5 periods required for equilibrium from short- to long-term, which is slower than developed and eco-friendly countries.

This study takes the triangle research approach to confirm the relationship between economic growth, environmental sustainability, and different sectors of the economy. Secondly, the unidirectional relationship between CO2 emission and economic development for the short-run is confirmed (GDP =  > CO2 ≠ GDP). The GDP is the Granger cause of CO2 emission, whereas CO2 emission is not the Granger cause of GDP. Energy use (ENU =  > CO2 ≠ ENU; GDP =  > ENU) is the Granger cause of CO2 emission and GDP is the Granger cause of energy use. As such, energy use contributes to Pakistan’s economic development, but it also adds to CO2 emissions. FDI has a bidirectional link with GDP since GDP is the Granger cause of FDI, and FDI is the Granger cause of GDP and the Granger cause of CO2 emissions. Industrialization, urbanization, and agriculture also contribute to economic development and environmental degradation indirectly. Thirdly, the practical implication of this research is its ability to guide Pakistan toward environmental sustainability. This research points out the specific sectors that significantly contributed to economic growth contributed and their impact on the environment. The government of Pakistan, environmentalists, and policymakers should audit the major sectors and promote environmental-friendly technologies, precautions against environmental degradation, raise awareness among owners in the sectors about the need for environmental action, and frequently check the pre-defined policies for individual sectors.

Conclusion

This research aimed to measure the intensity of CO2 emissions and the sectoral contributors to them in Pakistan. This study focused on economic growth (GDP) and five main sectors, i.e., energy use, FDI, agriculture, industrialization, and urban population growth. Economic growth, energy use, and FDI demonstrated a significant positive trend toward CO2 emissions, while agriculture, industrialization, and urban population growth were negatively substantial. The negative significance of agriculture, industrialization, and urban population growth confirmed that these sectors had adopted less advanced technology. GDP and energy use are positively related to CO2 emissions in a short-term relationship, while agriculture is negatively significant. This represents an adverse situation for Pakistan, mainly because it is an agricultural country. The agriculture sector’s negative long- and short-run significance indicates its high contribution in CO2 emissions compared to its decomposition practices. The decoupling index results highlight the fact that economic growth diminishes CO2 emissions.

The Granger causality relationship for the long and short term confirmed the impact of variables on CO2 emissions, either positive or negative. Furthermore, the use of impulse response and variance decomposition made this research a more dynamic and visually quick response toward variables’ relationships. The Pakistan government should design green technology policies, restrict emissions in industrial areas, and encourage eco-friendly agricultural equipment. These policies’ successful implementation and the use of ecosystem management tools proven in environmentally sustainable countries could help reduce negative environmental impacts or reduce CO2 emissions in Pakistan.