Introduction

Sustainable development (SD) is a global imperative that encompasses economic growth, environmental protection, and social equity. It envisions shared goals for humanity and is essential for achieving a sustainable and desirable future [25]. In recent years, sustainable development has gained significant traction, becoming a key priority for countries worldwide. This heightened focus is evident in the United Nations’ adoption of the 17 Sustainable Development Goals (SDGs) to be achieved by 2030. These goals, ranging from ending poverty to protecting the planet and ensuring prosperity for all people, reflect the collective commitment of nations to address pressing global challenges in a comprehensive and coordinated manner. By embracing the principles of sustainable development and working towards the attainment of the SDGs, countries aim to build resilient, inclusive, and environmentally sustainable societies that promote the well-being of current and future generations. Through concerted efforts and collaborative action at the international, national, and local levels, sustainable development offers a pathway towards a more prosperous and equitable world. In the West African region, the Economic Community of West African States (ECOWAS), a regional economic bloc consisting of 15 countries in West Africa, serves as a platform for member countries to collaborate on economic development and integration. Despite these collaborative efforts, many ECOWAS nations grapple with significant hurdles in achieving the Sustainable Development Goals (SDGs). These challenges encompass a spectrum of issues, including persistent poverty, inadequate access to healthcare and education, deficient infrastructure, and limited economic diversification [7]. Importantly, existing literature extensively documents that trade openness, poverty levels, and human capital development are fundamental factors profoundly impacting a country’s capacity to attain sustainable development (see, [2, 9, 36]).

Trade openness, defined as the degree to which a nation allows the movement of goods and services across its borders, plays a crucial role in sha** economic dynamics within ECOWAS countries. Open trade policies facilitate the exportation of resources and goods to global markets, thereby fostering economic growth and facilitating job creation and income generation [8]. By engaging with the global economy, ECOWAS nations can harness opportunities for diversification and specialization, enhancing their competitiveness and resilience. However, an increased exposure to global markets can also expose economies to external shocks and volatility [37], emphasizing the importance of strategic trade policies and risk management mechanisms to safeguard against economic instability. Despite the potential benefits of trade openness, poverty remains a persistent challenge across West Africa, with an average poverty rate of approximately 35% in ECOWAS member states. According to the World Bank [75], poverty constrains economic opportunities and limits access to essential resources necessary for sustainable development. The prevalence of poverty underscores the urgency of targeted interventions aimed at poverty alleviation and inclusive economic growth strategies. Furthermore, human capital factors such as health, education, and skills are critical determinants of a country’s productivity and adaptability in the global economy. As highlighted by World Bank [76], investing in human capital is essential for building a skilled and resilient workforce capable of driving sustainable economic growth and development. In the context of ECOWAS countries, enhancing human capital development is imperative for equip** workers with the knowledge and skills required to navigate evolving economic landscapes and participate effectively in sustainable enterprises.

Consequently, understanding the relationship among trade openness, poverty, and sustainable development within the ECOWAS region is crucial for informing effective policy interventions aimed at overcoming the multifaceted challenges hindering progress towards the SDGs. Numerous studies have explored various indicators of sustainable development and trade openness, encompassing factors such as economic growth, environmental sustainability, social equity, and institutional quality. However, the existing literature has primarily focused on the interplay between trade openness and economic growth or sustainable development, offering divergent perspectives (e.g., [11, 13, 17, 20, 31, 33, 46, 49, 65, 66, 69, 71]). While some studies suggest that trade openness can positively impact sustainable development by enhancing production efficiency and fostering economic growth (see, for instance, [17, 46]), others argue that it can have negative consequences, such as a reduction in green GDP and deterioration in environmental quality [10, 28, 33, 65, 66].

Although there has been much study conducted in this field, the current body of literature has mostly neglected to examine the precise correlation between trade openness, poverty, and sustainable development in the ECOWAS region. Furthermore, there is a conspicuous deficiency in thoroughly analysing the interaction between trade openness and poverty in influencing sustainable development outcomes in ECOWAS countries. Our current research aims to fill the gaps in knowledge by studying the impact of trade openness and poverty on sustainable development in specific ECOWAS economies. Additionally, we will investigate how trade openness moderates the relationship between poverty and sustainable development in this context. In addition, our research includes important control variables like as human capital, inflation, and exchange rate to ensure a thorough investigation of their influence on sustainable development in the ECOWAS countries. These variables have a substantial impact on economic, social, and environmental results and are crucial factors to consider when develo** effective policies [62]. Incorporating inflation and exchange rate variable is crucial because of their significant impact on macroeconomic stability, trade competitiveness, and investment choices.

We utilized a blend of econometric methodologies, including the Pooled Mean Group (PMG), Augmented Mean Group (AMG), and Cross-Sectional Autoregressive Distributed Lag (CS-ARDL) estimations, due to their unique benefits in analysing panel data. The PMG estimator is beneficial because it accommodates variations in short-term interactions among countries while assuming uniformity in long-term equilibrium relationships [54]. This adaptability allows us to comprehend the fluctuations while upholding uniformity in enduring partnerships, thereby offering insight into the connections between trade liberalisation, poverty, human resources, and sustainable development throughout the ECOWAS region. In addition, the AMG estimator improves the reliability of our analysis by tackling potential endogeneity problems and providing consistent parameter estimates [53]. By utilizing the AMG methodology, we address difficulties pertaining to omitted variables and measurement errors, hence guaranteeing the dependability of our results. The CS-ARDL estimation technique is particularly suitable for analysing both short- and long-term relationships in panel data settings and addressing cross-sectional dependence caused by spillover effects. This makes it ideal for our robust investigation of the interplay between trade openness, poverty, human capital, and sustainable development in the ECOWAS countries. By adopting this integrated strategy, we are able to utilise the advantages of each estimating method, thereby improving the reliability and accuracy of our empirical research.

Also, the primary focus of this study is on the countries of the Economic Community of West African States (ECOWAS) due to the presence of data and the diverse economic, social, and political conditions found within the region of West Africa. The study’s importance is further emphasized by the region’s joint dedication to regional integration and collaboration. The persistent challenges of poverty and human capital development in ECOWAS countries continue to be urgent concerns, despite continued endeavours to foster economic growth and development. Several countries in the region nevertheless encounter substantial challenges, such as pervasive poverty, restricted availability of education and healthcare, and inadequate accumulation of human capital.

