1 Introduction

Environmental pollution, which is caused by anthropogenic human activities, is galloping in recent times. This surge in pollution has adversely affected the progress of both developed and developing nations. As such, researchers, development agencies, policymakers, and the governments of various nations are looking for means of halting this menace (Dada et al. 2022a). For instance, the Paris Agreement (2015), Copenhagen Accord (2009), Rio Convention (1992) and the Kyoto Protocol (1997) are all directed toward the attainment of an ecosystem that is sustainable. However, despite the enactment of these treaties, ecological quality in the globe continues to deteriorate, owing in part to the surrogates of financial flows (FF) like remittances and foreign direct investment (FDI). According to Zafar et al. (2021), remittance inflows (RI) have varying effects on environmental quality (EQ). For instance, remittances increase the disposable income of individuals. As the personal incomes of individuals’ surge, the level of energy-oriented consumption also rises resulting in more environmental pollution. Also, remittances increase the volume of production in an economy. The rise in production significantly increases energy demand leading to pollution in the ecosystem. Moreover, remittances help to develop the financial sector of an economy. Well-developed financial sectors help to provide funds for businesses to expand their operations. As the operations of businesses expand, the utilization of unclean energies also rises leading to more pollution. Contrastingly, remittances help to provide funds to investors who engage in eco-friendly technologies (Yang et al. 2020). Also, remittances rely on institutional quality of an economy (Singh et al. 2011). Therefore, economies with efficient and stable institutions will get more remittances to improve their income levels. According to the composition effect of the EKC, the rise in income levels gradually raises the portion of cleaner activities in nations’ GDP (Nnyeneime, 2018), which could result in EQ. Besides, individuals whose personal income increases due to remittances can fund their education to the highest level (Arif et al. 2019; Askarov & Doucouliagos, 2020; Gyimah-Brempong & Asiedu, 2015). The rise in their educational attainments could create more environmental awareness, which could minimize polluting-activities in the environment.

Just like remittances, FDI can also influence EQ in diverse ways. For instance, there is a potential asymmetry between FDI and environmental standards that draws dirty establishments to emerging economies, escalating the rate of pollution due to the nature of their operations. This perspective represents the pollution haven hypothesis (PHH) (Abdouli & Hammami, 2017). A large number of related works like Huang et al. (2022), Ali et al. (2022a, 2022b, 2022c), Musah et al. (2022a) and Baskurt et al. (2022), have studied the aforestated hypothesis and affirmed FDI as detrimental to the environment. On the other hand, there is the notion that some FDI inflows are connected to viable environmental management practices that reduce the rate of pollution in host countries (Kim & Adilov, 2012; Xie et al. 2019). Also, some influxes of FDI promote clean energy utilization, energy efficiency, green innovations, and R&D activities that help to boost EQ (Lin et al. 2022; Khattak et al. 2022; Dada et al. 2022b; Haq et al. 2022). This perspective represents the pollution halo hypothesis (PHA) of Birdsall and Wheeler (1993). According to this hypothesis, multinational companies participating in FDI will introduce to host countries’ production patterns and technologies that are well advanced, resulting in pollutant reduction.

Financial flows help in attaining the UN’s SDGs in diverse ways. For instance, if FF help to boost households’ living conditions, SDG 1 will be accomplished. Also, if FF help to improve nutrition, eliminate hunger, promote sustainable agriculture, and guarantee food security, SDG 2 will be accomplished. Moreover, SDG 3 will be met if FF help to improve the health and well-being of individuals across all age groups. Furthermore, if FF help to expand opportunities for learning and also promote education that is inclusive and equitable, SDG 4 will be achieved. Besides, SDG 5 will be attained if FF empower women and stimulate gender equality in communities. Also, SDG 6 will be achieved if FF help economies to promote water and sanitation that are sustainable. Also, if FF stimulate accessibility to energy that is modern and sustainable, the objective of SDG 7 will be accomplished. Also, if FF promote sustainable economic progress as well as productive employment and decent working conditions for everyone, SDG 8 will be achieved. Moreover, SDG 9 will be attained if FF encourage innovation and promote robust infrastructure, inclusive and sustainable industrialization. Also, if FF help to reduce intra- and inter-country inequities, the mission of SDG 10 will be met. Further, SDG 11 will be accomplished, if FF help to make cities more welcoming, inclusive, secured, strong and long-lasting. Besides, if FF promote responsible consumption and production in our society, SDG 12 will be attained. Additionally, SDG 13 will be met if FF help to tackle climate change and its consequences. Also, if FF help to protect and utilize the resources of oceans, seas and marines for sustainable development, SDG 14 will be achieved. Furthermore, SDG 15 will be accomplished if FF protect ecosystems, manage forests sustainably, and prevent land degradation and biodiversity loss. Lastly, if FF contribute to long-term progress and the development of effective and inclusive institutions, SDG 16 will be attained.

With reference to the already stated empirical positions on the association between FF and EQ, one can describe the nexus amidst the series as ambiguous. This ambiguity implies the debate on the FF and EQ linkage is endless and calls for more studies. Hence, undertaken an exploration to investigate the relationship between the variables in the ECOWAS region was well in line. It has also been observed that prior explorations in their attempt to study the FF and EQ connection, overwhelmingly focused on the affiliation between RI and EQ separately, and the nexus between FDI and EQ also separately, without using both remittances and FDI as surrogates of FF to investigate the association between FF and EQ. In the examination of the above linkages two, conventional econometric techniques like the ARDL, GMM, OLS, FE, RE and the GLS among others were engaged by most of the studies. To help bridge the above gaps, this study used both remittances and FDI as proxies of FF to investigate the FF and EQ linkage in the ECOWAS region by employing the DCCEMG, AMG and the CCEMG econometric techniques that are very modern and account for cross-sectional dependence (CD) and heterogeneity among others. The soaring rate of the region’s pollution also served as the impetus for the researchers to undertake an investigation of this nature. According to Mir et al. (2020), ECOWAS countries are susceptible to distinctive meteorological and geological phenomena such as high seasonal weather and closeness to the Sahara Desert, which have significantly affected EQ in the region. Most ECOWAS cities are plagued by Sahara dust, especially during the dry season, while some are afflicted by smokes from Central African forests and agricultural fires. Also, gradual biodiversity loss through degradation of pastoral resources, trivialization of landscapes, deforestation and loss of tree resources also pose environmental threats in the region. Moreover, deterioration of water resources and aquatic ecosystems is a key environmental concern in ECOWAS countries. The degradation of watersheds, the drying up of spring sources, and the wild expansion of invasive aquatic species are all examples of pollution that states and regional organizations are always concerned about. These pollution sources, in combination with rapid population growth, industrialization, urbanization, and motorization, have recently swept through ECOWAS cities. As a result, anthropogenic effusions have increased significantly, causing pollution levels to rise in most areas. Nigerian cities like Onitsha and Kaduna, for example, are now among the world’s most polluted cities, with MP10 levels, respectively, 30 and 21 times higher than the WHO’s limit (Yakubu, 2017). The role of FF in these ecological menace in the bloc has received little attention. This necessitated the conduct of our study. The study also focused on nations in ECOWAS, because for decades, a greater percentage of them have been battling with ecological deficits. The countries also account for a substantial portion of global energy utilization, probably, through the channels of FF, making them significant contributors to global ecological problems. The nations, despite some green energy potentials, still depend heavily on dirty fuels to satisfy their energy demands, which has significantly harmed their ecosystems. Nonetheless, most of the nations are undertaking serious decisions on how to make their ecologies carbon neutral. Therefore, they could serve as an evidence for studying the nexus amidst FF and EQ in the bloc.

