1 Introduction

Contamination of the environment is a critical issue facing many countries in SSA. This region is recognized for its abundant natural resources, including forests, wildlife, minerals, and water, which are critical for the livelihoods and economies of the region. However, these natural resources are under increasing pressure due to a range of factors, including population growth (PG), urbanization (UR), and industrialization (IND). The major drivers of environmental degradation in SSA are land use change as people convert forests, wetlands, and other natural ecosystems into agricultural fields, pasturelands, and urban settlements. This includes air pollution from the combustion of fossil fuels, waste incineration, and manufacturing processes, as well as water pollution from untreated sewage, agricultural runoff, and mining activities. This leads to deforestation, soil erosion, and the slaughter of ecological diversity, which can have noteworthy negative ramifications for ecosystems and for the people who depend on them. Climate change is also having significant impacts on the environment in SSA, with rising temperatures, the incidence of heat waves, droughts, and natural disasters, which can have far-reaching negative effects on public health and well-being. The SSA countries are projected to sustain the upward trajectory of carbon dioxide emission (CO2) patterns, as indicated by previous studies (Franco et al., 2017; Hossain, 2011; Neagu, 2019).

According to Yaro and Hesselberg (2016), greenhouse gas (GHG) emissions encompass the gasses responsible for trapping heat within the Earth's atmosphere, thereby playing a crucial role in climate change. An illustration of their impact can be seen in the projected temperature rise of 3–6 °C in West Africa until the end of twenty-first century, which is in sharp contrast to a minor increase in precipitation levels observed in the twentieth century (Almazroui et al., 2020). GHG emissions are influenced by both immediate and long-term factors. Immediate factors are sudden events that can cause a noticeable but temporary fluctuation in annual emissions. Notable examples encompass the corona virus disease 2019 pandemic situation and the Russia-Ukraine battle. These events can affect CO2 because they impact economic and industrial activities, which, in turn, affect the amount of GHG emissions. On the other hand, long-term factors include the adoption of new technologies, changes in production and investment decisions, as well as economic and climate policies. In the long term, opting for renewable energy sources over fossil fuels can substantially reduce greenhouse gas emissions (Ackash & Graham, 2021).

Environmental degradation is mostly measured through CO2 as it is one of the biggest reasons for air pollution and degradation in the air quality. CO2, therefore, has far-reaching influences on all facets of life including health, income, and general well-being of the populations. One of the major impacts of CO2 on life expectancy (LE) in SSA is through air pollution, which can lead to respiratory diseases (including cancer) and other health problems. Particularly susceptible groups, like children and the elderly, may experience heightened harm due to this. Who are more susceptible to the negative impacts of air pollution. The WHO has recognized air pollution as a foremost public health risk in many African countries. According to the WHO, more than 90% of people in less developed countries such as those in Africa are exposed to air pollution levels that exceed WHO guidelines (Kumar et al., 2023).

Due to hasty industrialization and energy use, policymakers and researchers have expressed a significant concern about air pollution, especially CO2. This issue is widely acknowledged as a key factor contributing to global health problems (Balan, 2016; Adebayo et al., 2020). From an economic perspective, CO2 is considered an inherent by product of industrial activities. Although these industrial activities contribute to economic value and growth, they are also accompanied by pollution, including CO2. Consequently, CO2 are often perceived as an inevitable consequence of robust economic development. In contrast, the majority of studies traditionally concentrate on examining the balance between GDP and CO2.However, it is crucial to recognize that environmental pollution, including CO2, has significant implications for public health, particularly concerning LE. Furthermore, it is of utmost importance in the broader context of attaining ecological sustainability. This implies that the repercussion of ecological pollution extends beyond economic considerations and encompasses substantial consequences for both the well-being of societies and the long-term viability of the environment (Rjoub et al., 2021). A nation composes its individuals, and elevating LE is a vital and imperative prerequisite for securing sustainable economic progress, Therefore, the interplay among economic, social, and environmental factors and their impact on LE within a specific country has emerged as a critically significant concern for policymakers. There have been empirical studies that have explored the linkage between GDP, CO2, and LE (Agbanike et al., 2019; Wang & Li, 2021).

The impact of global warming on the province is disproportionately high, with many African countries experiencing significant environmental and socioeconomic impacts from climate change, such as droughts, floods, and food insecurity (Opoku et al., 2021). The WHO is working with authority and other collaborators to progress air quality and reduces the health impacts of pollution in Africa. To keep global warming below the 1.5 °C threshold, GHG emissions need to peak before 2025 and then decrease by 43% by 2030. (Khan et al., 2021). Climate change inflicted by CO2 can also lead to food insecurity, population displacement, and migration. These factors can lead to changes in population patterns, with some areas experiencing rapid population growth and others experiencing declines. The largest CO2 emitters are generally the more developed and industrialized countries, such as South Africa, Egypt, and Algeria (Aliyu et al., 2018). These countries have high levels of energy absorption and commercial operations, leading to significant CO2 emission and other GHGs. Many African countries are also working to reduce their emissions and transition toward cleaner, more sustainable varieties of energy, like solar and wind power. The African Union has set a target to generate at least 300 gigawatts of renewable energy up to 2030, which significantly reduce the continent's emissions, (Ackah & Graham, 2021). This study's primary goal is to examine the presence and causal interactions' direction among CO2, GDP, IND, LE, and PG in SSA. Additionally, we assess whether the EKC theory is applicable in the perspective of SSA. Our choice of these SSA countries for investigation is driven by the need to understand the levels of CO2 emissions (environmental quality) in conjunction with economic and social variables.