The rest of the paper are planned as follows. Section "Review of related literature" reviews the literature. Section "Data and methodology" discusses econometric models and the data. Section "Results and discussion" presents empirical results. Finally, Section "Conclusion and policy recommendations" concludes with policy implications.

Review of related literature

Achieving sustainable development in the Economic Community of West African States (ECOWAS) countries poses a critical challenge, demanding a thorough examination of factors influencing economic growth and well-being in the region. Among these factors, trade openness, poverty reduction, and human capital development have garnered significant attention in the literature. This section synthesizes existing knowledge on these elements, exploring their interconnections and roles in fostering sustainable development globally and within the ECOWAS region. Trade openness, characterized by international trade and economic integration, is widely recognized as an essential catalyst for economic growth in develo** economies. This association stems from classical trade theories of Ricardo and Heckscher-Ohlin, which suggest that international trade can enhance resource allocation efficiencies, thereby boosting economic output. However, theoretical frameworks such as the Environmental Kuznets Curve (EKC), human capital theory, and dependency theory offer valuable insights into the complex interplay among trade openness, poverty alleviation, sustainable development, and human capital formation. These frameworks provide diverse perspectives on economic development, environmental sustainability, and social progress. For instance, the EKC theory posits a relationship between economic development and environmental degradation, suggesting that initial economic growth fuelled by trade openness may worsen environmental degradation but eventually leads to improved environmental quality as nations prioritize environmental protection measures. While some research suggests that trade openness may exacerbate environmental degradation (see, [10, 28]), others propose that it can foster sustainability by stimulating economic growth and technological progress [17, 46]. Human capital theory underscores the crucial role of education, health, and skills in driving economic development and environmental sustainability. Investments in human capital, such as education and healthcare, enhance individuals’ capacity to innovate, adapt to changing environmental conditions, and contribute to sustainable development. Studies have underscored the positive influence of human capital on sustainable development outcomes, emphasizing the significance of investing in education and healthcare to achieve long-term sustainability objectives (see, [12, 19]). In contrast, dependency theory portrays trade and economic relations between developed and develo** nations as exploitative, attributing poverty in the latter to their reliance on primary product exports and foreign investment capital. Empirical studies have supported dependency theory’s assertion that heavy dependence on primary product exports is linked to slower growth (for instance, [13, 49, 65, 66]).

Further, existing empirical literature on the interplay between trade openness and sustainable development presents divergent perspectives [5, 11, 13, 17, 20, 31, 33, 38, 46, 65, 66, 69, 71]. However, certain empirical investigations propose that the openness of trade can have a beneficial impact on sustainable development by enhancing production efficiency, fostering economic growth, raising income levels, and supporting initiatives to eradicate poverty. Ogede and Tiamiyu [46] exemplify this through the application of Fully Modified Least Square (FMOLS) and Autoregressive Distribution Lags (ARDL) techniques, revealing that trade openness significantly and positively influences sustainable development in Nigeria. It serves as a crucial economic pillar for the country. Their research indicates a lasting positive effect of trade openness on sustainable development in Nigeria, suggesting that an augmentation in trade openness will bolster sustainable development. Conversely, the impact of the age dependency ratio is statistically insignificant, signifying no discernible influence on sustainable development. In the short term, except for trade openness and the age dependency ratio, all other independent variables lack statistical significance. Arif et al. [5], utilizing panel data spanning from 1980 to 2018 and employing the autoregressive distributive lag method, assert that financial development has a positive impact on environmental economic growth in both the long and short run. They also find that trade openness positively affects sustainable economic growth in South Asian countries.

In contrast to research affirming a favourable influence, alternative perspectives [13, 33, 65, 66] posit that trade openness may yield adverse outcomes, encompassing a decrease in green GDP and a deterioration in environmental quality. These investigations underscore the importance of variables such as the structure of foreign trade and the utilization of authentic savings in sha** the repercussions of trade openness on sustainable development. For instance, Belloumi and Alshehry [13] scrutinize the ramifications of trade openness on sustainable development in Saudi Arabia and ascertain a prolonged negative impact on economic growth and environmental well-being. Sheikh et al. [65] demonstrate a negative association between trade openness and the growth of green GDP, indicating harmful effects on future generations. Additionally, Sheikh et al. [66], employing the dynamic panel autoregressive distributed lag (ARDL) methodology, contend that economic growth bolsters sustainability in both the short and long term, while trade openness, energy consumption, and foreign direct investment detrimentally affect sustainable development. Conversely, Huo et al. [33] identify positive contributions of financial development, trade openness, and foreign direct investment in advancing environmental sustainability.

Poverty, however, continues to be a significant challenge in numerous ECOWAS countries, hindering the pursuit of sustainable development. The objective of reducing poverty encompasses more than just economic growth. An increasing body of literature underscores the necessity of addressing poverty comprehensively, considering aspects such as income distribution, access to education, healthcare, and social services. The intricate but essential link between poverty reduction and sustainable development is highlighted in studies by Phimphanthavong [57], Maku et al. [40], Yu and Huang [78], and Wei et al. [74]. These studies emphasize the importance of targeted policies promoting inclusive growth for poverty reduction, contributing not only to human development but also fostering social stability and broader economic participation. For example, Maku et al. [40] utilized datasets from 1981 to 2019 and the Autoregressive Distributed Lags (ARDL) methodology to demonstrate that trade openness had diverse effects on poverty and inequality. While economic inequality is a short-term occurrence, poverty establishes a long-term association. The benefits of trade openness on inequality and poverty decrease as inequality affects trade openness.

Besides, the development of human capital stands as an essential element in sustainable progress, contributing substantially to the enhancement of workforce productivity, technological advancement, and overall economic competitiveness. A well-educated and skilled populace is more adept at meeting the challenges posed by a globalized economy. Recognizing the crucial role of human capital development, ECOWAS countries have taken steps to improve their education and healthcare systems. Several studies by Song et al. [67], Ekeowa et al. [24], and Olowookere et al. [48] delve into the correlation between human capital development and economic performance within the ECOWAS region. Their collective findings underscore the positive repercussions of investments in education and healthcare on productivity and economic growth. These insights emphasize the necessity for ongoing initiatives in human capital development to attain sustainable development. For example, Song et al. [67] argue that the environmental development in develo** countries relies heavily on the introduction of new technologies. The outcomes of dynamic panel analysis reveal that knowledge trade, regardless of its form, positively influences sustainable development up to a certain level. Additionally, Wang, et al [72, 73] contend that certain factors such as growth are linked to a decline in sustainable growth, while economic openness and the digital economy significantly support sustainable development. The study also identifies bidirectional associations between economic growth and urbanization, as well as between trade openness, sustainable development, and economic growth. These results reinforce policymakers’ confidence in collaborative efforts across countries for advancing sustainable development and advocate for the establishment of a sharing system among regions to mitigate the loss of economic growth.