Contributively, this is the first study to use both remittances and FDI as surrogates of FF to investigate the association between FF and EQ in ECOWAS member countries after a thorough review of literature. Previous studies on determinants of EQ in ECOWAS like Wu et al. (2021), Yaya (2015) and Keho (2016) failed to follow this approach. Also, the study used ecological foot print (EFP) as the proxy of EQ against the mostly used CO2 emissions, because countries in the ECOWAS region are struggling to cope with challenges related to ecological deficits. CO2 exudates do not adequately capture environmental contamination (Al-Mulali, 2013; Sabir and Gorus, 2019; Zafar et al. 2019ab), because they reflect only a small percentage of the entire environmental pollution. It was therefore pertinent to use a more complete measure of EQ, hence the adoption of EFP, which comprises of fishing grounds, forest land, grazing land, carbon footprint, built-up land and crop land (Global Footprint Network). Moreover, the study employed the DCCEMG, CCEMG and the AMG estimators that are vigorous to CD and heterogeneity among others. These issues were accounted for because their negligence could yield erroneous estimates and inferences (Murshed, 2021; Xue et al. 2021). Prior explorations like Osadume and University (2021), Omotor (2016) and Zubair et al. (2020) conducted on some ECOWAS member countries engaged conventional econometric methods that failed to account for the above issues. Finally, the study controlled for economic growth and urbanization to help minimize omitted variable bias, which has been ignored by most prior explorations. According to Wilms et al. (2021), Clarke (2005), Barreto (2006) and Wooldridge (2009), omitted variable bias leads to biased and inconsistent coefficient estimates. Therefore, accounting for it was very appropriate.

The investigation was carried out via a well-defined econometric process. First, a test to examine CD or independence in the panel was conducted. This was followed by a test to confirm homogeneity or heterogeneity in the slope coefficients. Thirdly, tests to confirm the series’ order of integration were performed. Following that, cointegration tests were conducted to find out if the variables possessed a long-run relationship or not. Afterward, the parameters of the determinants were explored, while the causal linkages between the variables were determined at the last phase. This study is significant because it provides powerful recommendations that could serve as the base for the formulation and implementation of effective environmental policies in the nations. The study is also essential since it adds to people’s understanding of factors that influence EQ in the ECOWAS region. This research is unique in that, its results are well presented and discussed, the econometric strategies employed are very effective, and it makes good suggestions for further research. Following the introduction is the literature review. This is followed by the methodology in the third section. In the fourth section, the study’s results and their discussions are brought to light, while the fifth section displays the conclusions and policy recommendations of the report.

2 Literature review

2.1 Theoretical framework

As indicated by Combes et al. (2019), financial flows (FF) consist of foreign direct investment (FDI), portfolio management, remittances, foreign aid and other flows. However, in this study, FF was limited to only FDI and remittance inflows (RI). Foreign direct investment affects both productivity and the ecology. According to Li et al. (2019), one of the core objectives of FDI is profit maximization. Therefore, an investment under such a motive will worsen the ecosystem of host nations, while advancing productivity at the same time. The environmental effects of FDI are, however, the focus of most researchers and academicians of late (Pao et al. 2011). Foreign investments affect the ecology in two diverse ways. First, polluting entities via the channel of FDI are able to move their operations from economies with strict ecological regulations to economies with lax environmental regulations, thereby worsening environmental quality (EQ). This assertion supports the pollution haven hypothesis (PHH). Liu et al.’ and’s (2021a, 2021b) study on China, Musah et al.’s (2022a) study on G20 countries, Wang and Huang’s (2022) research on East Asian nations, Musah’s (2022a) analysis on Ghana; Chowdhury et al.’s (2021) study on 92 countries, Abdo et al.’s (2020) research on some selected Arab nations, and Ali et al. and’s (2022a, 2022b, 2022c) investigation on BRICS nations offer support to the haven hypothesis. On the other hand, some FDIs are associated with green technologies and modern management skills that help to boost EQ (Abdouli & Hammami, 2018; Al-Mulali & Tang, 2013; Omri, 2014). Also, some FDIs are important sources of capital, as such, they can stimulate productivity, which can enhance technological transfer to host nations, thereby improving ecological quality (Cole et al. 2008). This supports the pollution halo hypothesis (PHA). Abid et al.’s (2022) study on G8 economies, Qamri et al.’s (2022) research on 21 Asian countries, Khatam et al.’s (2022) exploration on OECD nations, Wang et al. (2022) investigation on 28 Chinese provinces, and Haq et al.’s (2022) research on Pakistan among others validated the halo hypothesis in their exploration. Just as FDI, remittances also affect the environment in two ways. On one hand, remittances boost the income levels of households, which propels them to purchase polluting items, resulting in more ecological degradation. Also, remittances could help boost the financial sector of economies. However, well-developed financial systems tend to offer low cost facilities to industries to expand their operations. As activities of the industries expand, more energies would be consumed leading to more ecological pollution. Yang et al.’s (2021) investigation on BRICS, Jafri et al.’s (2021) study on China, Azam et al.’s (2021) research on 30 developing countries, and Zhang et al.’s (2021) study on top remittance-receiving nations among others confirmed RI as damaging to EQ. On the other hand, RI could be used to finance green energy generation, energy efficiency, human expertise, green technological innovations, and research and development activities that are eco-friendly. Remittances could also be channeled into environmental awareness creation. This would encourage individuals to desist from activities that could harm EQ. The investigations of Li et al. (2021) for China, Usman and Jahanger (2021) for 93 economies, Usama et al. (2020) for Ethiopia, and Zafar et al. (2021) for 22 countries among others underscored remittances as friendly to EQ. It can be deduced from the above that studies on the association between FF and EQ have yielded inconclusive outcomes, which warrants further interrogations. Therefore, our study on the nexus amidst the series in the ECOWAS region was deemed appropriate, because it contributes to the unceasing debate on the connection between the variables.

2.2 Foreign direct investment and environmental quality nexus

According to the OECD (2022), FDI flows track the value of cross-border direct investments over a certain time period. FDI is vital to globalization because it allows for direct, stable, and long-term ties between economies (OECD, 2022). Unlike the huge nationalizations of the Soviet Bloc in the 1950’s and the Middle East in the 1970’s, FDI now has a widespread international support. Studies on FDI and environmental quality (EQ) are countless. The findings are however conflicting. For example, Chisti et al.’s (2021) study on ten economies revealed positive shocks in FDI as damaging to EQ. This deviates from Kurramovich et al. (2022) who confirmed FDI and EQ to be trivially connected in Japan. Employing modern econometric techniques, Musah et al. (2022a) confirmed FDI as harmful to EQ in the G20 economies. This exploration is indispensable, but care must be exercised in the use of the findings, due to its limitation to only G20 economies. If other nations had been factored in the sample, the discoveries might be diverse. Over the period 2000–2018, Wang et al. (2022) disclosed from 28 Chinese provinces that FDI improved EQ. This disclosure contrasts that of Okelele et al. (2022) for 23 SSA economies, but supports that of Dada et al. (2022b) for Malaysia. Udeagha and Ngepah (2021a, 2021b) researched on South Africa from 1960 to 2020 and found FDI as detrimental to the ecosystem of the country. This outcome collaborates that of Sayehmiri (2022) whose research on Iran confirmed FDI as damaging to the environment. On 125 countries, Azam and Raza (2022) affirmed FDI as harmful to EQ. This aligns that of Farooq (2022) for some selected Asian economies, but deviates from that of Ochoa-Moreno et al. (2021) for 20 Latin American economies. Djellouli et al. (2022) researched on 20 selected African nations and found FDI as detrimental to EQ in the long term. This finding disagrees with Balli et al.’s (2021) research on APEC countries that confirmed an inverse association between FDI and air quality. In MENA economies, Guayan et al. (2022) reported that FDI could improve EQ once it reached a certain threshold level. This finding conflicts that of Iqbal et al. (2022) for BRICS and Fonchamnyo et al. (2021) for 109 countries who affirmed FDI as harmful to ecological quality. Sattar et al. (2022) performed a study on China and confirmed that the nation’s outward direct investments harmed ecological quality in South Asian countries by 9.9%. The disclosure supports Gyamfi et al.’s (2021) study for oil and non-oil countries in Africa that confirmed FDI as damaging to EQ. Guan et al. (2022) studied China from 2008 to 2019. The study discovered a positive interaction between FDI and environmental regulations, with high-quality investment promoting haze reduction and environmental regulation enhancing this effect.