Although abundant literature has examined the connection between CO2 and GDP, IND, and population, research on how CO2, GDP growth, IND, LE, and PG are related in SSA nations is lacking. As far as we are aware, only a few studies have examined the CO2 nexus issue within the context of Africa. (Al-Mulali & Sab, 2012; Kivyiro & Arminen, 2014; Cetin & Ecevit, 2015;Asongu, 2018; Zaidi & Ferhi, 2019; Rakshit et al., 2023). These studies typically focused on a specific nation or a group of nations concerning aspects such as energy consumption, CO2, and GDP. These studies yield conflicting results, with variations noted depending on the country under assessment. The current study focuses on bridging gap by utilizing the panel techniques to examine the linkages among social and economic variables.

Currently, SSA nations are facing the dual challenge of environmental deprivation and maintaining the health of their populations. This study is utilized to develop effective policies and strategies to address the dual challenges in the region. First, we examined the relationship Among CO2 and various factors using macro panel data from 45 SSA countries (Table 12 of the appendix) from 1991 to 2020. Second, our study is unique in estimating the linkage Among CO2, GDP growth, industrialization, life expectancy, inflation, and population growth applying different latest panel techniques. Importantly, we identified convergence and divergence from the equilibrium path through unit root tests and long-term interaction by the co-integration test, DOLS, and FMOLS. Third, this study utilizes D–H panel causality tests to examine causation among potential indicators. Additionally, it performs impulse response (Fig. 1) and Granger causality tests using a time-varying parameters VECM model to reveal the dynamic interdependence among CO2 and all independent variables in SSA over the specified period. Lastly, we conducted panel generalized method of moments and pooled mean group to confirm that our results are robust in the wake of different econometric procedures. The present investigation is thereafter structured in the following manner: the second section covers a brief summary of earlier research publications on the topic. In Sect. 3, the study explains the statistical and economic techniques, along with the data sources. Section 4 addresses the outcome of the research, along with a discussion of the analysis that follows. Section 5 concludes with a few recommendations for policy drawn from the current investigation.

Fig. 1
figure 1

Source: Authors Calculations, Note time period (in years) is measured along the horizontal axis, and the scale of CO2 is measured on the vertical axis

Responses of shocks.

2 Literature survey

2.1 CO2 emission and GDP

The correlation among economic development and the quality of the ecosystem was examined by Grossman and Krueger (1991) in the framework of the North American Free Trade Agreement. The study revealed a recognizable trend using equivalent metrics of three air contaminants across large cities in forty-two different nations. According to the study, low per capita GDP was associated with higher quantities of emission and sulfur dioxide, which reached their peak. The desire to improve environmental conditions increased with income levels, underscoring the significance of striking a balance between ecological concerns and economic development for long-term success. Gao and Zhang (2014) demonstrated the existence of long-term co-integration among CO2, electricity utilization, and GDP in SSA nations. They found that the inverted U-shaped EKC hypothesis is applicable to these nations. In addition, the research identified a short-term one way causality Among GDP growth and CO2 and electricity consumption. Sadiq et al. (2023) performed a panel time series analysis, employing data covering the period from 1972 to 2019 across multiple South Asian countries, their results substantiated and affirmed the EKC theory. The study unveiled a nuanced relationship Among GDP and its square, indicating an association between GDP and energy consumption, encompassing both negative and positive correlations. Al-Mulali and Sab (2012) explored the interdependence between GDP, energy utilization, and CO2 in case of 30 SSA nations. Their investigation revealed the sustained impact of energy utilization and CO2 on GDP growth. Kivyiro and Arminen (2014) identified long​​​​​​​ term associations with CO2, GDP growth, foreign direct investment, and energy utilizations in six SSA countries. Regarding causality, they observed one way Granger causality relationships between the other variables and CO2, with distinct variables influencing CO2 across different countries.

There are notable studies evaluating the consequences of different factors on environmental degradation in other regions and countries.​​​​​​​Saidi and Hammami (2015) carry out a study on the correlation between GDP, CO2, and energy utilization across 58 nations with the help of panel data by utilizing GMM method during 1990–2012. The study also analyzed three regional panels and found that CO2 and GDP had a significant positive effect on energy consumption. Adedoyin et al. (2020) investigated the relationship among coal rent, GDP, and CO2 within the framework of BRICS economies. The instigators found that a rise in coal rents (unlike coal consumption) has a negative relationship with CO2, implying that it can help efforts toward achieving development and reducing emissions. The paper also revealed that if BRICS countries diversify their energy sources, it can help the global energy market and make things better for the environment. The study also proposes that diversifying energy sources in BRICS economies could mitigate challenges in the global energy market and that environmental sustainability can be realized by decoupling CO2 emissions from GDP in these economies. Azam and Khan (2017) examined the influence of factors such as GDP, health expenditure, poverty, and corruption on deterioration of the environment in Thailand, Malaysia, and Indonesia from 1994 to 2014. Their results demonstrated that GDP had a significant influence on environmental deterioration, as indicated by CO2. Meanwhile, health expenditure has a statistically significant negative effect, and the impact of corruption varies across countries. Baloch et al. (2019) found that natural resources have a statistically insignificant impact on CO2 in India, Brazil, and China, and but they help reduce pollution levels in Russia because of their abundance.