The preceding discussion underscores that existing literature widely acknowledges trade openness as a significant driver of economic growth and development. However, its impacts on sustainability are multifaceted and subject to debate, as studies reveal both positive and negative effects. Nevertheless, further empirical research is warranted to elucidate the specific effects of trade openness within the ECOWAS region and individual member states. Existing studies offer mixed results, indicating the necessity for more comprehensive investigations. Moreover, there is a paucity of studies examining the effectiveness of specific human capital development policies and investments in promoting sustainability within the ECOWAS context. Additionally, minimal research has been conducted on the interrelationships and synergies between trade, poverty reduction, human capital, and sustainability factors in ECOWAS countries. Most studies tend to focus on isolated effects rather than exploring the complex interactions among these variables. Therefore, there is a pressing need for more targeted empirical analysis to guide strategies for advancing sustainable development in the region.

Hence, building upon the above discussion and existing literature, we propose the following hypotheses for the case of ECOWAS region:

Hypothesis 1

There is a significant relationship between trade openness and sustainable development across ECOWAS economies.

Hypothesis 2

Poverty has a significant impact on sustainable development in the ECOWAS region.

Hypothesis 3

Human capital development positively influences sustainable development outcomes within ECOWAS economies.

Hypothesis 4

Trade openness moderates the relationship between poverty and sustainable development in ECOWAS countries.

Data and methodology

Data and variables

In this study, panel estimation is employed to account for individual heterogeneity, identify unobservable characteristics, and enhance the reliability of estimation. Data are sourced from various repositories, including the World Development Indicator (WDI, 2021), and the World Inequality Database (2021). The measurement of sustainable development is determined by adjusted net savings, which excludes the damage caused by particle emissions as a percentage of gross national income (GNI), as outlined by Cairns and Martinet [15] and Ogede and Tiamiyu [46]. Human capital is assessed using gross fixed capital formation, in line with the approaches of Abel and Eberly [1], and van der Eng [70]. Trade is quantified through the trade openness index, consistent with the methodology of Dithmer and Abdulai [21], while poverty is evaluated based on income below the poverty line, akin to Wang et al. [72, 73] and Maku et al. [40]. Inflation is measured using the consumer price index, as employed by Hodge [32], and the nominal exchange rate is utilized to gauge exchange rate dynamics, following the approach of Mlambo, Maredza, and Sibanda [42]. Detailed definitions of these variables are provided in Table 1. However, the analysis utilizes data spanning 34 years (1987–2020) from ten countries within the Economic Community of West African States (ECOWAS), resulting in a total of 340 observations. The selection of ECOWAS countries, including Benin, Ghana, Gambia, Guinea-Bissau, Togo, Mali, Niger, Nigeria, Sierra Leone, and Senegal, is justified for several reasons. Firstly, the choice of these countries was primarily influenced by data availability considerations. Secondly, these nations collectively represent a diverse array of economic, social, and political landscapes across the West African region. Consequently, examining their experiences with trade openness, poverty, and human capital allows policymakers to glean insights into the varied challenges and opportunities confronting countries with distinct levels of development and resource endowments. Moreover, the ECOWAS member states demonstrate a shared commitment to regional integration and cooperation, evident in the establishment of the ECOWAS framework (Economic Community of West African States (ECOWAS)). This regional integration provides a unique context for analyzing the impact of trade openness on sustainable development, as policies and initiatives implemented at the regional level may exert differing effects on individual member states. Additionally, the persistent challenges related to poverty and human capital within the ECOWAS region highlight the significance of this study. Despite efforts to foster economic growth and development, many countries grapple with entrenched poverty, limited access to education and healthcare, and inadequate human capital accumulation.

Table 1 Description of variables.

Theoretical framework and model specification

Various theoretical frameworks and models have been proposed to understand and analyse the connections among trade openness, poverty, human capital, and sustainable development. These range from Neoclassical trade theory and Endogenous growth theory, Capabilities approach to the Environmental Kuznets Curve (EKC) theory, among others. The Neoclassical trade paradigm suggests that trade openness can drive economic growth and poverty reduction by fostering specialization, economies of scale, and efficient resource allocation [22, 26]. However, critics argue that the benefits of trade liberalization may not be evenly distributed, potentially increasing income disparities and areas of poverty [61]. In contrast, endogenous growth theory highlights the significance of human capital and technological progress in sustaining economic growth and long-term development [62]. According to this perspective, trade openness can enhance the exchange of knowledge, technology, and skills, thereby improving human capital and promoting sustainable development [30]. Additionally, the capabilities approach, as articulated by Sen [64] and Nussbaum [45], emphasizes the importance of expanding human freedoms and opportunities, which are closely tied to poverty reduction and the promotion of sustainability. Trade openness can increase access to a wider array of goods and services, potentially enhancing individuals’ capacities and overall well-being [14, 18].

Furthermore, the theory of the Environmental Kuznets Curve (EKC) provides a useful framework for examining the relationships between trade openness, poverty, human capital, and sustainable development. This hypothesis suggests that as an economy expands, there is an initial rise in environmental degradation, followed by a subsequent decline once a particular level of revenue is reached. Contemporary scholarly works have expanded the Environmental Kuznets Curve (EKC) idea to include several aspects that influence the connection between trade openness, poverty, and human capital. These parameters have been recognized as crucial aspects that affect the EKC dynamic. Several studies have shown that trade openness can influence environmental quality through mechanisms such as technological transfer and regulatory competition [27]. Studies have demonstrated that poverty and wealth disparity could disrupt or alter the Environmental Kuznets Curve (EKC), impeding progress in environmental improvements [34, 72, 73]. For instance, Wang et al. [72, 73] argue that rising inequality alters the association between economic growth and carbon emissions, shifting it from a U-shaped pattern to an N-shaped pattern. High-income disparity hinders the separation of economic growth and environmental damage, making it more difficult to achieve environmental reforms. Human capital accumulation might enhance the Environmental Kuznets Curve (EKC), allowing countries to mitigate environmental degradation at lower income levels by adopting cleaner technology and sustainable practices [39, 63]. These studies emphasized the significance of human capital and environmental rules in attaining sustainability and concluded that energy use and trade openness worsen ecological footprints, while enhanced controls and education can alleviate these impacts.