Haq et al. (2022) employed the DOLS estimator to model the connection between FDI and EQ in Pakistan. From the results, FDI improved the country’s EQ. This result disagrees with Zuedi et al. (2022) who investigated the BRI and China from 1979 to 2019 and reported that the BRI raised effusions among member nations. The result also disagrees with that of Lin et al. (2022) for Chinese provinces. Huang et al.’s (2022) study on G20 found FDI to be damaging to the ecosystem of the nations. Ali et al. (2022a, 2022b, 2022c) employed the AMG estimator to model the connection between FDI and EQ in BRICS economies. From the estimates, FDI harmed the ecosystem of the nations. However, no causality was found between FDI and EQ. Engaging the ARDL-PMG technique, Baskurt et al.’s (2022) study on 80 countries reported FDI to be harmful to EQ validating the hypothesis of pollution haven. This finding collaborates that of Hou et al. (2021) who reported that FDI played a positive role in the overall carbon effluents of China. The outcome also supports that of Shao et al. (2022) who disclosed a positive association between FDI and carbon trading in 30 provinces. Dornean et al. (2022) studied EU member countries and reported that better-rated corporate environments that are concerned about sustainability have a better chance of attracting larger amounts of FDI, especially in developed economies. In Nigeria, Dada et al. (2022a) employed the ARDL technique to study the connection between FDI and EQ from 1970 to 2017. From the discoveries, FDI was detrimental to EQ in the nation. This finding aligns that of Udemba (2021) who researched on UAE and confirmed FDI as gainful to ecological quality of the nation. The disclosure also supports Khattak et al. (2022) who explored the FDI and EQ connection in OECD economies and found FDI as favorable to EQ supporting the hypothesis of pollution halo. Over the period 1990–2019, Rahaman et al. (2022) researched on Bangladesh and affirmed FDI as damaging to EQ in the long-run, but friendly to EQ in the short-run. Also, a causation from FDI to environmental pollution was observed.

2.3 Remittances and environmental quality nexus

Remittances are cash or items sent from one person to another or from one family to another (IMF). They tend to lessen poverty by focusing on the unique requirements of the participants. According to the IMF, remittances have risen quickly in recent years, and now accounts for the majority of foreign revenue in many developing economies. From the outcomes of cross-country analysis undertaken by Adams and Page (2003, 2005) and Gupta et al. (2009), remittances have lowered the share of poor persons in the population. The World Bank’s survey on households also revealed that remittances helped Ghana reduce poverty by 5%, Bangladesh by 6%, and Uganda by 11%. Remittances can be used to purchase basic necessities, housing, education, and health care for children in underprivileged households. They may give funding for small enterprises and entrepreneurial activities in wealthier households, and they aid in the payment of imports and the serving of foreign debt. In some countries, banks have used future remittances as collateral to seek for foreign financing (IMF). The link between remittances and environmental quality (EQ) has been explored extensively. However, the discoveries are contradictory. For example, in the USA, Khan et al.’s (2021) research confirmed remittances as harmful to EQ. This deviates from the study of Zafar et al. (2021) who found remittances to be beneficial to EQ in 22 nations that are remittance-receiving. In China, Li et al. (2021) reported that negative changes in remittances were beneficial to the ecosystem of the country. This varies from the study of Rahman et al. (2019) on some selected Asian economies. The disclosure also varies from the study of Wawrzyniak and Doryn (2020) who adopted the GMM estimator to model the affiliation between remittances and EQ in 93 emerging economies and found a trivial association between remittances and EQ. Kibria (2021) adopted the NARDL technique to investigate the connection amidst RI and EQ and reported that EQ deteriorated when there were positive variations in the influxes of remittances. In the short-term, Brown et al.’s (2020) study on Jamaica confirmed that variations in remittances were linked to asymmetric response in CO2 effluents. Khan et al. (2020) employed the CCEMG and the FM-LS techniques to model the affiliation amidst RI remittances and EQ in BRICS economies. From the estimates, remittances deteriorated the ecosystem of the nations. This finding agrees with the study of Deng et al. (2021) who discovered that negative variations in remittances were damaging to EQ in BRICS economies.

As reported by Usama et al. (2020), majority of households that receive remittances in Ethiopia switch to the utilization of green energy. As a result, the link between remittances and ecological pollution was negative. This outcome deviates from Yang et al.’s (2021) exploration that affirmed remittances as harmful to EQ in BICS economies. Neog and Yadava’s (2020) research on India confirmed negative changes in remittances as beneficial to the environment, however, positive changes in remittances harmed the ecosystem of the nation. This in some part supports the study of Islam (2021) on eight economies. Employing the GMM technique, Yang et al. (2020) affirmed remittances as deteriorating to EQ. This agrees with Wang et al.’s (2021) investigation on five remittance-receiving economies, that affirmed remittances as harmless to ecological quality. Villanthenkodath and Mahalik (2020) performed a study on India and disclosed an inverted U-shaped connection between remittances and EQ. This in part supports the work of Zaman et al. (2021) who reported that remittances improved economic expansion, which led to more environmental degradation. Ahmad et al.’s (2019) study reported that the environment of China improved when there were negative changes in remittances. However, when there were positive changes in remittances, EQ reduced. Employing the NARDL technique, Jafri et al. (2021) also confirmed that negative effects in remittances deteriorated EQ in China. This collaborates the study of Qingquan et al. (2020) who reported that remittances were damaging to EQ. The study by Elbatanony et al. (2021) on developing economies reported a U-shaped connection between remittances and ecological pollution. According to the author, if remittances are channeled to clean energy and environmentally friendly technologies, remittances could improve EQ. Thapa and Acharya (2017) reported that because RI stimulated households’ living conditions, they are able to purchase goods that are energy consuming, thereby deteriorating the ecosystem. Usman and Jahanger (2021) investigated 93 economies and confirmed remittances as ecologically friendly in quantiles 95 and 80, but unfriendly in quantiles 5 and 70. This supports the study of Azam et al. (2021) who found that remittances degraded EQ in 30 developing economies. By utilizing the CUP-BC and the CUP-FM techniques, Zhang et al. (2021) confirmed remittances as ecologically unfriendly in top remittance-receiving economies. This is contrasting to Sharma et al.’s (2019) study on Nepal. Liu et al. (2022) investigated 15 Asian nations from 1990 to 2019. Based on the quantile and AMG estimates of the exploration, remittances and ecological pollution were negatively related. This implies that remittances promoted EQ in the nations. This finding contrasts the study of Jamil et al. (2021) whose research on selected G-20 economies affirmed remittances as damaging to EQ.

2.4 Literature gap

Summarily, studies that investigated the FF-EQ nexus only focused on the association between FDI and EQ or the connection between remittances and EQ, without using both remittances and FDI as indicators of FF to study the relationship that exists amidst the series. Also, conventional methods like the ARDL, GMM, OLS, FE, RE and the GLS among others, that are engulfed with many lapses, were mostly adopted in the investigation. To help bridge the above gaps, this exploration proxied FF by both remittances and FDI to study the association between FF and EQ in the ECOWAS region. In achieving the above goal, modern econometric techniques like DCCEMG, AMG and the CCEMG that offer robust outcomes in heterogeneous and cross-sectionally reliant panels were adopted.

3 Materials and methods

3.1 Data source

Panel data on 13 ECOWAS nations for the period 1990–2017 were utilized for the study. The sample and the time frame used for the study were dictated by data availability. Some of the countries were exempted from the sample, because they could not produce enough data for the analysis. A country like Liberia had missing data on remittances from 1990 to 2003. Also, data on FDI and GDP for the country were missing from 1990 to 1999. These data constraints made it impossible for the researcher to use all the nations for the analysis. In all, 13 countries were used, because they had available data from 1990 to 2017. Given this, the analyzed data were balanced strongly. Table 1 displays the studied countries and further information on the variables.

Table 1 Data description and measurement units

3.2 Model specification and theoretical underpinning

Inspired by the surging rate of pollution and conflicting empirical results, this exploration investigated the FF and EQ connection in ECOWAS member countries. To attain this ambition, an econometric model consisting of six distinct series was developed for estimation. In the framework, EQ was proxied by ecological footprint (EFP), while FF was surrogated by remittance inflows (RI) and foreign direct investment (FDI). The study controlled for economic growth (GDP), urbanization (URB) and environmental innovations (EI) so that issues with model specification bias could be lessened. With reference to the above, the following model was formulated to estimate the parameters of the determinants.