2.2 CO2 emission and life expectancy

Mahalik et al. (2022) examined the consequences of CO2 on LE in 68 less developing economies between 1990 and 2017. They analyzed two key dimensions: the source of CO2 and the economic development level. The findings indicated a consistent inverse relationship between CO2 and LE, affecting both consumption-based and production-based emissions, particularly in emerging countries. Intriguingly, CO2 seemed to positively influence LE in developing nations, suggesting an import of emissions. They emphasized that the positive impact of CO2 on LE was associated with consumption rather than production. It underscored the insufficiency of GDP alone in addressing environmental degradation and public health. The findings of the study indicated that advancing economies should prioritize increasing awareness about the adverse effects of atmosphere change and adopting technological solutions to minimize environmental damage.

Rahman and Alam (2022) investigated the impact of renewable energy, GDP, environmental pollution, good governance, and UR on LE in ANZUS and BENELUX countries during 1996 to 2019. They found several crucial insights. Initially, positive effects on LE were observed for renewable energy, GDP, good governance, and UR. Specifically, an increase in these factors was correlated with a rise in LE. Conversely, environmental pollution had exerted a detrimental impact on LE. In addition, a cause and effect relationship was identified between the selected variables and LE. Radmehr and Adebayo (2022) conducted an extensive assessment of the factors that influence LE in Mediterranean nations. They examined various variables, such as GDP, health expenditure, CO2, and sanitation, using data from 2000 to 2018. Their findings revealed several significant relationships. First, there was a positive and interconnected link between GDP and LE. Moreover, there was a noteworthy positive correlation between higher healthcare expenses and LE, indicating that higher healthcare spending was linked to higher LE. Conversely, in these Mediterranean countries, life expectancy declined as CO2 levels increased. Wang and Li (2021) conducted an examination in the context of 154 nations and observed that population density, population age, GDP per capita, and LE exhibit nonlinear effects on per capita CO2, whereas population, UR, and unemployment show linear effects. Cavusoglu and Gimba (2021) identified that over the long term, LE is negatively affected by inflation and CO2 emissions. Conversely, health spending, human capital, GDP per capita, and food production exhibited substantial positive impacts. Mohmmed et al. (2019) explored the factors influencing CO2 levels in the top 10 emitting nations and realized a significant effect of income and population on CO2, with China and the US exhibiting the most notable variations in this indicator. Moreover, a strong correlation developed among the Human Development Index, GDP, and healthy LE, along with sector-specific CO2 across most nations under examination. Mariani et al. (2010) found a positive nexus between LE and CO2, which holds steady in both the immediate and prolonged perspectives.

2.3 CO2 emission and population growth

Hussain and Rechman (2021) found that CO2 exerted a negative effect on renewable energy, while foreign investment and PG are positively linked to CO2. In addition, long-term analysis demonstrated that CO2 had a detrimental effect on the UR of renewable energy. Casey and Galor (2017) revealed a significant disparity between CO2 and population, as well as per capita income, with the population exerting an influence approximately seven times greater than per capita income. The regression analysis suggested that one percent decline in PG could be linked to an almost seven percent raise in per capita income whereas simultaneously reducing carbon emissions. Furthermore, a shift from the medium to the low variant of the UN fertility projection by the year 2100 can yield a significant 35% reduction in annual emissions and a noteworthy 15% increase in per capita income. Namahoro et al. (2021) conducted a study to scrutinize the impact of renewable energy consumption and PG on CO2 in seven East African countries from 1980 to 2016. The findings revealed that renewable energy consumption has had a negative effect on CO2, indicating a potential mitigation measure. Nevertheless, it was discovered that regional population growth exerted a positive impact on CO2 over the long term.

2.4 CO2 emission and urbanization

Tan et al. (2023) examined the nexus among UR and CO2 in China from 2003 to 2015. Their study used the "Threshold-STIRPAT" model to examine the effect of UR on CO2 under various urbanization thresholds, incorporating the intermediate effect model. Their findings revealed that the influence of UR on CO2 depended on the rate of UR. When the UR rate was less than 47 percent, each 1percent increase in the urbanization rate resulted in a 0.23 percent enhance in CO2.Nevertheless, when the UR rate exceeded 47.04 percent, each one percent escalade in the UR rate led to a higher increase of 0.78 percent in CO2. Cheng and Hu (2023) examined the influence of IND and UR on CO2 in China from 1997 to 2018. Their study revealed that both of these factors played a role in the rise of emissions. Urbanization, they found, contributed to an overall increase in CO2 by not only boosting industrial emissions but also by raising CO2 from construction and housing consumption. Furthermore, urban sprawl was identified as a factor that led to higher carbon emissions by increasing CO2 from transportation, construction, and industrial activities. Asongu (2018) explored outcome of GDP, urbanization, electricity spending, and natural resource rent on CO2 in Africa over a span of 34 years. The result of the study showed a positive association between CO2 and UR, electricity consumption, and non-renewable energy consumption. Adusah (2016) explored the nexus among the UR, PG, and CO2 in 45 SSA nations from 1990 to 2010. The​​​​​​​ study established that an increase in both UR and PG significantly increased CO2 in the short and long run. Furthermore, he noted a trend where CO2 exhibited a swifter increase in countries marked by substantial population density, like that Ethiopia and Nigeria, compared to those with lower populations, namely Cape Verde and Equatorial Guine. Cetin and Ecevit (2015) examined the relationship amid UR, energy utilization, and CO2 in 19 SSA nations from 1985 to 2010. The results highlighted a persistent correlation among these variables, demonstrating a two ways causal connection between energy utilization, UR, and CO2. Martinez and Maruotti (2011) delved into the influence of UR on CO2 in developing nations since 1975–2003. The results unveiled a U-shaped relationship between UR and CO2, indicating that the impact of UR on CO2 was positive until reaching a certain threshold, after which it turned negative. To be more precise, the study identified a positive elasticity between CO2 and UR for low levels of UR, aligning with the heightened environmental impact observed in less developed regions. Rakshit et al. (2023) exhibited the influence of poverty and UR on environmental deprivation in SSA nations starting from 1995 to 2018. They discovered that poverty and UR positively influenced environmental degradation in the region.