Thus, the theoretical concepts discussed form the basis for the propositions of this current study. Firstly, the study examines whether trade openness promotes sustainable development in ECOWAS. Secondly, it analyses the impact of poverty on sustainable development and whether this impact is ambiguous in the region. Lastly, the study explores the interaction between trade openness and poverty and its effect on sustainable development in the sampled region. Drawing on the works of Sheikh et al. [65], Ogede and Tiamiyu [46], Gonese et al. [29], and Nessa and Imai [44], the empirical model is constructed as follows.

$${Y}_{it}={\beta }_{0i}+{\beta }_{1i}{K}_{it}+{\beta }_{2i}{T}_{it}+{\beta }_{3i}{P}_{it}+{\beta }_{4i}{Z}_{it}+{\mu }_{it}$$
(1)

From Eq. (1), \(Y\) is the sustainable development (adjusted net savings), \(K\) is the human capital (proxied by gross fixed capital formation), \(T\) is trade (trade openness), \(P\) is poverty (poverty depth), while \(Z\) is the vector for control variables [inflation, proxy with consumer price index (INF); exchange rate (EXC)]. \(it\) connotes the number of countries at time \(t\), while \({\mu }_{it}\) is idiosyncratic disturbances. A functional relationship of the control variables considered in the model (1) is given in Eq. (2);

$${Z}_{it}\equiv f\left[{CPI}^{{\alpha }_{1}}, {EXR}^{{\alpha }_{2}}\right]$$
(2)

Which is stated explicitly as Eq. (3) as:

$${Y}_{it}={\beta }_{0}+{\beta }_{1}{K}_{it}+{\beta }_{2}{T}_{it}+{\beta }_{3}{P}_{it}+{\beta }_{4}{INF}_{it}+{\beta }_{5}{EXC}_{it}+{\mu }_{it}$$
(3)

The second objective is addressed by incorporating the interaction variable (T*P) into Eq. (3) and the improved form of model (4) is formulated as:

$${Y}_{it}={\beta }_{0}+{\beta }_{1}{K}_{it}+{\beta }_{2}{T}_{it}+{\beta }_{3}{P}_{it}+{\beta }_{4}\left({T}_{it}*{P}_{it}\right)+{\beta }_{5}{INF}_{it}+{\beta }_{6}{EXC}_{it}+{\mu }_{it}$$
(4)

where the variable (P*T) is the interaction term between poverty and trade openness. Thus, by looking at the coefficient of the interaction term, \({\beta }_{4}\), we can understand whether or not the long-run marginal effects of poverty on influencing or deteriorating sustainable development are dependent on the degree of trade openness in ECOWAS nations. By analysing partial derivatives of sustainable development and poverty at given levels of trade openness, the total effect of poverty can be estimated from the marginal effects of trade openness in Eqs. (5) below:

$$\frac{\delta {Y}_{it}}{\delta {P}_{it}}={\beta }_{1}+{\beta }_{4}{T}_{it}$$
(5)

The a priori expectations for the parameters’ estimate as specified in the baseline regression models are: \({\beta }_{1},{\beta }_{2}>0\) because an increase in capital (measured as gross fixed capital formation) is expected to induce the realization of sustainable development and also increase in the volume of trade is expected to induce a linear increase in sustainable development. However, \({\beta }_{3},{\beta }_{4}and{ \beta }_{5}<0\). This is because an increase in poverty depth (measured as income below poverty line), exchange rate and inflation measured as consumer price index is expected to induce a reduction in the attainment of sustainable development.

Estimation strategy

To accomplish the objectives outlined in this study, a specific three-step econometric approach was adopted. This approach entailed firstly identifying cross-sectional dependence and slope heterogeneity (SH), secondly verifying the stationarity and cointegration among the series, and finally considering both short- and long-term coefficients. Given the interconnected nature of trade and other economic activities in the ECOWAS region, it was imperative to determine whether the series under examination exhibited cross-sectional dependence. Failure to address cross-sectional dependence could yield erroneous and misleading conclusions [3]. Thus, this study conducted Pesaran’s [52] cross-sectional dependency test to ascertain the presence of cross-sectional reliability within the panel. The null hypothesis of cross-sectional independence was tested against the alternative hypothesis of cross-sectional dependence. Rejection of the null hypothesis indicated the existence of cross-sectional dependence among the selected variables. Furthermore, to assess the presence of heterogeneity, the homogeneity test developed by Pesaran and Yamagata [56] was employed. Neglecting slope heterogeneity could bias the regression analysis and lead to erroneous hypothesis testing [4]. The null hypothesis of homogeneity was tested against the alternative hypothesis of heterogeneity. Rejecting the null hypothesis indicated the presence of slope heterogeneity among the selected variables. Additionally, evaluating residual cross-sectional correlations and homogeneity is crucial for determining additional econometric assessments [16]. Moreover, the study presumed that a unit root process would characterize the study variables due to the extended period of the panel data utilized [43]. Based on this presumption and the potential for cross-sectional dependence, appropriate panel unit root tests, such as Pesaran’s cross-sectionally augmented IPS (CIPS) and cross-sectionally augmented Dickey–Fuller (CADF), were conducted to assess the stationarity of the series under investigation. Notably, both the CADF and CIPS unit root tests revealed that the variables were not integrated at the same order. Furthermore, to determine whether there is a long-term connection between the variables, panel cointegration techniques were utilized.

Resulting from the foregoing, the panel regression analysis was performed to delve deeply into the sustainable development literature by examining the impact of trade openness, poverty, and human capital on sustainable development, as well as exploring whether trade openness moderates the nexus between poverty and sustainable development in sub-Saharan African countries (SSA) from 1987 to 2020. However, given the panel nature of the data, spanning 10 countries over 34 years (where N = 10 is significantly lower than T = 34), the Generalized Method of Moments (GMM) estimator is deemed unsuitable for our analysis. Instead, the Autoregressive Distributed Lag (ARDL) approach is considered more appropriate, given the larger value of T compared to N. Therefore, the current study adopts the PMG-ARDL approach to capture both short- and long-term coefficients to achieve its objectives:

$${Y}_{it}={\omega }_{1}+\sum_{i=1}^{p}{\beta }_{0}{Y}_{i,t-1}+\sum_{i=0}^{q}{\beta }_{1}{D}_{i, t-1}+\sum_{i=0}^{q}{\beta }_{2}{X}_{i, t-1}+{\mu }_{i,t}$$
(6)

with i and t representing country and time, respectively, y is the sustainable development, d is the trade openness, X is a set of other explanatory and control variables. The use of PMG-ARDL estimation is supported by literature, which emphasizes the suitability of ARDL in cases of single or mixed series integration order. Additionally, these techniques help ensure consistent and accurate estimation by addressing endogeneity concerns [68]. The PMG imposes homogeneity across countries in the long-run equilibrium while permitting short-run heterogeneity. Short-run dynamics account for country-specific disparities, which may stem from varying responses to stabilization policies, external shocks, or financial crises [6]. The MG estimator accommodates both short-run and long-run heterogeneity, making it suitable for a large number of countries. Alternatively, the CS-ARDL approach captures short- and long-term coefficients to achieve the same objective, organized as follows:

$${Y}_{it}={\omega }_{0}+\sum_{i=0}^{{p}_{e}}{\varnothing }_{i,t}{Y}_{i,t-1}+\sum_{i=0}^{{p}_{x}}{\varphi }_{i,t}{X}_{t-1}+\sum_{i=0}^{{p}_{z}}it{\overline{Z} }_{t-j}+{\mu }_{i,t}$$
(7)

where Z = (\({\Delta Y}_{it}\), \({X}_{t}\)) and 'X' stands for the previously mentioned set of explanatory variables. In the inquiry, the term (i) signifies cross-sectional dependence, while the term (t) represents the time period. To obtain the average values for both explanatory and dependent variables, \({\overline{Z} }_{t-1}\) is used to resolve cross-sectional dependence based on spillover effects. For each given variable, we include \({p}_{e}, {p}_{x} and {p}_{z}\) in order to determine the lag values. In a study by Ogede, Oduola and Tiamiyu [47], the coefficients of short-term correlation are used to derive a long-run value. Augmented Mean Group estimators were employed to bolster the robustness of this investigation.

Results and discussion

Pre-estimation results

The summary statistics for the variables presented in Table 2 reveal key insights. The average genuine savings (y) stands at 1.39%, with the highest and lowest rates being 44.81% and − 31.72%, respectively. This suggests that, on average, 1.39% of sustainable development activities are accounted for by adjusted savings in ECOWAS countries during the review period. As for poverty (p), the mean value of the series is 0.126%, with maximum and minimum values of 0.16% and 0.035%, respectively. Furthermore, the mean value of the trade openness variable, measured by the ratio of total trade to GDP (t), is 54.97%, with maximum and minimum values of 131.48% and 16.9%, respectively. Human capital proxy with gross fixed capital formation (k) shows an average value of 18.79% over the review period, with a maximum of 53.12% and a minimum of − 2.42%. Among the control variables, the mean values for inflation rate (inf) and official exchange rate (exc.) are 76.32% and N587.20/US Dollar, respectively. These two control variables exhibit a range, with minimum values of − 87.19% and N0.015/US Dollar, and maximum values of 305.9% and N9010.22/US Dollar, respectively. In terms of standard deviation, it indicates the extent to which these variables deviate from their mean values. Notably, poverty, trade openness, gross fixed capital formation, and inflation have low deviation rates, as their standard deviation values are lower than their mean values. Moreover, poverty shows a leftward skew with a value of − 1.2373, while sustainable development (proxy with adjusted saving), trade openness, gross fixed capital formation, inflation, and exchange rate exhibit rightward skewness. The Kurtosis value of 3.0 suggests a normal distribution. Table 2 also presents the partial correlation of trade openness, poverty, sustainable development, human capital investment, inflation, and exchange rate in ECOWAS countries using annual data for the period between 1987 and 2020. The correlation results indicate that the indicator of sustainable development, proxied with adjusted net saving, positively correlates with human capital investment, poverty, and inflation. On the other hand, sustainable development negatively correlates with trade openness and the exchange rate. The correlation table also reveals that poverty has a positive correlation with human capital investment, inflation, and the exchange rate, but a negative association with trade openness. Furthermore, the correlation coefficient for trade openness indicates a positive correlation with human capital, the exchange rate, and inflation. Regarding the control variables, the inflation rate exhibits a positive correlation with the exchange rate.

Table 2 Summary statistics and correlation matrix

The study anticipates the seamless integration of the selected ECOWAS nations—Ghana, The Gambia, Nigeria, Sierra Leone, Benin, Guinea, Guinea-Bissau, Mali, Niger, Senegal, and Togo—due to their interconnected economic and geographical ties. Emphasizing the critical nature of identifying these discrepancies is paramount, as overlooking them may result in inaccurate estimations. The comparison spans trade openness, poverty, sustainable development, human capital investment, inflation, and currency rates, with Table 3 showcasing the cross-sectional dependence within its frameworks. Notably, Table 3 underscores that all variables manifest cross-sectional dependency. To address the unit root testing, second-generation unit root tests are employed, given that not all panel variables conform to the null hypothesis of cross-sectional independence. This approach advocates for the use of second-generation unit root tests such as Pesaran’s [55] cross-sectionally augmented IPS (CIPS) and cross section.

Table 3 Results of Pesaran cross-sectional dependence test

After conducting the cross-sectional dependence test, the analysis proceeds to examine panel unit roots. Utilizing second-generation unit root techniques, specifically cross-sectionally augmented IPS (CIPS) and cross-section augmented Dickey-Fuller (CADF), the study anticipates identifying robust and consistent stationarity features amidst cross-sectional challenges in the dataset. These techniques are applied to assess the stationary nature of the trade openness indicator, poverty, and variables related to sustainable development. The goal is to recommend the most suitable technique for estimating parameter coefficients. The results, outlined in Table 4, display unit root outcomes for the indicators, with critical values of − 2.21 (10%), − 2.33 (5%), and − 2.55 (1%) for different significance levels. Both CIPS and CADF approaches yield consistent decisions regarding the stationary status of variables of interest, predominantly not stationary at the 5% level, except for a few distinctions. In summary, both CIPS and CADF unit root estimation methods indicate that all variables are integrated at either the level or first difference. Contrarily, Table 5 presents evidence of co-integration processes, revealing the outcomes of tests conducted by Pedroni [50, 51] and Kao [35]. The rejection of the null hypothesis of no co-integration at the 1% level across all test statistics indicates the presence of long-run co-movement among the variables. Specifically, the Kao [35] test confirms the existence of a co-integrating correlation among trade openness, poverty, sustainable development, human capital, inflation, and exchange rate, in their stated order.