$${\text{EFP}}_{{{\text{it}}}} = \alpha_{0} + \beta_{1} RI_{{{\text{it}}}} + \beta_{2} {\text{FDI}}_{{{\text{it}}}} + \beta_{3} {\text{GDP}}_{{{\text{it}}}} + \beta_{4} {\text{URB}}_{{{\text{it}}}} + \beta_{5} {\text{EI}}_{{{\text{it}}}} + \mu_{{{\text{it}}}}$$
(1)

In the above equation, EFP is the explained variable representing EQ; RI and FDI are the main regressors representing FF; and GDP, URB and EI are the control variables. Also, the constant term is epitomized by \(\alpha_{0} ,\) while the stochastic error term with standard properties is denoted by \(\mu_{it}\). Finally, the time frame is represented by t, while the studied countries are symbolized by i. Following Musah et al. (2022a, 2022b), Udeagha and Ngepah (2021a, 2021b) and Musah et al. (2021a, 2021b, 2021c, 2021d), natural logarithm was taken on all the variables in Eq. 1 resulting in the ensuing model;

$$\ln {\text{EFP}}_{{{\text{it}}}} = \alpha_{0} + \beta_{1} \ln RI_{{{\text{it}}}} + \beta_{2} \ln {\text{FDI}}_{{{\text{it}}}} + \beta_{3} \ln {\text{GDP}}_{{{\text{it}}}} + \beta_{4} \ln {\text{URB}}_{{{\text{it}}}} + \beta_{5} lnEI_{{{\text{it}}}} + \mu_{{{\text{it}}}}$$
(2)

where \(\ln {\text{EFP}},\) \(\ln RI,\) \(\ln {\text{FDI}},\) \(\ln {\text{GDP}},\) \(\ln {\text{URB}}\) and \(\ln EI\) denote the variables in their logarithmic forms. Other definitions given to items in Eq. 1 still hold for Eq. 2. In the above equation, a positive and a significant coefficient imply EQ will be worsened, while a negative and a significant parameter impy EQ will be improved. Specifically, the \(\beta_{1}\) was to be positive \(\left( {\beta_{1} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln RI_{{{\text{it}}}} }} > 0} \right),\) if remittances were used to finance carbon-intensive items in the countries (Azam et al. 2021; Jamil et al. 2021). In contrast, \(\beta_{1}\) was to be negative \(\left( {\beta_{1} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln RI_{{{\text{it}}}} }} < 0} \right),\) if remittances were used to promote innovative technologies, energy efficiency and green energy utilization (Wang et al. 2021; Zafar et al. 2021). Also, \(\beta_{2}\) was to be positive \(\left( {\beta_{2} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln {\text{FDI}}_{{{\text{it}}}} }} > 0} \right),\) if FDI inflows promoted ecological pollution in the nations. This validates the hypothesis of pollution haven (Baskurt et al. 2022; Dada et al. 2022a, 2022b). Otherwise, \(\beta_{2}\) was to be negative \(\left( {\beta_{2} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln {\text{FDI}}_{{{\text{it}}}} }} < 0} \right),\) if FDI promoted knowledge and expertise, green technology, clean energy generation, and research and development activities that helped to boost EQ in the countries (Dhrifi et al. 2020; Nguyen, 2021). Furthermore, if economic development activities relied on energies from dirty sources, then GDP was to have a damaging influence on EQ \(\left( {\beta_{3} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln {\text{GDP}}_{{{\text{it}}}} }} > 0} \right)\) aligning those of Usman et al. 2022; Chen et al. 2022). Otherwise, \(\beta_{3}\) was to be negative \(\left( {\beta_{3} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln {\text{GDP}}_{{{\text{it}}}} }} < 0} \right),\) if the nations’ economic activities depended on energies that were harmless to ecological quality (Dogan & Aslan, 2017; Salahuddin et al. 2016). Additionally, \(\beta_{4}\) was to be positive \(\left( {\beta_{4} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln {\text{URB}}_{{{\text{it}}}} }} > 0} \right),\) if people moving to cities stimulated the consumption of dirty energies leading to more environmental pollution (Adebayo et al. 2022; Kurramovich et al. 2022). Otherwise, \(\beta_{4}\) was to be negative \(\left( {\beta_{4} = \frac{{\partial \ln {\text{EFP}}_{{{\text{it}}}} }}{{\partial \ln {\text{URB}}_{{{\text{it}}}} }} < 0} \right),\) if the migration of people to cities promoted clean energy utilization, energy efficiency and the adoption of environmentally harmless technologies that helped to boost EQ (Pang et al. 2021; Salim et al. 2017). Finally, environmental innovations (EI) are thought to facilitate the shift to ecologically conscious lifestyles that could improve EQ (Aldieri & Vinci, 2020; Federico, 2021). EI are also viewed as key elements that stimulate green growth (Albino et al. 2014; Shao and Zhong, 2021). However, the findings on the nexus amidst EI and EQ are inconsistent and mostly contradictory. For instance, Braungardt et al. (2016) claim that while there may be a rebound effect, EI effectively resolve the trade-off amidst economic expansion and ecological conservation. On one hand, EI can significantly abate pollution by boosting energy efficiency. Also, the potential of renewable energy could be enhanced with EI. Thus, the rise in green energies could serve as a substitute for conventional energies, thereby promoting ecological quality. Moreover, EI combined with environmental protection initiatives, help to mitigate pollution and enhance EQ. Contrastingly, EI could stimulate economic activities, which could lead to the consumption of dirty energies and, subsequently, more pollution (Abdouli and Hammami, 2021; Khan and Su et al. 2021; Fisher-Vanden & Wing, 2008). Erdogan et al.’s (2020) exploration on G20 economies reported that innovations in the building sector were damaging to ecological quality. According to Du et al. (2019), EI was not material in predicting emissions in low-income countries, but did so in high-income economies. Further, Khattak et al.’s (2020) research confirmed innovations as detrimental to EQ in Russia, China, India and South Africa, but the reverse in Brazil. From the above, the association between EI and ecological quality is unclear. Therefore, we expected the sign of its elasticity coefficient to be either positive \(\left( {\beta_{5} = \frac{{\partial lnEFP_{it} }}{{\partial lnEI_{it} }} > 0} \right)\) or negative \(\left( {\beta_{5} = \frac{{\partial lnEFP_{it} }}{{\partial lnEI_{it} }} < 0} \right)\).

3.3 Econometric strategy

Cross-sectional dependence (CD) can occur in panel data, whereby all units within a cross section are correlated. This is frequently attributed to the influence of unobserved common elements that affect the units in various ways. According to Xue et al. (2021) and Murshed (2021), the ignorance of CD may result in biased estimates and conclusions. Hence, the CD test of Pesaran (2015) was first conducted to confirm if the panel was embedded with dependencies or otherwise. Also, the slope coefficients could vary, because the analyzed nations differ in macroeconomic aggregates like RI, FDI, GDP, URB and EFP among others. It was therefore necessary to examine the slope parameters for heterogeneity or, otherwise, as failing to do so might result in wrong estimates and inferences. Therefore, the Pesaran and Yamagata’s (2008) test was performed to confirm heterogeneity or homogeneity in the parameters. Thirdly, the Pesaran’s (2007) CADF and CIPS tests that account for CD and heterogeneity were initially engaged to examine the integration features of the variables. Because the above tests do not account for structural breaks, the stationarity test of Bai and Carrion-i-Silvestre (2009), which controls for the above issue, was also conducted. Next, the Westerlund and Edgerton (2008) and Banerjee and Carrion-i-Silvestre (2017) tests were engaged to confirm cointegration or otherwise amidst the series. At the fifth step, the coefficients of the predictors were first estimated via the DCCEMG technique of Chudik and Pesaran (2015). The ensuing DCCE specification was formulated for estimation;