3 Model, data, and methodology

This paper conducted an in-depth analysis of CO2 emission and GDP in accordance with the EKC hypothesis. The study utilized comprehensive data encompassing 45 SSA countries, the names of which are listed in Table 12 of the Appendix. The dataset spanned an extensive period from 1991 to 2020. To examine the connection among CO2 emissions and GDP, this study utilized the theoretical framework of the EKC, (Grossman & Krueger, 1991). This conceptual framework was then applied to the following econometric model, as described below.

$${\text{CO}}_{2it} = \beta_{0} + \beta_{1} {\text{GDP}}_{it} + \beta_{2} {\text{GDPS}}_{it} + \beta_{3} X_{it} + \varepsilon_{it}$$
(1)

In our investigation, the nexus between CO2 emissions and GDP in line with the EKC hypothesis, CO2 represents carbon emissions; GDP signifies GDP per capita, and GDPS stands for the GDP2 and other influential factors are denoted by Xit.

The influence of ​​​​​​​other sources on CO2 in the covered 45 SSA nations from 1991 to 2020 is mentioned in Eq. 2.

$${\text{CO}}_{2} = f({\text{GDP}},{\text{ GDPS}},{\text{ IND}},{\text{ INF}},{\text{ LE}},{\text{ PG}},{\text{ UR)}}$$
(2)

The study focused on three primary variables of interest CO2 emissions; GDP per capita serves as evidence of economic growth; life expectancy, denoted as LE. Additionally, several control (explanatory) variables were considered, including industry (IND), inflation (INF), population growth (PG), and urbanization (UR). The Appendix's Table 13 presented the definitions, data source, and descriptions of the variables utilized in this paper.

Econometric methodologies employed in this study were inspired from previous literature (Charfeddine & Mrabet, 2017; Merlin & Chen, 2021). In the subsequent empirical investigation, we have to mitigate the influence of heteroscedasticity by transforming variables into their logarithmic form, as suggested by (Wang & Zhang, 2020). To conduct panel data analysis, the variables were transformed using natural logarithmic form as follows. Specifically, following functional form was considered for our econometric specification.

$$\begin{aligned} \ln {\text{CO}}_{2it} = & \beta_{0} + \beta_{1} \ln {\text{GDP}}_{it} + \beta_{2} \ln {\text{GDPS}}_{it} + \beta_{3} \ln {\text{IND}}_{it} \\ \quad & + \beta_{4} \ln {\text{INF}}_{it} + \beta_{5} {\text{LE}}_{it} + \beta_{6} {\text{PG}}_{it} + \beta_{7} {\text{UR}}_{it} + \varepsilon_{it} \\ \end{aligned}$$
(3)

In the transformed equation, the ln denoted the natural logarithm; Subscripts (i) and (t) are used to represent numbers from 1 to N, referred to the cross-sectional and time dimensions, respectively. The parameters \({\beta }_{0}\dots \dots {\beta }_{7}\) represented the slope coefficients, while \(\varepsilon\) denoted the error terms.

3.1 Cross-sectional dependence test (CSD)

To derive reliable and robust insights, the econometric process encompassed seven crucial steps. Initially, the current article utilized CSD. We implemented Breusch–Pagan (BP), Pesaran scaled (PS), Pesaran (PCD) test, as proposed by Pesaran in 2004 and 2007. In the null hypothesis (H0) of the CD tests, the assertion is made that ‘there is no cross-sectional dependence or correlations’. The mathematical representation of the CSD test can be articulated as follows:

$${\text{CSD}} = \sqrt {\frac{2T}{{N\left( {N - 1} \right)}}\left( {\mathop \sum \limits_{i = 1}^{N - 1} \mathop \sum \limits_{j = i + 1}^{N} S^{ \wedge } 2_{ij} } \right)}$$
(4)

The term s2ij represented the correlation coefficient of estimated residuals derived from a basic regression method, such as ordinary least squares (OLS).

3.2 Stationarity test

In the second stage of the econometric approach, the order of stationarity for the relevant variables had to be identified using Eqs. (5) and (6). We employed first-generation panel unit root tests, including the Levin-Lin & Chu (LLC), Im Pesaran & Shin (IPS) tests, as well as the Fisher augmented Dicky Fuller (ADF) and Fisher Philips Perron (PP) Fisher tests. These tests involved estimating an autoregressive model with a lagged dependent variable and the first difference of the series. The LLC test, propounded by Levine, Lin and Chu, is the most commonly utilized panel for unit root test, adapted from the ADF test for panel data settings. The model could be represented as follows:

$$\Delta z_{it} = \delta_{i} + \alpha z_{i,t - 1} + \mathop \sum \limits_{j = 1}^{pi} \alpha_{ij} \Delta z_{i.t - j} + u_{it}$$
(5)

Here 'i' corresponded to individual countries, (t) signified specific time periods, and 'Zi,t' represented the data series for specific country (i) during its respective time period (t). The determination of the lag order relied on the parameter 'pi,' while uit represented the error term. In our analysis, we set the null hypothesis as \(\alpha\) equals 0,' while the alternative hypothesis proposed that \(\alpha\) was less than zero. The LLC procedure operated under the presumption of a homogeneous panel, where the coefficient 'bi' was assumed to be the same across all nations.

The IPS test offered an improvement over the LLC test by accommodating heterogeneity in the coefficient β across all panel units. In the IPS test, (H0: \(\alpha_{i}\) = \(\alpha\) = 0), with the alternative hypothesis (H1) being (H1: \(\alpha_{i}\) = \(\alpha\) < 0).On the contrary to the IPS test, which was a parametric and asymptotic method, (Choi, 2001; Maddala & Wu, 1999), a nonparametric and precise test based on Fisher's test was introduced. This novel approach aggregated P-values from individual unit root tests and offered clear advantages over the IPS test. A key feature is its resilience to variations in lag lengths within individual ADF regressions. Following is the expression for the test statistic:

$$p_{i} = - 2\mathop \sum \limits_{{{\text{i}} = 1}}^{{\text{n}}} {\text{ln}}\alpha_{{\text{i}}}$$
(6)