Table 4 CIPS and CADF unit root tests
Table 5 Results of panel co-integration test

Empirical results

This section’s report the empirical findings on the connections between ECOWAS trade openness, poverty, human capital, and sustainable development.

Results of direct effect of trade openness, poverty, human capital on sustainable development in ECOWAS countries

The study employs the PMG-ARDL method to capture both short- and long-term coefficients, aligning with our stated objective. This technique accommodates varying short-run responses across countries while ensuring consistency in the long run. However, literature indicates that despite its advantages, the PMG-ARDL method disregards contemporaneous correlation across countries, attributed to unobserved factors. Consequently, neglecting these factors may result in less reliable parametric and non-parametric estimators. This drawback stems from PMG's inability to address cross-sectional dependence in the error term, an issue expected to diminish with the introduction of the CS-ARDL model. This study, however, presents the findings derived from both the Pooled Mean Group (PMG) and Cross-Sectional Autoregressive Distributed Lag (CS-ARDL) analyses, outlined in Table 6, regarding direct effects, are summarized as follows. The error correction term (ECM) coefficient (− 0.47631) emerges as negative and statistically significant in both models, providing evidence of cointegration.

Table 6 Pooled mean group (PMG) and cross-sectional ARDL results-direct effect

In the long run, poverty consistently exhibits a negative and significant impact on sustainable development (SD) across both models. Specifically, a 1% increase in poverty corresponds to a 1.27% decrease in SD according to the PMG model, while the CS-ARDL model indicates a 31.19% increase in poverty. In the PMG model, the short-term effect of poverty stands out as significant and negative. Notably, a 1% increase in poverty results in a noteworthy 37.58% reduction in SD in the short run. Conversely, in the CS-ARDL model, the short-term effect of poverty emerges as significant and positive, indicating that a 1% increase in poverty coincides with a 29.17% increase in SD in the short run. However, the significant negative impact of poverty on SD, both in the short and long run, aligns with previous research demonstrating that poverty is a key obstacle to achieving sustainability goals [74, 78, 80]. For instance, Wei et al. [74] notes that the detrimental effects of poverty on SD, emphasizing the urgency of addressing poverty eradication as a fundamental component of SD strategies. Poverty hinders access to essential resources like education, healthcare, and clean water, which are critical for promoting SD. The magnitude of the negative short-term effect of poverty on sustainability in the PMG model underscores the urgency of addressing poverty to enable progress. Nevertheless, the positive short-term relationship between poverty and sustainability in the CS-ARDL model contradicts both the long-term findings and conclusions from earlier studies. One potential explanation is that short-term poverty alleviation efforts like cash transfers or food aid projects may temporarily improve sustainability metrics, even though systemic poverty continues to hinder long-term SD.

In contrast, human capital exhibits a positive and statistically significant correlation with SD across both the PMG and CS-ARDL frameworks. Notably, a 1% increase in human capital is associated with a 12.83% uptick in SD in the PMG model and an 8.42% increase in the CS-ARDL model. While the short-term effect of human capital appears insignificant in the PMG model, it gains significance and positivity in the CS-ARDL framework. Specifically, a 1% increase in capital is linked to a 6.47% short-term enhancement in SD within the CS-ARDL model. The consistent positive relationship between human capital and SD, as evidenced in both the PMG and CS-ARDL models, aligns with previous findings from studies such as Di Fabio [19] and Bekele et al. [12], underscoring the pivotal role of human capital in promoting sustainability, and that investing in human capital development is critical for achieving sustainable development goals. However, the insignificant short-term effect of human capital in the PMG model contrasts with the significant positive short-term impact in the CS-ARDL framework. This aligns with Bekele et al. [12] finding that human capital investments require time to generate returns, although the positive short-term effect in the CS-ARDL model suggests human capital may also confer some immediate sustainability benefits. The findings, however, demonstrate that sustained improvements in healthcare, education, and skills are vital for advancing sustainability objectives in both the short and long term.

Interestingly, trade openness demonstrates a positive and statistically insignificant relationship with SD in both the PMG and CS-ARDL frameworks. Notably, a 1% increase in trade openness is associated with about 0.27% and 4.3% rise in SD in the PMG and CS-ARDL model in the long-run. The findings concur with those of Meqbel [41], Ogede and Tiamiyu [46], who assert that trade openness is advantageous to SD. One potential reason is that the economic and environmental impacts of trade may depend on the composition and policies around trade. However, the general lack of significance suggests trade openness alone may not drive sustainability without complementary policies. Moreover, the short-term effects of trade openness prove insignificant across both models, suggesting that changes in these variables do not wield immediate influence on sustainable development. This finding differs from Bekele et al. [12], who concluded changes in trade hold immediate influence over sustainability indicators. The divergence suggests trade openness may operate on longer timescales in this context.

The findings regarding inflation’s impact on SD present a consistent pattern of insignificance across both the PMG and CS-ARDL analyses. This suggests that inflationary changes do not exert a statistically significant immediate or long-term influence on sustainable development outcomes. Conversely, the analysis reveals divergent effects of the exchange rate on SD in the two models. In the PMG model, a positive and significant relationship is observed, indicating that a 1% increase in the exchange rate corresponds to a 2.74% increase in SD. However, in contrast, the CS-ARDL model illustrates a negative and significant effect, where a 1% increase in the exchange rate leads to an 8.35% decrease in SD. Furthermore, both models highlight the significant and negative short-term impact of the exchange rate on SD, suggesting that immediate changes in the exchange rate can adversely affect sustainability efforts, with a 1% increase resulting in a decrease of 2.42% in the PMG model and 6.99% in the CS-ARDL model. These findings carry substantial implications for policymakers and stakeholders involved in fostering SD within the ECOWAS region. The consistent insignificance of inflation suggests that policymakers need not prioritize inflation control measures solely for the sake of sustainable development goals. However, the divergent effects of the exchange rate underscore the complexity of managing currency fluctuations within the context of sustainability efforts. Policymakers must carefully consider the economic implications of exchange rate policies and their potential impacts on SD outcomes. Additionally, the significant short-term effects of the exchange rate across both models highlight the need for proactive measures to mitigate the adverse effects of exchange rate fluctuations on SD initiatives.