$$\begin{aligned} {\text{lnEFP}}_{{{\text{it}}}} = & \kappa_{{\text{i}}} + \phi_{{\text{i}}} {\text{lnEFP}}_{{{\text{i}},{\text{t}} - 1}} + \delta_{1} lnRI_{{{\text{i}},t}} + \delta_{2} lnFDI_{{{\text{i}},{\text{t}}}} + \delta_{3} lnGDP_{{{\text{i}},{\text{t}}}} + \delta_{4} lnURB_{{{\text{i}},{\text{t}}}} + \delta_{5} lnEI_{{{\text{i}},{\text{t}}}} \\ & + \mathop \sum \limits_{j = 0}^{{p_{T} }} \psi_{1j} \overline{{\ln {\text{EFP}}_{{{\text{i}},{\text{t}} - 1}} }} + \mathop \sum \limits_{x = 0}^{{p_{T} }} \psi_{2j} \overline{{\ln RI_{{{\text{i}},{\text{t}}}} }} + \mathop \sum \limits_{x = 0}^{{p_{T} }} \psi_{3j} \overline{{\ln {\text{FDI}}_{{{\text{i}},{\text{t}}}} }} + \mathop \sum \limits_{x = 0}^{{p_{T} }} \psi_{4j} \overline{{\ln {\text{GDP}}_{{{\text{i}},{\text{t}}}} }} \\ & + \mathop \sum \limits_{x = 0}^{{p_{T} }} \psi_{5j} \overline{{\ln {\text{URB}}_{{{\text{i}},{\text{t}}}} }} + \mathop \sum \limits_{x = 0}^{{p_{T} }} \psi_{{6{\text{j}}}} \overline{{\ln EI_{{{\text{i}},{\text{t}}}} }} + \mu_{{{\text{it}}}} \\ \end{aligned}$$
(3)

In the above equation, \(\overline{{\ln {\text{EFP}}_{{{\text{i}},{\text{t}} - 1}} }}\), \(\overline{{\ln RI_{{{\text{i}},{\text{t}}}} }}\), \(\overline{{\ln {\text{FDI}}_{{{\text{i}},{\text{t}}}} }}\), \(\overline{{\ln {\text{GDP}}_{{{\text{i}},{\text{t}}}} ,}}\) \(\overline{{\ln {\text{URB}}_{{{\text{i}},{\text{t}}}} }}\) and \(\overline{{\ln {\text{EI}}_{{{\text{i}},{\text{t}}}} }}\) are the means of the cross sections of the lagged response variable and the predictors, respectively, while \(\psi_{1, \ldots , } \psi_{6}\) symbolize the effects of the cross-sectional means on the regressand. Finally, \(p_{T}\) denotes the mean lags of the cross sections. To test the reliability of the DCCEMG techniques, estimates from the AMG and the CCEMG techniques were also computed. In line with Pesaran and Smith (1995) and Pesaran (2006), the CCE model of the study was specified as

$$\begin{aligned} \ln{\text{EFP}}_{{{\text{i}},{\text{t}}}} = & \beta_{1} \ln RI_{{{\text{i}},{\text{t}}}} + \beta_{2} \ln {\text{FDI}}_{{{\text{i}},{\text{t}}}} + \beta_{3} \ln {\text{GDP}}_{{{\text{i}},{\text{t}}}} + \beta_{4} \ln {\text{URB}}_{{{\text{i}},{\text{t}}}} \\ & + \beta_{5} \ln EI_{{{\text{i}},{\text{t}}}} + \delta_{{\text{i}}} \overline{x}_{{\text{t}}} + \eta_{{\text{i}}} \overline{y}_{{\text{t}}} + \mu_{{{\text{it}}}} \\ \end{aligned}$$
(4)

where \(\overline{x}_{t}\) and \(\overline{y}_{t}\) are the means of the cross sections of the predictors and the regressand, respectively, specified as

$$\overline{x}_{{\text{t}}} = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} x_{{{\text{i}},{\text{t}}}} , \overline{y}_{{\text{t}}} = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} y_{{{\text{i}},{\text{t}}}}$$
(5)

In adopting the AMG estimator of Bond and Eberhardt (2013), Eq. 2 is first expressed as

$$\Delta {\text{lnEFP}}_{{{\text{it}}}} = \Delta_{{\text{i}}} + \beta_{1} \Delta lnRI_{{{\text{it}}}} + \beta_{2} \Delta {\text{lnFDI}}_{{{\text{it}}}} + \beta_{3} \Delta {\text{lnGDP}}_{{{\text{it}}}} + \beta_{4} \Delta {\text{lnURB}}_{{{\text{it}}}} + \beta_{5} \Delta lnEI_{{{\text{it}}}} + u_{{{\text{it}}}}$$
(6)

In the above equation, the T-1 period dummies in first difference are denoted by \(\Delta D_{{\text{t}}}\), while the coefficients of period dummies are epitomized by \(p_{{{\text{t}}.{ }}}\) Next, a common dynamic process is established by transforming the computed \(p_{{\text{t}}}\) estimates to a \(\varphi_{{\text{t}}}\) variable as

$$\Delta {\text{lnEFP}}_{{{\text{it}}}} = \Delta_{{\text{i}}} + \beta_{1} \Delta lnRI_{{{\text{it}}}} + \beta_{2} \Delta {\text{lnFDI}}_{{{\text{it}}}} + \beta_{3} \Delta {\text{lnGDP}}_{{{\text{it}}}} + \beta_{4} \Delta {\text{lnURB}}_{{{\text{it}}}} + \beta_{5} \Delta lnEI_{{{\text{it}}}} + d_{{\text{i}}} \left( {\varphi_{{\text{t}}} } \right) + u_{{{\text{it}}}}$$
(7)
$$\Delta {\text{lnEFP}}_{{{\text{it}}}} - \varphi_{t} = \Delta_{{\text{i}}} + \beta_{1} \Delta lnRI_{{{\text{it}}}} + \beta_{2} \Delta {\text{lnFDI}}_{{{\text{it}}}} + \beta_{3} \Delta {\text{lnGDP}}_{{{\text{it}}}} + \beta_{4} \Delta {\text{lnURB}}_{{{\text{it}}}} + \beta_{5} \Delta lnEI_{{{\text{it}}}} + u_{{{\text{it}}}}$$
(8)

The coefficients of each of the regressors are therefore obtained correspondingly as

$$\beta_{{1,{\text{AMG}}}} = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \beta_{{1{\text{i}}}} ,\beta_{{2,{\text{AMG}}}} = \frac{1}{N}\mathop \sum \limits_{i = 1}^{N} \beta_{2i} ,\beta_{{3,{\text{AMG}}}} = \frac{I}{N}\mathop \sum \limits_{i = 1}^{N} \beta_{{3{\text{i}}}} ,\beta_{{4,{\text{AMG}}}} = \frac{I}{N}\mathop \sum \limits_{i = 1}^{N} \beta_{4i} ,\beta_{{5,{\text{AMG}}}} = \frac{I}{N}\mathop \sum \limits_{i = 1}^{N} \beta_{{5{\text{i}}}}$$
(9)

As indicated in the studies of Li et al. (2022a, 2022b) and of Qin et al. (2021), regression fails to report on causalities between variables. Hence, at the final phase, the causality test of Dumitrescu and Hurlin (2012) was adopted to unearth the causations amidst the variables. Officially, the DH test for causality is expressed as

$$Y_{{{\text{it}}}} = \gamma_{{\text{i}}} + \mathop \sum \limits_{m = 1}^{M} \alpha_{{\text{i}}}^{\left( m \right)} Y_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{i}^{\left( m \right)} X_{{{\text{it}} - {\text{m}}}} + \varepsilon_{{{\text{it}}}}$$
(10)

In Eq. 10, the lag orders are epitomized by M, while the constant term is denoted by \(\gamma_{i.}\) Also, the regression coefficient is symbolized by \(\delta_{i}^{\left( m \right)}\), while \(\alpha_{i}^{\left( m \right)}\) is the autoregressive parameter. With reference to Eq. 10, the ensuing specifications were formulated for the causations amidst the series.