The H0 stated that every series within the panel exhibited a unit root, meaning (H0: pi = 0) for overall (i) On the other hand, the H1 indicated that not all individual series had a unit root, specifically (H1: pi < 0_ for (i) in the range from 1 to N1, while for 'i' in the range N1 + 1 to N, 'pi' remained equal to 0.

3.3 Cointegration test

Once it was established that the data were stationary, the third step of the econometrics procedure involved co-integration analysis on the behalf of Eq. (3). This aimed to examine the long-term nexus that exists among the variables. To achieve this objective, the Johansen Fisher Panel co-integration test was employed, which is a panel extension of the time series co-integration test developed by Johansen and Juselius (1990) and is considered highly reliable and consistent compared to other tests. We have utilized two statistics, namely trace statistics and max eigen values, which indicated various co-integration relationships among the variables, as noted by Shahbaz et al., (2015). The Johansen co-integration test assumed a Null hypothesis:—‘no co-integration among the variables’ and Alternative hypothesis:—‘co-integration among the variables’.

3.4 Dumitrescu and Hurlin test

Fourth, we have utilized the DH test to account for heterogeneity between cross sections. This heterogeneity may have arisen because of various factors, such as differences in economic policies, cultural norms, or institutional frameworks across countries. To address this issue, DH (2012) proposed a panel causality model that allows for all coefficients to vary across cross sections. This approach recognizes that the model specification may have differed between individual units in the panel, and that the causal relationship between two variables may have also varied across units. While examining the causal relationship between A and B, the DH approach would have allowed us to investigate the causal effect of A on B and from B on A separately for each country, considering the unique features of each country's economy. By allowing for such heterogeneity, we could have obtained more accurate and reliable estimates of the causal relationship between A and B in the panel data.

3.5 Regression estimation

Next, we estimate the relationship specified by Eq. (3) was estimated using DOLS and FMOLS, when faced with endogeneity and serial correlation in regressors, FMOLS method was preferred. Panel DOLS was particularly useful when dealing with panel data because it accounted for both within-group and between-group variation, allowing for the estimation of parameters that were common to all cross-sectional units in the panel. It was a powerful tool for testing the validity of the strict exogeneity assumption in panel data models and could help in detecting and correcting for endogeneity problems. The coefficients obtained from this dynamic model have enabled the assessment of the enduring relationship between the dependent variable and the other explanatory variables considered in this study.

3.6 Panel VECM

The final step in the econometric procedure relies on the Panel VECM by utilized the Eq. (7). This allowed us to obtain the speed adjustment parameters and long-run equation using the Panel VECM approach. Co-integration between variables was crucial because it signified the presence of an error correction mechanism. This mechanism explains how changes in the dependent variable were influenced by the equilibrium level in the co-integration relationship, accompanied by changes in other influencing variables. Consequently, Eq. (3) could be expressed as the subsequent VECM model.

$$\begin{aligned} \Delta \ln {\text{CO}}_{2t} = & c_{1} + \mathop \sum \limits_{i = 1}^{P} c_{11,i} \Delta \ln {\text{CO}}_{2t - 1} + \mathop \sum \limits_{i = 1}^{P} c_{12,i} \Delta \ln {\text{GDP}}_{t - 1} + \mathop \sum \limits_{i = 1}^{P} c_{13,i} \Delta \ln {\text{GDPS}}_{t - 1} + \mathop \sum \limits_{i = 1}^{P} c_{14,i} \Delta \ln {\text{IND}}_{ t - 1} \\ \quad & + \mathop \sum \limits_{i = 1}^{P} c_{15,i} \Delta \ln {\text{INF}}_{t - 1} + \mathop \sum \limits_{i = 1}^{P} c_{16,i} \Delta {\text{LE}}_{t - 1} + \mathop \sum \limits_{i = 1}^{P} c_{17,i} \Delta {\text{PG}}_{t - 1} + \mathop \sum \limits_{i = 1}^{P} c_{18,i} \Delta {\text{UR}}_{t - 1} + \lambda E_{{{\text{c}}_{t - 1} }} + Ui_{t - 1} . \\ \end{aligned}$$
(7)

Here \(E_{{c_{t - 1} }}\) Represent the residuals adjustment term from the preceding period.

In the concluding step of the econometric procedure, the Pooled Mean Group and Panel Generalized Method of Moments methods were employed to evaluate the robustness of the other econometric estimations.

4 Results and discussion

The statistical characteristics for all variables under examination are presented in (Table 14 of the Appendix). In the sample, CO2 stands at a mean value of 0.80, with the highest value being 8.44 and the smallest value being 0.00096. Regarding GDP, the average value is $1944.20, ranging from the smallest at $190.23 to the highest at $16,992.03. Similarly, for inflation, the average and median values are 45.85 and 6.16, respectively, with a standard deviation of 810.62. The mean of LE is 56.46, and its standard deviation is 7.11.Population growth (PG) has an average value of 2.42, and urbanization has a mean value of 35.77, with standard deviations of 1.33 and 15.85, respectively. Table 1 displays the pairwise correlation matrix. The findings show a robust positive correlation among CO2, GDP, GDPS, and UR. The correlation coefficient between CO2 and LE is 0.41, indicating a moderate positive association between GDP and LE. However, there is a slight negative association between GDP, INF, and PG.

Table 1 Correlation matrix.

We employ CSD tests to investigate the presence of interdependencies among the cross-sectional data. In this scenario, the null hypothesis is rejected, indicating that there was no cross-sectional dependence. (p < 0.05), and the corresponding results are displayed in Table 2.

Table 2 CSD test.

The unit root test findings, as exhibited in Table 3, imply that all variables are non-stationary at their original levels but become stationary after applying a first-order difference.

Table 3 Unit root test.

ln CO2; log of CO2 emission, lnGDP; log of GDP, lnGDPS; log of GDP square, lnIND: log of Industry value added,lnINF; log of Inflation, GDP,LE; life expectancy, PG; population growth, UR; urban population.

The next step involves checking for a long-term relationship among dependent and independent variables. Table 4 presents the findings of the Fisher–Johansen co-integration test using both the trace statistic and the max-eigen statistic.

Table 4 Results of co-integration test.

We use the probability values associated with the test results to making a decision to either reject or not reject the null hypothesis. The H0 assumes no co-integrating equations (s = 0), while the H1 suggests the presence of one co-integrating equation (s = 1). According to these findings, there are four co-integration equations. Table 5 displays the findings of the DH Causality Tests, exploring different lag lengths (Z = 1, Z = 2, and Z = 3) in the association among the response and explanatory variables.

Table 5 DH panel causality tests.

Our findings indicate bidirectional causal links between CO2 and GDP, consistent with prior studies in the SSA context (Esso & Keho, 2016; Gao & Zhang, 2014; Zaidi & Ferhi, 2019). DH Panel Granger Causality results show that there is strong evidence that IND Granger causes CO2 at different lags. Similarly, there is strong evidence that CO2 homogeneously causes IND at the given lag values. As industrialization occurs in SSA, the region heavily relies on fossil fuels like coal and oil for electricity generation, resulting in significant CO2. Furthermore, we find a bidirectional relationship between CO2, GDP, GDPS, IND, LE, PG, and UR. Regarding UR and CO2, we find a bidirectional causal relationship suggesting that as urbanization progresses, it leads to an increase in CO2, potentially due to factors such as amplified energy consumption, transportation demands, and industrial activities associated with urban development. Simultaneously, higher levels of CO2 can contribute to accelerated urbanization processes by attracting economic activities, infrastructure development, and population migration to urban areas.

Our findings align with a study examined by (Wang et al., 2014). The study exposes a significant bidirectional relationship amid population growth and CO2. As population grows and the demand for energy rises, there is an increased reliance on fossil fuel-based power plants (Abdi, 2023). Furthermore, our research indicates a unidirectional relationship between CO2 and inflation (Table 5). The implementation of carbon taxes and stricter emission regulations raises the cost of using fossil fuels, a cost often passed on to consumers in the form of higher prices for goods and services. These elevated energy costs can exert inflationary pressures on the overall economy, consistent with findings from prior research (Adzawla et al., 2019; Oteng et al., 2022).

Our findings align with a previous study conducted by (Wang et al., 2014). A noteworthy outcome of our research is the identified bidirectional relationship between PG and CO2. The escalating demand for energy accompanying population growth has led to an increased reliance on fossil fuel-based power plants (Abdi, 2023). Furthermore, our study reveals a unidirectional relationship between CO2 and INF (Table 5). The implementation of carbon taxes and more stringent emission regulations increases the cost of utilizing fossil fuels, often resulting in higher prices of goods and services passed on to consumers. These heightened energy costs can exert inflationary pressures on the overall economy, aligning with findings from previous research (Adzawla et al., 2019; Oteng et al., 2022). Next, we scrutinize the relationship between explanatory variables and CO2 using FMOLS and DOLS estimation (Table 6).

Table 6 Results of coefficient.

The coefficients of GDP, IND, and INF in FMOLS are all positive and statistically significant. This implies that CO2 is positively associated with GDP, IND, and INF. The coefficient for PG is positive and statistically significant at five percent level, demonstrating that PG may have a positive effect on CO2 emissions. The coefficient for LE (0.03345) is statistically significant at one percent level, indicating that higher life expectancy is associated with higher CO2 emissions. The negative coefficient of GDPS shows that at higher levels of GDP (measured by GDP-squared), it has pessimistic effects on per capita CO2 supporting the hypothesis posited by the EKC in line with earlier research (Bah et al., 2020; Azam et al., 2022; Omri & Saidi, 2022; Rahman et al., 2023; Phiri et al., 2023 Zafeiriou et al., 2023. This is attributable to the fact that as education levels rise, individuals tend to exhibit greater sensitivity to environmental concerns. Moreover, wealthier economies can meticulously plan infrastructure and enforce eco-friendly laws with heightened stringency. The coefficient of UR is positive and significant at the one percent, indicating that higher urbanization rates are associated with higher CO2. Our results support the results of earlier studies (Al-Mulali et al., 2015; Wang et al., 2016; Hanif, 2018; Wang & Li, 2021). Urbanization drives increased demand for electricity, transportation, and heating/cooling systems in urban areas. This demand often relies heavily on fossil fuels, leading to higher CO2 emissions. Additionally, the construction and expansion of buildings to accommodate urban growth further contribute to increased energy consumption, particularly for heating and cooling purposes.

Overall, the results indicate a robust positive association between economic factors (GDP, industry, and inflation) and CO2. Similarly, social-demographic factors, such as life expectancy, urbanization, and population growth, also exhibit positive associations with CO2 emissions. These results are congruent with the findings of a prior study carried out by (Al-Mulali & Sab, 2012). DOLS results show that the coefficient of LE and PG is also positive but not significant. In the VECM model, the structural lag length criteria play an important responsibility in determining the appropriate lags in the model. Table 7 displays the panel VECM results for different lag lengths.

Table 7 Structural lag length criteria

An asterisk (*) designates the lag length that optimally fulfills each criterion. In this case, we select the majority of lag lengths 2, followed by SC and HQ, which is both 2, to run the Panel VECM. Table 8 presents the long-run and short-run connection between the variables obtained from panel VECM model.

Table 8 Long run coefficient

Equation 1 of the VECM model shows that the coefficient of inflation is − 0.54, suggesting a negative influence on the dependent variable. This implies that a one-unit change in INF is connected with a reduction of 0.54 units in CO2 emissions, while other variables constant. Additionally, the lagged error correction term (ΔPG) and ΔLE have negative coefficients, indicating an inadequate impact on CO2. The impacts of inflation and population growth are statistically significant at one percent.

Equation 2 of the VECM model indicates that the coefficients of (ΔINF), (ΔLE), and (PG) are negative and statistically significant. A one percent fluctuation in INF leads to a decrease of 1.34 percent in CO2. The lagged urbanization (ΔUR) has a positive coefficient of 0.03, which is statistically significant only at 10 percent. In Eq. 3, both coefficients of inflation (ΔINF) and population growth (ΔPG) are statistically significant. The coefficients have values of − 13.98 and − 28.63, respectively. Equation 4 reveals that the lagged error correction (ΔLE) has a coefficient of 2.81, which is also statistically significant. However, the coefficients for population growth and urbanization are positive but not statistically significant. However, the life expectancy coefficient is positively and significantly associated (p < 0.05).

Table 9 describes the coefficient of the error correction term according to co-integrated equations. The negative sign indicates the rate of adjustment that if the model experiences shock in time t, then it will revert back to the long run equilibrium.

Table 9 Coefficient in ECT.

The rate of adjustment for the lagged CO2 in period t + 1, as per the first equation, is 12.8 percent. It is statistically significant with a t-statistic of − 8.066. Similarly, we observe convergence patterns in the second, third, and fourth equations regarding the lagged variables of population growth and life expectancy. In cases where the adjustment speeds are positive (above zero), it indicates that the VECM deviates further from the long-run equilibrium after encountering a shock, rather than returning to it. Overall, the error correction model results shed light on the relationships and significance of lagged difference variables when explaining the dependent variable.

The study utilizes impulse response functions in addition to the co-integration test to cross-check the findings. Figure 1 indicates that as GDP increases, CO2 consistently rise over time. The response of CO2 to GDPS shows that initial shock of GDPS leads to a peak in CO2. Conversely, the second GDPS shock outcomes in a decline in CO2, reaching its lowest point. Following the third GDPS shock, there is recovery in CO2 emissions, marking an upward trajectory. During the third inflation shock, CO2 reach a peak level. In the fourth shock, CO2 gradually declines and reaches a minimum. After the fourth shock, it begins to increase steadily. In the early stages of UR, CO2 begins to increase alongside the UR process. After the second shock, it stabilizes. As LE increases, CO2 levels initially decline to a minimum point. Beyond this minimum point, there is a gradual rise at a minor rate, ultimately stabilizing with the continued increase in LE.

Several factors contribute to our main findings. Firstly, with the growth of GDP, household income sees a corresponding increase, boosting the demand for goods and services. This heightened demand, in turn, leads to an upswing in energy utilization and CO2. The rise in income may also result in an uptick in vehicle ownership and usage, contributing to increased CO2 from transportation. Furthermore, elevated CO2 are linked to heightened energy consumption, particularly from fossil fuels. As emissions rise, the associated increase in energy costs can pose challenges for businesses, potentially raising production expenses. Such elevated costs are often transferred to consumers through higher prices for goods and services, thereby contributing to inflation. Moreover, endeavors aimed at reducing CO2 emissions usually involve the implementation of policies and regulations, such as carbon pricing, emission standards, or taxes on carbon-intensive industries. While these measures are essential for environmental sustainability, they can concurrently escalate production costs for businesses, subsequently resulting in higher prices for consumers and potentially influencing inflation rates.

The impact of CO2 emissions and climate change extends to the availability of crucial natural resources like water, agricultural land, and raw materials. When these resources become scarce, production costs can escalate, resulting in increased prices for goods and services and potentially contributing to inflation. GDP, both on a global scale and specifically in SSA, coincide with processes of industrialization and urbanization. These processes are typically energy-intensive, leading to a rise in CO2 emissions. As countries develop their manufacturing sectors or undergo rapid urbanization, there is often a notable increase in emissions due to heightened energy consumption in factories, construction, and transportation. In low-income countries within SSA (refer to Table 12 of the Appendix), reliance on fossil fuels like coal and oil for energy needs is prevalent. As GDP grows, so does energy consumption, potentially resulting in higher emissions. The sustainability challenge arises when these countries do not diversify their energy sources or invest in cleaner technologies, which could otherwise weaken the link between GDP growth and emissions.

4.1 Robustness check

The current study uses the PMG and PGMM estimators to evaluate the robustness of DOLS and FMOLS long-run estimations. The outcomes of the PMG and PGMM analyses are presented in Table 10.

Table 10 Robustness check

The GDP coefficient exhibits a significantly positive influence on CO2, with values of 3.588 and 0.490 for PMG and PGMM, respectively. Similarly, positive and significant coefficients are evident for Industry, population growth, life expectancy, and urbanization.

"We employ the Wald test as a robustness check for DH Granger causality (refer to Table 11) to identify short-term causality between the variables. In this scenario, the null hypothesis posits that there is no short-term causality between the variables. Our findings indicate the existence of short-term causality between the dependent variable (CO2 emissions) and independent variables, aligning with our DH results."

Table 11 Results of Wald test

5 Conclusions and proposed polices

This study represents the initial investigation into the influence of GDP, industrialization, inflation, life expectancy, and population growth on CO2 across a selection of 45 SSA countries during the phase from 1991 to 2020. This study utilized various statistical tests, including FMOLS, DOLS, Panel VECM, and other relevant methods to ensure robust and significant findings. Evidence suggests a positive association among high levels of CO2 and GDP. A raise in GDP (squared term) leads to a reduction in CO2, thereby validating of EKC hypothesis in SSA countries. Enhancing life expectancy involves a series of approaches, such as investing in medical infrastructure and implementing public health initiatives. However, it is important to acknowledge that these essential aspects of progress may unavoidably contribute to CO2. Furthermore, it was discovered that IND, UR, and INF have a positive influence on CO2. The inflationary effect of higher energy costs can have broader implications for the economy. It can reduce consumers' purchasing power, as they need to allocate more of their income to cover basic necessities and energy expenses. This can have a cascading effect on the overall cost of living, potentially leading to higher wages and further increases in prices for various goods and services. Most of the exogenous factors are positively associated to the CO2 in the African countries. On the basis of our findings, we recommend that SSA countries give priority to the move from highly carbon-intensive economy to a technology-driven economy. This transformation should be intricately linked with alterations in the domestic economy's structure, ultimately leading to a reduction in GHG emissions. Governments ought to encourage industrial sector to adopt renewable energy sources, thereby lowering emissions. Government bodies and legislators can employ fiscal incentives to motivate producers in transitioning to renewable energy. The governments of SSA countries should permit controlled urbanization. This can be achieved by managing population growth, which, in turn, helps in controlling urbanization. Some individuals may choose to use birth control or follow a one- or two-child policy in their family planning. It is also essential to ensure that rural residents have adequate resources to discourage excessive migration to cities. Enhancing city transportation networks, especially within urban areas, can reduce the reliance on private cars, benefiting the environment. These innovative approaches have the potential to decrease the CO2 associated with UR in these countries. Creating environmentally friendly cities involves efforts to improve energy efficiency, decrease pollution per activity, and enhance transportation management. Promoting urbanization is not solely about increasing the urban population. As with all studies; our study also suffers from few limitations pertaining to availability of data in SSA countries. Due to data limitations in several SSA countries, we had to utilize data spanning 1991 to 2020, which restricted our analysis to a relatively shorter timeframe. Furthermore, the unavailability of data from a longer time span spanning back 50–60 years prevented us from capturing the potential nonlinearity in the interrelation among CO2 and GDP over a more extended period. Having access to data from earlier years would have provided a more comprehensive understanding of the long-term trends and dynamics. Furthermore, due to the accessibility limits of the data, we encountered constraints in utilizing certain econometric techniques that require balanced panel data. The absence of complete and consistent panel data restricted our ability to apply these techniques, which could have offered additional insights into the relationship between CO2 and GDP.