Regarding diagnostic tests, both models exhibit satisfactory specification, with the CS-ARDL model demonstrating a higher R-squared. Specifically, the R-squared (MG) for the PMG model registers at 0.68, indicating that 68% of the variation in SD is explained by the independent variables in the PMG model. The Hausman test returns a p-value of 0.27, surpassing the 0.05 threshold, thereby confirming the efficiency and consistency of the PMG model. Conversely, the Root Mean Squared Error (RMSE) for the CS-ARDL model is calculated at 4.09, underscoring its goodness of fit. Further, the cross-sectional dependence test for the CS-ARDL model yields a p-value of 0.2570, signifying no significant evidence of cross-sectional dependence among the residual terms from the estimated models. Ultimately, diagnostic evaluations confirm the adequate specification of both models, with the CS-ARDL model demonstrating superior fit and no indication of cross-sectional dependence in its residuals.

Results of moderating role of trade openness in the relationship between poverty and sustainable development in ECOWAS

This sub-section presents the results relating to the moderating role of trade openness in the relationship between poverty and SD in ECOWAS. The results from both the Pooled Mean Group (PMG) and Cross-Sectional ARDL (CS-ARDL) models, as detailed in Table 7, reveal remarkable insights. The results from both the PMG and CS-ARDL models, reveal that, in the long run, while the interaction between poverty and trade openness demonstrates a positive and statistically significant association in the PMG model, this relationship appears statistically insignificant in the CS-ARDL model. This suggests that over time, trade openness may potentially mitigate the adverse effects of poverty on SD, yet the significance of this effect may vary depending on the econometric approach employed. The significant long-run moderating effect of trade openness on the poverty-sustainability relationship in the PMG model aligns with Yu, & Liu [79] and Radmehr et al. [60], who found trade openness helped mitigate poverty’s negative sustainability impacts over time. However, the insignificant result from the CS-ARDL model diverges from their conclusion, reflecting the complexity of the dynamics at play. The authors contend that the trade's impact depends on complementary policies around human capital, institutions, and equity. Conversely, in the short-run, the moderation effect coefficients (− 9.6757 and − 20.417 for PMG and CS-ARDL, respectively) is negative and statistical insignificance. This finding indicates that the immediate impact of trade openness on alleviating the negative consequences of poverty on SD may not be discernible within the observed time frame. The foregoing demonstrates the importance of the time dimension, with short-run effects insignificant in both models. The findings also underscore the complexity of the dynamics at play and emphasize the importance of considering both short- and long-term perspectives when formulating policies aimed at fostering SD in ECOWAS countries.

Table 7 Pooled mean group (PMG) and cross-sectional ARDL results-moderation effect

Additionally, the findings from both the PMG and CS-ARDL models, as reported in Table 7, shed light on the relationship between poverty and SD, particularly in the long and short terms. In the long run, poverty exhibits a negative and statistically significant association in the PMG model, suggesting its detrimental impact on SD over time. However, this relationship appears statistically insignificant in the CS-ARDL model, highlighting potential variations in the dynamics of poverty's influence across different methodological frameworks. Conversely, in the short run, poverty demonstrates a negative and statistically insignificant impact on SD in both the PMG and CS-ARDL models. These findings underscore the complexity of the relationship between poverty and SD, emphasizing the importance of considering multiple factors and methodological approaches in understanding and addressing poverty-related challenges within the context of SD efforts. The negative and significant long-run impact of poverty on sustainable development in the PMG model aligns with conclusions from previous studies highlighting poverty as a critical obstacle to sustainability progress. However, the insignificant short-run impacts in both models further highlight the complexity of linkages while the preponderance of evidence points to poverty reduction being vital for sustainability suggesting the policy mixes to be tailored to local contexts and dynamics.

Further, as reported in Table 7, human capital emerges as a consistently positive and significant determinant of sustainable development across both models in the long run, but insignificant in the short run. Specifically, a 1% increase in human capital translates to a substantial increase in sustainable development, with a magnitude of 40.75% in the PMG model and 58.31% in the CS-ARDL model in the long run. The consistent positive and significant association between human capital and SD across both the PMG and CS-ARDL models underscores the fundamental role of human capital in fostering long-term SD outcomes within ECOWAS. The substantial magnitude of this relationship, with a 1% increase in human capital translating to a notable increase in SD, highlights the importance of investing in education, skills development, and healthcare initiatives to drive progress towards sustainability goals. The uniformly positive and significant long-run impact of human capital on sustainable development corroborates findings from previous studies including Bekele et al. [12] highlighting human capital as a vital enabler for advancing sustainability goals. However, the insignificance of human capital in the short-run suggests that the benefits of human capital investments may take time to materialize fully. The divergence between long- and short-run impacts underscores the need for sustained, long-term commitments to develo** human capabilities through education, health, and skills training as part of comprehensive policy mixes aimed at promoting equitable, socially-inclusive, and environmentally-sound SD within ECOWAS countries.

Moreover, as outlined in Table 7, the analysis reveals that trade openness consistently emerges as a positively insignificant determinant of SD across both the long-run and short-run perspectives. Specifically, a 1% increment in trade openness yields a notable enhancement in SD, with a magnitude of 3.68% in the PMG model and 1.25% in the CS-ARDL model over the long run. Similarly, in the short run, a 1% increase in trade openness corresponds to a substantial increase in SD, with a magnitude of 0.91% in the PMG model and 1.35% in the CS-ARDL model. The uniformly positive yet statistically insignificant relationship between trade openness and SD across both the long-run and short-run highlights that trade liberalization in isolation may be insufficient to substantially further sustainability objectives. The minimal magnitude of trade openness' impact in the single digit range in both timeframes indicates that adjustments to trade policies alone are unlikely to generate large sustainability gains without coordinated efforts across other economic, social, and environmental dimensions. Remarkably, a more robust policy approach beyond just expanding trade is imperative to effectively harness international commerce for equitable and sustainable development. The findings emphasize that trade openness should be situated within broader strategies to advance human well-being, social inclusion, and environmental sustainability. While trade may confer some benefits, substantially moving the needle likely necessitates holistic policy mixes tailored to local frameworks.