$$\begin{aligned} \ln {\text{EFP}}_{{{\text{it}}}} = & \gamma_{1} + \mathop \sum \limits_{m = 1}^{M} \alpha_{1}^{\left( m \right)} \ln {\text{EFP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{1}^{\left( m \right)} \ln RI_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{2}^{{\left( {\text{m}} \right)}} \ln {\text{FDI}}_{{{\text{it}} - {\text{m}}}} \\ & + \mathop \sum \limits_{m = 1}^{M} \delta_{3}^{\left( m \right)} \ln {\text{GDP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{4}^{\left( m \right)} \ln {\text{URB}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{5}^{{\left( {\text{m}} \right)}} \ln EI_{{{\text{it}} - {\text{m}}}} + \varepsilon_{{{\text{it}}}} \\ \end{aligned}$$
(11)
$$\begin{aligned} \ln RI_{{{\text{it}}}} = & \gamma_{2} + \mathop \sum \limits_{m = 1}^{M} \alpha_{2}^{\left( m \right)} \ln RI_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{6}^{\left( m \right)} \ln {\text{FDI}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{7}^{\left( m \right)} \ln {\text{GDP}}_{{{\text{it}} - {\text{m}}}} \\ & + \mathop \sum \limits_{m = 1}^{M} \delta_{8}^{\left( m \right)} \ln {\text{URB}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{9}^{\left( m \right)} \ln {\text{EI}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{10}^{\left( m \right)} \ln {\text{EFP}}_{{{\text{it}} - {\text{m}}}} + \varepsilon_{{{\text{it}}}} \\ \end{aligned}$$
(12)
$$\begin{aligned} \ln {\text{FDI}}_{{{\text{it}}}} = & \gamma_{3} + \mathop \sum \limits_{m = 1}^{M} \alpha_{3}^{\left( m \right)} \ln {\text{FDI}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{11}^{{\left( {\text{m}} \right)}} \ln {\text{GDP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{12}^{{\left( {\text{m}} \right)}} \ln {\text{URB}}_{{{\text{it}} - {\text{m}}}} \\ & + \mathop \sum \limits_{m = 1}^{M} \delta_{13}^{\left( m \right)} \ln EI_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{14}^{{\left( {\text{m}} \right)}} \ln {\text{EFP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{15}^{\left( m \right)} \ln RI_{{{\text{it}} - {\text{m}}}} + \varepsilon_{{{\text{it}}}} \\ \end{aligned}$$
(13)
$$\begin{aligned} \ln {\text{GDP}}_{{{\text{it}}}} = & \gamma_{4} + \mathop \sum \limits_{m = 1}^{M} \alpha_{4}^{\left( m \right)} \ln {\text{GDP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{16}^{{\left( {\text{m}} \right)}} \ln {\text{URB}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{17}^{\left( m \right)} \ln EI_{{{\text{it}} - {\text{m}}}} \\ & + \mathop \sum \limits_{m = 1}^{M} \delta_{18}^{\left( m \right)} \ln {\text{EFP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{19}^{\left( m \right)} \ln RI_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{20}^{\left( m \right)} \ln {\text{FDI}}_{{{\text{it}} - {\text{m}}}} + \varepsilon_{{{\text{it}}}} \\ \end{aligned}$$
(14)
$$\begin{aligned} \ln {\text{URB}}_{{{\text{it}}}} = & \gamma_{5} + \mathop \sum \limits_{m = 1}^{M} \alpha_{5}^{\left( m \right)} \ln {\text{URB}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{21}^{\left( m \right)} \ln EI_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{22}^{\left( m \right)} \ln {\text{EFP}}_{{{\text{it}} - {\text{m}}}} \\ & + \mathop \sum \limits_{m = 1}^{M} \delta_{23}^{\left( m \right)} \ln RI_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{24}^{\left( m \right)} \ln {\text{FDI}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{25}^{\left( m \right)} \ln {\text{GDP}}_{{{\text{it}} - {\text{m}}}} + \varepsilon_{{{\text{it}}}} \\ \end{aligned}$$
(15)
$$\begin{aligned} \ln EI_{{{\text{it}}}} = & \gamma_{6} + \mathop \sum \limits_{m = 1}^{M} \alpha_{6}^{{\left( {\text{m}} \right)}} \ln EI_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{26}^{{\left( {\text{m}} \right)}} \ln {\text{EFP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{27}^{{\left( {\text{m}} \right)}} \ln RI_{{{\text{it}} - {\text{m}}}} \\ & + \mathop \sum \limits_{m = 1}^{M} \delta_{28}^{\left( m \right)} \ln {\text{FDI}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{29}^{{\left( {\text{m}} \right)}} \ln {\text{GDP}}_{{{\text{it}} - {\text{m}}}} + \mathop \sum \limits_{m = 1}^{M} \delta_{30}^{{\left( {\text{m}} \right)}} \ln {\text{URB}}_{{{\text{it}} - {\text{m}}}} + \varepsilon_{{{\text{it}}}} \\ \end{aligned}$$
(16)

In the above models, the regression parameters are indicated by \(\delta_{1} , \ldots , \delta_{30}\), while the constant terms are symbolized by \(\gamma_{1} , \ldots , \gamma_{6}\). The autoregressive parameters are finally epitomized by \(\alpha_{1} , \ldots , \alpha_{6}\). This test consists of the W-statistic and the Z statistic expressed as

$$W_{{{\text{N}},{\text{T}}}}^{{{\text{HNC}}}} = N^{ - 1} \mathop \sum \limits_{i = 1}^{N} W_{{{\text{i}},{\text{t}}}}$$
(17)
$$Z_{{{\text{N}},{\text{T}}}}^{{{\text{HNC}}}} = \frac{{\frac{1}{\sqrt N }\left[ {\mathop \sum \nolimits_{i = 1}^{N} W_{{{\text{i}},{\text{t}}}} - \mathop \sum \nolimits_{i = 1}^{N} E\left( {W_{{{\text{i}},{\text{t}}}} } \right)} \right]}}{{\sqrt {\frac{1}{N}\mathop \sum \nolimits_{i = 1}^{N} {\text{Var}}\left( {W_{{{\text{i}},{\text{t}}}} } \right)} }}$$
(18)

where \({\text{Var}}\left( {W_{{{\text{i}},{\text{t}}}} } \right)\) and \(E\left( {W_{{{\text{i}},{\text{t}}}} } \right)\) are, respectively, the variance and expectation of the Wald statistic \(\left( {W_{{{\text{i}},{\text{t}}}} } \right)\). The following are the hypotheses that govern the above test:

$$H_{0} = \beta_{{\text{i}}} = 0\quad \forall_{{\text{i}}} = 1, \ldots ,N_{1}$$
$$H_{1} = \beta_{{\text{i}}} = 0\quad \forall_{{\text{i}}} = 1, \ldots ,N\quad 0 \le N_{1} /N < 1$$
(19)
$$H_{1} = \beta_{{\text{i}}} \ne 0\quad \forall_{{\text{i}}} = 1, \ldots ,N + 1,N + 2, \ldots ,N$$

Here, the null hypothesis is validated if X fails to cause Y. However, the hypothesis cannot be validated if X causes Y.

4 Results and discussion

4.1 Descriptive statistics on study variables

Descriptive statistics of the series are displayed in Table 2. From the table, GDP had the highest average value of the dataset, while FDI had the least average value of the dataset. However, outliers (which are numbers that fall far from the median) can considerably alter the mean. When this happens, the median becomes a better indicator of the center of a dataset. Therefore, the median values of the variables were also computed. Based on the results, the largest median value was linked to GDP, while FDI had the least median value. With respect to the standard deviations, the data points of FDI were above the mean, however, those of EFP, RI, GDP, URB and EI were below the mean. In terms of skewness, the distributions of GDP and EI were positively skewed, while those of RI, URB, FDI, EFP were negatively skewed. These findings are not surprising, because when the mean and the median are unequal, the normal curve could be skewed in either a positive or a negative direction. On the Kurtosis of the variables, all the series had heavily peaked distributions as per the assertions of Hair et al. (2017a, 2017b). Following Kong et al. (2022), Musah et al. (2019a, 2019b), Kong et al. (2019), and Musah and Yusheng (2019a, 2019b), the VIF and tolerance tests were conducted to examine whether the explanatory series were highly collinear or not. From the results shown in Table 3, there was no multi-collinearity amidst the covariates. This finding was validated by the test outcome of the Farrar and Glauber (1976) test also displayed in Table 3. Further, all the predictors were substantially loaded based on the PCA output shown in Table 4. This implies the determinants had the attribute of predicting ecological quality in the ECOWAS region. Finally, all the regressors had a significant and a positive association with the regressand, implying a rise in RI, FDI, GDP and URB was related to a rise in EFP and the opposite.

Table 2 Descriptive statistics and correlational analysis
Table 3 Multi-collinearity tests results
Table 4 Principal components analysis

4.2 Cross-sectional dependence and heterogeneity analysis

Due to unobserved common factors, there could be cross-sectional dependence (CD) amidst penal units (Murshed, 2021; Xue et al. 2021). As reported by Ma et al. (2021), the ignorance of CD may result in wrong estimates and extrapolations. Hence, the tests for CD displayed in Table 5 were done to confirm dependencies or otherwise in the studied panel. The tests’ disclosures confirmed correlations in the panel backing that of Sun et al. (2021), Musah et al. (2022a) and Chen et al. (2022). This suggests that any major shock on a panel unit may have a spillover effect on the other panel units. Also, because the sampled nations vary in terms of macroeconomic indicators like RI, FDI, GDP, URB, EI and EFP among others, there was the possibility that the slope parameters could also vary. These variations if ignored could result in biased estimates and conclusions. Hence, the test illustrated in Table 5 was undertaken to confirm heterogeneity or otherwise in the slope parameters. Discoveries of the study affirmed the parameters to be heterogeneous. This collaborates the studies of Li et al. (2020b), Musah et al. (2021a, 2021b, 2021c), Li et al. (2021) and Shen et al. (2021). The above tests served as the basis for the choice of econometric techniques for the subsequent analysis.

Table 5 Cross-sectional dependence and heterogeneity tests results

4.3 Unit root and cointegration analysis

The integration order of series is very pertinent, because whether a variable is stationary or not matters most. Therefore, at the third phase, the tests indicated in Table 6 were conducted to study the series’ integration attributes. From the disclosures, the series had an I(1) integration order supporting that of Saleem et al. (2022), Musah (2022a), Samour and Pata (2022), Musah et al. (2021d) and Li et al. (2020a). This means, the statistical properties of the series did not change with time. The variables being stationary implies that they might be linked in the long term. Hence, following Liu et al. (2021a, 2021b), the tests reported in Table 7 are conducted to study the variables’ attributes of cointegration. The findings affirm that the variables possessed a long-run cointegration association. This suggests that in the long-run, RI, FDI, GDP, URB and EFP were substantially related. In other words, the series were integrated in such a way that they could not deviate from equilibrium over time. This disclosure aligns the research works of Ali et al. (2022a, 2022b, 2022c), Baskaya et al. (2022), Musah et al. (2020a, 2020b, 2020c), Phale et al. (2021), Amin et al. (2022), Musah (2022b) and Tan et al. (2019). The variables being cointegrated implies that the elasticities of the determinants could be computed.

Table 6 Unit root tests results
Table 7 Cointegration tests results

4.4 Regression and causality analysis

At the fifth stage, the long-run effects of the predictors on EQ were first explored via the DCCEMG technique. Based on the findings reported in Table 8, the lagged criterion variable was significant and negative. This suggests that the dynamic common correlated effects (DCCE) led to an absolute convergence or a single equilibrium. Specifically, the coefficient of − 0.773 implies any disequilibrium converged to the equilibrium association at the rate of 77.3%. This proves that EFP in ECOWAS member countries followed a DCCE process. The above outcome aligns the studies of Sarkodie et al. (2020) and Ahmad et al. (2020). Moreover, a percentage surge in remittances promoted EFP by 4.121%. This discovery suggests that remittances stimulated individuals to acquire more polluting home equipment and automobiles that minimized ecological quality in the nations. The finding also implies that the remittances affected ecological quality in the region by raising the demand for commodities which used energies that deteriorate the environment. Besides, remittances were not invested in activities that could promote EQ in the nations. It can therefore be concluded that remittances were not friendly to EQ in the countries. Therefore, remittances should be used to back economic development activities that are friendly to the environment. Also, remittances should be channeled into clean energy resources, eco-innovation, energy efficiency, and research and development initiatives to help advance the ecology of the region. The explorations of Yang et al. (2021) and Azam et al. (2021) align the aforestated outcome, however, that of Wang et al. (2021) and Zafar et al. (2021) vary from the outcome of this investigation. Likewise, a 1% rise in FDI deteriorated the ecosystem of the region by 3.964%. This means, FDI stimulated activities connected to the use of energies that emanate from dirty sources, thereby increasing the rate of pollution in the nations. The finding also suggests that the ECOWAS member countries had weak environmental regulations, which attracted polluting industries to invest there. This validates the pollution haven hypothesis (PHH). According to this hypothesis, establishments in pollution-intensive industries shift to nations with relatively weak environmental standards, leading to excessive or sub-optimal levels of pollution (Huang et al. 2022). It can therefore be concluded that FDI was harmful to the ecosystem of the region. Therefore, authorities should ensure that only foreign investments that are harmless to the ecology are permitted into the region. Thus, FDIs that are related to green energy generation, energy efficiency, expertise, and green technological innovations among others should be welcomed by the nations. Also, authorities should formulate strong environmental regulations to deter the entry of polluting industries into the bloc. The positive connection between FDI and EFP aligns the explorations of Dada et al. (2022a, 2022b) for Malaysia and Baskurt et al. (2022) for countries of different income groups. However, Shinwari et al.’s (2022) analysis on Belt and Road countries and Nguyen’s (2021) study on developed and developing economies that validated the pollution halo hypothesis (PHA) are conflicting to the discovery of the study. According to the PHA, multinational corporations transfer greener technologies to host countries through FDI. This helps to boost EQ in the nations (Huang et al. 2022).

Table 8 DCCEMG, CCEMG and AMG Estimation Results

Similarly, a percentage surge in GDP promoted EFP by 2.772%. This is not amazing in that ECOWAS member states are experiencing economic expansion in recent times. The rising growth implies that the nations will need more energy to meet the demands of their growing economies, which has many environmental implications. In other words, the nations’ economic progress was reliant on energies that caused more environmental damage. Also, the waste generated as a result of economic growth pollutes the environment, causing the countries’ EQ to deteriorate. It can therefore be concluded that GDP worsened EQ in the region. Therefore, nations in the bloc should not only concentrate on growing their economies, but must also take into consideration the quality of their environments. In doing so, they should ensure that all economic development activities undertaken in the region are pollution free. The positive connection between GDP and EFP backs the studies of Okere et al. (2022) and Miao et al. (2022). However, those of Dogan and Aslan (2017) and Danish et al. (2019) vary from the outcome of the study. Urbanization also had a substantially positive impact on EFP. All variables held constant, a 1% surge in URB spurred EFP by 3.498%. This finding suggests that urban dwellers in the ECOWAS region did not invest in items that could help improve EQ. Most urban dwellers have access to high earning jobs. As such, they get more income to purchase carbon-intensive home appliances and automobiles that increase the rate of pollution on the environment. Urbanization also leads to increased energy consuming activities like industrialization; construction of roads, markets, bridges and schools among others, resulting in more pollution. Moreover, most urban dwellers do not have adequate knowledge on environmental protection. As such, they indulge in activities that degrade the environment. This implies that educating individuals about how to protect the environment will go a long way to improve EQ in the region. Also, formulating policies to curb the rising rate of URB in the bloc will be essential because it will minimize ecologically damaging activities associated with URB. The positive affiliation between URB and EFP aligns the explorations of Adebayo et al. (2022) and Azam et al. (2022). However, those of Akorede and Afroz (2020) and Pang et al. (2021) vary from the study’s outcome. Moreover, EI contributed to pollution abatement in the region, as a 1% upsurge in the variable deteriorated EFP by 2.564%. This finding means EI helped the nations to incorporate ecologically harmless technologies into their industrial and other economic initiatives, which helped to curb carbon intensity in the region. Thus, innovative technologies helped to curtail the damages caused by economic development, and after a certain level of development had been attained, the adverse connection between economic advancement and ecological pollution was attained. This point supports the assertion of Obobisa et al. (2022) that CO2 mitigation helps to transition the economic and industrial structures of African countries from polluting to sustainable ones. However, there are substantial gaps in technological advancements, as majority of African nations are distant from the frontiers of technology (Obobisa et al. 2022). To Ko et al. (2020), the necessary degree of innovation has not been reached due to the lack of R&D investment and the incapacity of many African investors to transfer their technologies. This signposts that any future developments in green technology will have a big impact on the ecosystem of nations in the region and Africa as a whole. The adverse effect of EI on EFP discovered by this study supports the works of Qamruzzaman (2022) for lower-income economies, Gao et al. (2022) for China, and Yang et al. (2022) for G7 economies, but contrasts that of Khan et al. (2022) for 176 nations in the globe. Besides, the significant F-value implies that the regression model provided a better fit to the dataset. Also, the predictors explained 82% of the variations in the response variable based on the R2 value, while the RMSE value of 0.04 signifies that the dataset was very concentrated around the line of best fit. Finally, the insignificant CD test value of -2.14 demonstrates that the issue of residual CD has been minimized due to the adoption of the DCCE technique.

For validity purposes, estimates from the CCEMG and the AMG techniques were also computed. From the results, remittances and FDI promoted EFP in the countries. Also, GDP and URB were not friendly to EQ in the nations. Even though the coefficients were not the same with respect to weight, they were the same in terms of sign or direction. This signifies the robustness of the results. Because regression does not comment on the causalities between variables (Qin et al. 2021), the DH test for causality was adopted to examine causations between the variables. As depicted in Table 9, a feedback causality between RI and EFP was unraveled. This implies that the variables were bilaterally associated. The research works of Yang et al. (2021) and Wang et al. (2021) contrast this outcome, but that of Khan et al. (2020) align the aforestated revelation. Also, a causation from FDI to EFP was detected. This means FDI caused EFP to rise but EFP could not cause FDI to rise. Studies of Dada et al. (2022a, 2022b) and Rahaman et al. (2022) support our finding, but those of Wajdi and Hfaiedh (2021) and Wu et al. (2021) contradict the outcome of our exploration. Moreover, a bilateral causation amidst EFP and GDP was found. This implies that the two variables were causal agents of each other. The research works of Elfaki et al. (2022) and Chen et al. (2022) align with this disclosure, however those of Shah et al. (2022) and Usman et al. (2022) contrast the study’s outcome. Also, a bidirectional causality between URB and EFP was unfolded. This indicates that the two variables were dependent on each other. This discovery supports the investigations of Addai et al. (2022) and Azam et al. (2022) differs with that of Musa et al. (2021) and Kurramovich et al. (2022). Finally, EI and EFP were not causally related. This signifies that the series were not dependent on each other. Studies by JinRu and Qamruzzaman (2022) for G7 nations and Hongqiao et al. (2022) for the USA contrast the above discovery.

Table 9 Pairwise Dumitrescu Hurlin panel causality tests results

5 Conclusions and policy recommendations

Although the increasing rate of financial flows has aided economic expansion, their influence on environmental quality has become a global concern. Using a panel data of 13 economies over the period 1990–2017, this exploration investigated the nexus between financial flows and environmental quality in the ECOWAS region. In attaining this goal, robust techniques that are efficient to CD, structural breaks and heterogeneity among others were employed. From the findings, there were heterogeneity and CD in the studied panel. Also, the variables had an I(1) integration order and shared a long-term cointegration association. Moreover, the DCCEMG, AMG and the CCEMG techniques confirmed that remittances deteriorated the ecology of the region. Also, economic growth, foreign direct investment and urbanization deteriorated the region’s ecosystem. However, environmental innovations boosted ecological quality in the bloc. With regards to causalities, feedback causations amidst remittances and environmental degradation, between ecological pollution and urbanization, and between economic progress and environmental deterioration were revealed. Also, a causation emanating from foreign direct investment to environmental pollution was observed. Lastly, ecological innovations and ecological pollution had no causal relationship. Based on the results, the study concludes that financial flows alongside economic progress and urban population failed to improve the ecosystem of ECOWAS member nations, but environmental innovations boosted ecological quality in the region.

Since remittances added to ecological pollution in the countries, it is recommended that remittances received by the nations should be invested in green innovations, energy efficiency and clean energy sources to help minimize pollution in the region. Also, authorities should implement legislation to regulate the actions of polluting establishments that rely on remittances to fund their operations. Further, individuals and households should desist from using remittances to purchase pollution-intensive commodities like autos that could degrade the region’s ecological quality. Additionally, appropriate channels should be formulated to track migrant remittances that are friendly to the environment. This will boost the functioning of the financial systems in the countries. According to Bhattacharya et al. (2018), the rise in skilled migration will make remittances a major source of development, because there will be improvement in the financial sector of economies. In line with this, authorities should promote skilled migration rather than unskilled migration, because the nations could get more remittances to invest in environmentally harmless activities. Moreover, structural inefficiencies that provide tax benefits to remittance-receiving individuals who do not invest in environmentally enhancing technologies should be eliminated.

Also, foreign direct investment promoted ecological pollution in the countries. Therefore, the region’s environmental policies should be modified to control the influx of polluting FDIs into the countries. Thus, critical regulations should be developed to avoid the ECOWAS region from becoming a pollution hotspot. Also, both foreign and domestic businesses that pollute the environment should be regulated. Specifically, the firms should be compelled to embrace green energy and energy-efficient technologies in their operations. Finally, environmentally responsible corporates should be motivated through tax reductions, while polluting corporations should face higher tax burdens. This tactic has the potential to persuade polluting businesses to become environmentally friendly. Similarly, growth in the economy degraded the countries’ environment. Therefore, businesses and industries that are the drivers of economic growth should embrace green innovations, energy efficiency and green energy in their operations. In order for establishments to embrace ecologically friendly technologies, the governments should provide them with tax rebates to enable them to import advanced technologies from other parts of the world. Also, investments in developing technologies that will guarantee that the ecosystem is not negatively impacted along the growth pathway should be backed by authorities in the countries. Since sustainable development takes into account the protection of the environment and natural resources, countries in the region should invest in research and development that promote it. Furthermore, because Ghana is still an emerging economy, institutional frameworks for enhancing environmental sustainability and economic progress must be strengthened.

Additionally, urbanization enhanced environmental pollution in the nations. Therefore, providing adequate basic facilities and infrastructure will not only promote economic and environmental sustainability, but will also address the surging rate of urbanization in the nations. Also, clean energy consumption should be prioritized in the country’s urbanization policies, while the utilization of dirty energies should be minimized. This implies that the urbanization and ecological policies of the nations should be complementary. Following Addai et al. (2022), energy efficiency improvements through innovative technologies and green living behaviors are urgently needed in the urban development planning regulations of the nations. Finally, environmental innovations improved ecological quality in the region. This suggests that technological advancements in the region helped to manage environmental costs by lowering pollution and ecological deterioration. Since environmental technologies are vital for boosting the utilization of clean energies, and mitigating pollution, authorities should work to raise the percentage of environmentally related technologies, by promoting R&D activities that are essential for stimulating green ecology. Also, governments in the ECOWAS region need to induce financial institutions to offer loans and credits at reasonable rates to investors to help implement green technology projects. To encourage green investments like research and innovation of clean energies, financial and energy policies must be well integrated in the region. Further, the fall in pollution levels across the region could be facilitated by significant investment in green technological advances, as well as careful economic activity management. In this regard, authorities in the ECOWAS region must boost spending on environmentally friendly technologies. It is also essential to provide incentives like price subsidies to promote green energy technologies at the residential and industrial sectors. Besides, entities should consider how their actions affect the ecology by embracing energies from clean sources, and advancing the development of technological innovations that support green environment. This study was however subjected to some limitations. Firstly, the researcher intended to use all the ECOWAS member countries for the analysis, however, due to data constraints, and the study was confined to only 13 nations. Therefore, in future, when such data become available for all the member countries, similar explorations could be conducted to authenticate the outcomes of this study. Also, the exploration was confined to only ECOWAS member countries. Therefore, the results cannot be applied to all nations in the globe. Additionally, the DCCEMG, AMG and the CCEMG approaches were adopted to investigate the regressors’ elasticities. Hence, caution should be exercised when interpreting the findings, because they could differ if different approaches were used. Finally, the methods engaged for the analysis were not asymmetric. Therefore, future researchers should adopt asymmetric techniques like the NARDL in their analysis, because those methods would offer them the opportunity to explore information in a different way.