Diagnostic tests affirm the adequacy of the PMG and CS-ARDL models. The Hausman test p-value of 0.12 (> 0.05) demonstrates the efficiency and consistency of the PMG model. The CS-ARDL model's lower Root MSE of 3.95 compared to the direct effect model indicates superior fit. The CS-ARDL framework corrects for cross-sectional dependence. The CD test p-value of 0.3308 (> 0.05) confirms the absence of residual cross-sectional dependence. The significant F-statistic of 3.76 points to joint regressor significance. Finally, the PMG model’s R-squared (MG) of 0.70 shows 70% of variation in sustainable development is accounted for, slightly higher than the direct effect model. In summary, key diagnostics validate the appropriateness of the PMG and CS-ARDL models for robust analysis.

However, the disparities in the number of observations in the summary statistics and the PMG results are most likely due to the deletion of outliers, which might potentially alter result interpretation by introducing bias and reducing sample representativeness. As a result, we use the Augmented Mean Group (AMG) and Pooled Ordinary Least Squares (P-OLS) to perform robustness checks to ensure that PMG results are consistent. One of the primary justifications for using an Augmented Mean Group (AMG) is its ability to account for cross-sectional dependence and heterogeneous dynamics in panel data, with the caveat that it may be sensitive to structural breaks, whereas Pooled OLS may overlook individual-level effects. However, the findings of the Augmented Mean Group (AMG) and P-OLS models, as given in Table 8, show that human capital had a consistently significant positive effect on sustainable development across all four models (AMG, P-OLS, PMG, and CS-ARDL). Meanwhile, all models found no significant link between trade openness and SD. The robustness testing using the AMG and OLS techniques confirms the PMG findings, as well as the absence of a statistically significant influence of trade openness on sustainable development. Furthermore, the Wald Chi-square test in AMG, as shown in Table 8, assesses the overall significance of the model's coefficients. A significant result at the 1% level indicates that the independent variables collectively have explanatory power.

Table 8 Robustness check

Conclusion and policy recommendations

While ECOWAS countries have made commendable progress in regional integration and also pursued greater trade openness as a pathway to economic growth and sustainable development. However, the benefits of trade have not reached all segments of the population equally. Persistent poverty and varying levels of human capital across ECOWAS countries pose challenges to ensuring trade-driven growth is inclusive and sustainable. Therefore, this paper investigates the relationship among trade openness, poverty, and human capital development in the pursuit of sustainable development across a panel of ten ECOWAS economies over a 34-year period (1987–2020). Specifically, it examines the roles of trade openness, poverty, and human capital development in sustainable development, while also exploring the moderating role of trade openness on the poverty-sustainable development relationship within the ECOWAS region. To conduct this analysis, the study employs the Pool Mean Group (PMG) estimator and Cross-Sectional Autoregressive Distributed Lag (CS-ARDL) techniques, taking into account cross-sectional dependence, cointegration, and other relevant diagnostic tests.

The findings highlight important implications for policy formulation and decision-making regarding sustainable development in ECOWAS countries, given the strong negative correlation of poverty and the positive link of human capital with sustainable development. The persistent detrimental effect of poverty on sustainable development highlights the immediate necessity for focused measures aimed at reducing poverty. For example, in Nigeria, the largest economy in ECOWAS, about 69% of the population lived below the poverty line of $2 per day. This high poverty rate has been linked to environmental degradation, as poor communities often resort to unsustainable practices like deforestation for fuel wood. Policy measures should give priority to tackling multidimensional poverty through comprehensive policies that include income production, social protection, access to essential services, and infrastructure development. For instance, Ghana's Livelihood Empowerment Against Poverty (LEAP) program, which provides cash transfers to extremely poor households, has shown positive impacts on food security, health, and education outcomes (see, [58]).

The correlation between human capital and sustainability emphasizes the crucial significance of education, healthcare, and skill enhancement in advancing sustainable development goals. In Senegal, for example, increased investment in education led to a rise in primary school enrollment from 69.8% in 2000 to 84.6% in 2018 (UNESCO), contributing to improved human capital and potential for sustainable growth. It is crucial for policymakers in ECOWAS to prioritize investing in human capital development to improve productivity, foster innovation, and strengthen the resilience of regional economies. Creating a supportive atmosphere for entrepreneurship, research, and technological innovation helps enhance the utilization of human resources to attain sustainable development results. The Tony Elumelu Foundation Entrepreneurship Programme in Nigeria, which provides training, mentorship, and seed capital to young entrepreneurs across Africa, is an example of fostering innovation and sustainable business practices.

Although the impact of trade openness on sustainability is varied, the major role of trade openness in reducing the negative effects of poverty on sustainability in the long term highlights the potential of trade policies to support efforts in reducing poverty. For instance, the ECOWAS Trade Liberalization Scheme (ETLS) has helped increase intra-regional trade, potentially contributing to economic growth and poverty reduction. Policymakers should actively pursue trade liberalization measures that aim to facilitate inclusive growth, improve market access for small-scale producers, and encourage economic diversification. The West Africa Agricultural Productivity Program (WAAPP), which aims to generate and disseminate improved agricultural technologies, is an example of a regional initiative that combines trade openness with support for small-scale producers. It is important to combine careful management of exchange rates and trade policies with initiatives to enhance domestic institutions, regulatory frameworks, and infrastructure. This will help ensure that the advantages of trade are spread fairly and contribute to sustainable development goals.

It is crucial to acknowledge the constraints of the study and propose potential directions for future empirical investigation. In order to capture the short-term dynamics that impact sustainable development, future research should consider increasing the frequency of data collecting or conducting case studies. While panel autoregressive distributed lag (ARDL) models and techniques such as PMG and CS-ARDL are generally reliable, they may not completely consider all the dynamic interactions and external shocks that affect trade openness, poverty, and human capital development. Henceforth, it is imperative for forthcoming studies to investigate the repercussions of worldwide economic disturbances, such as the COVID-19 pandemic, on the interconnections among trade openness, poverty, and human capital in ECOWAS nations. This research would offer policymakers evidence-based insights to create policy frameworks that are more robust and adaptable.