Introduction

Economic growth in sub-Saharan Africa (SSA) relies heavily on robust investment levels in physical and human capital [62, 83]. Human and physical investments are mutually beneficial [51]. A skilled workforce effectively utilizes advanced technologies, while modern infrastructure facilitates knowledge sharing and collaboration, crucial drivers of innovation [3]. Investment in infrastructure (roads, bridges, power grids), machinery, and technology enhances worker efficiency and production capacity. Capital formation creates an environment that empowers workers to be more efficient, productive, and innovative, leading to increased production capacity, improved economic competitiveness, and ultimately, a higher standard of living for citizens. Afonso and Rodrigues [5] quantified spillover effects of investment and stated that improved infrastructure reduces transportation costs, enhances connectivity, and attracts further investment in sectors like manufacturing, agriculture, and services. Investment in education, healthcare, and skills acquisition is essential for building a skilled workforce capable of driving innovation and economic diversification [39]. Educated and healthy populations are more productive, innovative, and adaptable to technological advancements, leading to higher levels of economic growth. Social investments help to reduce income inequality, enhance social cohesion, and promote sustainable economic growth [93].

Sub-Saharan Africa (SSA) boasts a youthful population, abundant natural resources, and a growing middle class, all ingredients for a thriving economy [39, 43]. However, the region faces significant challenges in achieving sustained and inclusive economic growth due to lack of investments [81]. The average growth rate of the region over a decade stood at 2.1% [118]. The commodity boom of the 2000s led to impressive growth rates for some countries, where an average growth rate increased to 5.7% [86]. A decline in commodity prices and the global financial crisis of 2008 exposed the vulnerability of economies heavily reliant on primary exports. Studies affirmed that Africa lacks adequate infrastructure, significantly hindering economic activity and further discouraging investment [8, 9, 62]. The African Development Bank estimates that Africa’s region needs $130 billion annually to close the gap and catch up with developed economies [4]. In an attempt to resolve the investment challenges in Africa, countries in the region start accumulating debts to build an enabling environment for business. This has led to a rise in external debt over the past decade in the SSA region.

The World Bank reports that SSA's external debt stock has more than tripled since 2010, reaching an estimated $1.14 trillion at the end of 2022 [119]. This surge in debt has also pushed up the debt-to-GDP ratio in the region. The median public debt-to-GDP ratio in SSA has climbed from 32% in 2010 to a concerning 57% in 2022 [119]. This rising debt burden raises concerns about debt sustainability, especially for countries with weaker economies. Twenty-two SSA countries were classified as being at high risk of external debt distress or already in debt distress [54].

Despite accumulating significant debt in recent years, sub-Saharan African nations continue to grapple with low investment levels, hindering long-term growth prospects [15, 39]. The recent spike in external debt was attributed to factors such as infrastructure development projects, budget deficits due to commodity price fluctuations, and fiscal response to COVID-19 pandemic shocks [36]. This phenomenon creates a vicious cycle, often referred to as a debt trap. Studies that identified limited fiscal space documented that high debt servicing costs (interest payments on existing debt) crowd out resources that could be used for crucial investments in infrastructure, education, and healthcare [30, 66, 77]. This stifles economic growth and reduces long-term productivity. Other studies affirmed that high debt levels in the region have raised concerns about a region's ability to repay its loans, leading to investor wariness [58, 59, 99]. This discourages private sector investment, a critical driver of economic growth and job creation.

The relationship between debt and private investment is a complex and multifaceted issue that has sparked debates among economists and policymakers. On one hand, some theoretical arguments suggest that high levels of debt can crowd out private investment by competing for scarce resources [7, 21, 96, 115]. This perspective posits that when governments accumulate significant debt, they can divert funds away from the private sector, leading to higher interest rates, reduced access to credit, and diminished investment opportunities for businesses [21]. Consequently, private investment declines, hindering economic growth and development. Conversely, another theoretical argument suggests that debt can serve as a signal for future growth prospects and can actually attract investment [3, 48, 115]. According to this view, when governments borrow to finance investments in infrastructure, education, or other productive sectors, they demonstrate a commitment to future economic expansion. Investors interpret this as a positive signal of government confidence in the economy's long-term prospects, leading to increased investor confidence and higher levels of private investment [48]. In this scenario, debt can play a proactive role in stimulating economic activity and promoting long-term investment [61].

In an attempt to resolve the theoretical arguments, most empirical studies have focused on exploring the influence of external debt on economic growth both in Africa and other regions [11, 38, 45, 71, 115]. The results of their findings further generated contention in the literature. Some found positive and significant effects [36, 45], while others supported the idea that debt decelerates growth [11, 115], and others supported the neutrality hypothesis [3, 31]. The conflicting results on the impact of external debt on economic growth stemmed from methodological differences, endogeneity issues, heterogeneous effects across countries, differences in the quality of institutions, debt composition and utilization, threshold effects, and variations in macroeconomic and policy contexts [48, 66, 72, 117]. Huge gaps exist across different regions regarding the link between external debt accumulation and domestic investment. Only a very few studies have attempted to close this gap [17, 24, 25, 48, 60, 65]. However, a critical analysis indicated that a significant number of the few panel studies failed to address the problem of cross-sectional dependencies, dynamic threshold effect, and the role of institutional quality, especially corruption and governance [48, 60, 65].

Sub-Saharan African countries exhibit spatial spillover effects, where economic conditions and policies in one country affect neighboring countries. Therefore, ignoring cross-sectional dependencies could lead to biased estimates of the relationship between external debt and investment [26, 98, 102]. Additionally, the SSA region shares common characteristics, such as geographical proximity, historical ties, and similar economic structures [7]. These common factors induce correlations in the error terms of regression models, violating the assumption of independent observations [88, 117]. Regional economic integration initiatives, such as the African continental free trade area (AfCFTA), can lead to increased economic interdependence among sub-Saharan African countries. Consequently, shocks to one country's economy spill over to others, necessitating the consideration of cross-sectional dependencies in panel analysis . Therefore, ignoring cross-sectional dependencies in the existing studies rendered their results spurious as their standard errors could be biased [68, 117]. Therefore, we argue that the reliability of the panel studies from sub-Saharan Africa is questionable and needs further investigation.

Furthermore, limited research exists on how institutional quality influences the debt-investment nexus, despite extensive studies on the relationship between debt and investment [9, 15, 30]. Institutional quality refers to the effectiveness of a country's governance structures, including the rule of law, property rights protection, control of corruption, regulatory quality, and government effectiveness [56, 100]. The role of institutional quality in shaping the debt-investment relationship is crucial yet under-explored. Effective institutions can mitigate the negative effects of debt while enhancing its positive impact on investment [58, 59, 80]. Sound institutional frameworks mitigate the adverse effects of high debt levels on investment. For instance, countries with strong rule of law and property rights protection are better equipped to manage debt burdens effectively, reducing the risk of debt distress and fiscal mismanagement [30]. Effective institutions amplify the positive impact of debt on investment by promoting transparency, accountability, and efficient resource allocation [46]. Nations and regions with transparent and accountable governance structures use borrowed funds efficiently, directing them toward productive investment projects with high social and economic returns [55].

Institutional quality also influences investor confidence and perceptions of risk. Countries with strong institutions are perceived as more attractive investment destinations, leading to higher levels of foreign direct investment (FDI) and portfolio inflows [58, 59]. Well-functioning institutions enable governments to implement prudent fiscal policies, debt management strategies, and structural reforms that support sustainable investment and economic growth [10, 72].

However, only a few studies understood the moderating role of external debt on domestic investment [73]. Although the literature on external debt and economic growth has captured the effect of institutions, more research is needed [12, 37, 101]. Most studies applied a static threshold model in line with Kremer et al. [64]. The literature identified the limitations of static threshold models as they assume fixed threshold levels over time, failing to account for structural changes in the underlying economic relationships [88, 91, 107]. As economic conditions evolve, the optimal threshold levels shift, rendering static threshold models less effective in capturing dynamic changes in the debt-investment relationship [31]. Also, the selection of threshold values in static threshold models is often subjective and arbitrary, leading to potential bias in estimation results [117]. All these factors undermine the robustness of the findings from the existing studies. Therefore, this study adopted a dynamic threshold model proposed by Seo et al. (2016) using the Stata code developed by Seo et al. [106]. The dynamic panel threshold model accounts for time-varying effects and structural changes in the debt-investment nexus by allowing for dynamic adjustments in threshold levels over time. It separates the effects of the independent variables into a lower and upper regime, measures catch-up effects, and addresses endogeneity concerns through appropriate instrument variables [106].

In contributing to the debt-institution-investment trilogy in the SSA region, this study made four significant contributions to the literature. First, the study applied a two-step system GMM to address the issue of endogeneity in examining the direct effects of external debt and institutions on investment. Two-step GMM allows researchers to instrument for potentially endogenous variables. Correct identification of valid instruments that are correlated with the explanatory variables but uncorrelated with the error term produces consistent and unbiased estimates [103, 104]. This approach helps control for potential feedback effects and endogeneity arising from the simultaneity between external debt, investment, and institutional quality [120]. It yields more efficient estimates of the model parameters and standard errors, in the condition where the number of cross sections exceeds the number of years, that N > T [103, 104]. Second, addressing the moderating role of institutional quality on the influence of external debt on domestic investment in the SSA region, which constitutes a virgin land in the literature. Third, we adopted a dynamic panel threshold estimator in line with Seo et al. [107] to estimate the debt and institutional framework threshold that can either mar or accelerate domestic investment in SSA. Lastly, this study is among the few studies that championed the estimation of distributional effects of external debt and institutional quality on investment using panel quantile regression. At the same time, it applied the Driscoll and Kraay [41] estimator that accounts for cross-sectional dependencies in the panel. By shedding light on this under-studied mechanism, the research contributes to a more nuanced understanding of debt management strategies for promoting domestic investment that can ultimately enhance economic growth in the region. As policymakers seek to leverage debt for sustainable investment and growth, they will gain valuable insights.

The following sections of this paper first conduct a detailed theoretical and empirical review, while section three elaborates on the data and econometric methodology employed. Subsequently, section four presents the empirical analysis, followed by a thorough discussion of the findings. The final section of the paper concludes with implications for policymakers in sub-Saharan Africa.

Literature review

1Theoretical underpinnings

The crowding-out theory posits that excessive accumulation of debt would dampen investment through several channels. The crowding out of private investment occurs when excessive debt, accompanied by debt servicing, raises the government’s interest bill and budget deficit, thereby reducing public savings. This, in turn, raises interest rates or crowds out credit available for private investment. Claessens et al. (33, 34) attributed a decline in investment to a decrease in a country’s available assets for financing investment and macroeconomics. The authors argued that as debtor countries strive to meet their financial obligations in terms of servicing the debt, little capital is left for investment. Crowding-out effects set in when only the government and its agencies can borrow due to the high interest rate, leaving business entities and individual entrepreneurs unable to compete and thus crowded out of the market. Similarly, Taylor (1993) argued that continuous servicing of debt caused liquidity constraints, leading to a reduction in government expenditure and investment. Debt servicing reallocates resources, which may not be optimal, by transferring wealth from local regions to international regions. This dramatic multiplier accelerator tends to reduce self-dependency by enhancing dependence on foreign debts, which might not be healthy for the economy's capacity to develop [75].

The debt overhang hypothesis (DOH) theory by Krugman (1988) explained a situation in which the expected repayment on foreign debt falls short of the contractual value of the debt. The DOH has two variations: the narrow (conventional) and the broader versions. The narrow perspective, opined that there is a debt overhang effect when investors lower their investment levels to avoid paying higher taxes in future, anticipating an increase in the tax rate on capital gains due to servicing the debt (Krugman, 1988; [16, 105]). In line with neoclassical models, taxation for paying interest on foreign debt diminishes people's disposable income, which, in turn, reduces taxpayer savings. In the broader version of the debt overhang theory, when investors anticipate inflation, devaluation, and other economically distorting actions to pay off the debt, there is a disincentive to invest. Debt rescheduling discussions deter investment because they increase uncertainty in the corporate environment [33, 34]. Therefore, debt reduction has the potential to increase economic efficiency when a nation is burdened with debt, as reducing the debt stock will have a knock-on effect and lower the debt overhang.

The second key aspect concerns the potential for external debt to crowd out domestic investment. This occurs when increased government borrowing for debt service or deficit spending competes for loanable funds in the market. As the government's demand for funds rises, the demand curve for loanable funds shifts rightward, leading to higher real interest rates [105]. This, in turn, increases the cost of borrowing for private businesses and individuals, discouraging investment and interest-sensitive spending [21]. While Keynesian economists argue that the multiplier effect from government spending can offset these negative effects, classical economists like Smith (1776) emphasized the crowding-out effect as a significant concern.

The liquidity constraint hypothesis (LCH) or import compression effect is another theory that describes the growth effect of a very high debt burden through the balance of payments account. In particular, when a country's currency is not marketable on the global market, countries with significant debt loads require sufficient inflows of foreign currency to service the loan. Debt servicing becomes difficult when a nation has little reserves, few capital inflows, and low exports. Therefore, to encourage the influx of foreign currency, the nation can resort to devaluation/depreciation and/or import restrictions [108]. Going by contention in the literature, import compression may result in a situation where imported commodities, including inputs and capital goods, become expensive, which may contribute to weak growth [79, 111, 112]

The Institutional School of Thought documents that the nature of the influence of external debt on domestic investment is determined by the quality of institutions. This moderating effect operates through several channels. Firstly, robust institutions (e.g., rule of law, property rights) create a more predictable and stable environment, encouraging private investors to undertake long-term investment projects with borrowed funds [30, 32]. Secondly, efficient bureaucracies and reduced corruption ensure that borrowed funds are allocated effectively toward productive investments, minimizing the risk of waste and misuse [80]. Furthermore, strong institutions signal a government's commitment to responsible fiscal management, potentially attracting foreign direct investment that complements debt-financed domestic investment [42]. This interplay suggests that for countries with weak institutions, external debt can exacerbate the crowding-out effect, while strong institutions can help leverage debt to promote domestic investment.

Empirical review

External debt and domestic investment nexus

Debate abounds in the empirical literature on the interconnectedness of institutional quality, external debt, and private investment. For instance, Traum and Yang (2015) applied a dynamic stochastic general equilibrium (DSGE) model to resolve the argument on whether government debt crowds out or enhances domestic investment in the United States. They found that the influence of debt on domestic investment is associated with the type of policy innovations that lead to debt growth. Also, the study argued that increases in external debt reduce government consumption and income tax. The future expectation that the accumulation of debt could lead to higher labor and capital taxes has a negative influence on investment. Minhaj-ud-Din, Khan, and Tariq [61] applied an autoregressive distributed lag (ARDL) model to examine whether external debt is a blessing or a curse in Pakistan. The study, which found a negative influence of debt, stated that government policies were not effective in utilizing borrowings for investment-oriented projects with returns greater than the cost of borrowing (debt service). Additionally, the study contends that the inability to meet debt obligations can result in economic imbalances in the form of deteriorating financial reserves, high fiscal discrepancies, a loss of investor confidence, exchange rate instability, and a downgrade in the credit rating by international financial agencies. Ahmad (2015), on events influencing external debt, opined that excessive accumulation of debt, coupled with servicing, causes macroeconomic instability in the form of inflation, unemployment, and poverty. It also discourages capital inflows and limits the government's ability to bring reforms to different sectors of the economy.

Fonchamnyo et al. [48] documented evidence from the sub-Saharan African (SSA) region on the interconnectedness between debt and investment, and the empirical findings supported the crowding-out hypothesis. The negative effects of debt are manifested through exchange rate fluctuations, high debt servicing costs, and macroeconomic instability. One of the recommendations from their study is that the governments of the SSA region should ensure proper monitoring of projects for which debts are contracted, with a priority on sectors such as healthcare and infrastructure. Egbetunde and Akinlo [46], who also applied the generalized method of moments (GMM) to address global finance and growth dynamics within the SSA region, submitted that debt becomes a detrimental economic tool for stimulating investment in the region due to corruption, lack of political stability, and overall weak institutions that hinder debt from effectively driving investment. Agbo and Nwadialor [7] utilized a panel estimator to investigate the drivers of debt crises in Africa and submitted that debt, as an economic tool, has beneficial effects. However, the improper allocation and channeling of funds into large-scale projects without proper cost–benefit analysis by experts are major causes of high debt without significant investment and growth to show for it.

Jorge (2020) utilized quarterly data to assess the impact of Portuguese external debt on their macroeconomic performance from 1999 to 2019. Their findings indicated that while total external debt impedes private investment, public debt fosters investment through infrastructure development and technological diffusion. In contrary, Mabula and Mutasa [70] escalated that public debt hinders essential elements such as business investment and R&D spending. Literature also supports a U-shaped relationship between debt and investment [24, 25, 66]. Lau et al. [66] proposed that during the initial stages of debt accumulation, when debt service is relatively low, economies reap the benefits of debt up to a certain threshold. Beyond that point, the efficiency of capital and return on investment start to decline, making the cost of servicing debt higher than the marginal return from investment. Benayed et al. [24, 25] similarly observed threshold effects on debt-investment dynamics and concluded that while debt yields short-term benefits, in the long run, its effects are negative and statistically significant. Crowding effects occur through higher interest rates and liquidity constraints resulting from government demands for funds to meet its debt obligations.

Picarelli et al. [99] utilized panel  data from 26 EU nations spanning 1995 to 2015 and, employing the GMM estimation technique, demonstrated that foreign debt adversely affects public investment. Applying vector error-correcting model to analyze the influence of public debt on private investment in Sri Lanka from 1978 to 2015, Thilanka and Ranjith [113] concluded that public debt has a long-term crowding-out effect on private investment, while the short-term effects are marginal. Serin and Demir [109], using time series data to explain the empirical debt-investment dynamics in Turkey, supported a U-shaped relationship. Hence, the impact of external debt on domestic investment is favorable up to a threshold of 44.82% of GDP, beyond which the impact becomes negative. Apere [17] applied time series analysis from Nigeria and found that private investment is positively affected linearly by domestic debt. The study also highlights a debt ceiling of 124.69% of GDP, beyond which the impact of external debt on private investment becomes detrimental. Ogunjimi [87] empirically argued that domestic debt enhances private and state investment in both the short and long terms. Additionally, the findings demonstrate that Nigeria's external debt both attracts and repels private investment, as well as public investment. Conversely, using time series data from Nigeria, the study suggests that external debt has beneficial effects on investment through capital inflows and managerial skill spillovers. The neutrality hypothesis was supported, with proponents of this view documenting that the effects of debt itself are marginal, but debt servicing has detrimental effects on investment [21].

External debt, institutional quality, and domestic investment

According to Chukwu et al. [32] explored the moderating role of institutional quality on the influence of external debt on sectoral growth using panel data of 17 developing countries. The study applied fully modified ordinary least square (FMOLS) and found that countries with robust institutional frameworks are better equipped to manage their debt levels efficiently, thereby minimizing the adverse consequences on domestic investment. Similarly, Harsono et al. [53] applied panel regression approach on five selected ASEAN countries and demonstrated that sound governance structures and institutional quality enhanced investor confidence and reduced the perceived risks associated with high levels of external debt, thereby encouraged higher levels of domestic investment in the examined countries. Strong institutions are essential for efficient and effective management of debt accumulations that can stimulate domestic investment [95]. According to Aman et al. [14],who documented empirical evidence from 133 countries using the GMM approach, strong institutional quality ensure efficient allocation of financial resources, according to their findings a well-functioning institutions ensure that borrowed funds are used efficiently for productive investments, maximizing returns and boosting investor confidence. Akinlo [9] documented that strong institutional quality ensures credible commitment and argued from their empirical finding that a history of responsible fiscal policies and adherence to debt contractual obligations enhance a country's creditworthiness. This ensures for better borrowing terms and reduces the risk of debt overhang [110].

Conversely, Ashogbon et al. [19] who applied time series data from Nigeria found that weak institutional quality exacerbates the adverse effects of external debt on domestic investment. Studies by Kaya and Kaya [57] documented evidence from emerging economies and found that countries with poor governance and weak institutional frameworks are more vulnerable to the negative impacts of excessive external debt, leading to lower levels of domestic investment. In such environments, investors perceive higher levels of political and economic risk, deterring both domestic and foreign investment [42]. Acemoglu et al. [1] asserted that quality institutions, especially strong legal frameworks, mitigate the negative debt effects through fostering investors' confidence. The argument submitted in their study hinged on the ground that the enabling environment created by debt contraction remained a vacuum if investors' property rights and contract enforcement are not ensured. In line with the prior argument, Agbloyor et al. [6] documented, from a panel data analysis, that strong institutions help in risk reduction. Political and economic risks associated with investments are drastically reduced in economies where legal frameworks appear transparent and predictable (Okada, 2013). Dollar and Kraay [40] documented that strong and quality institutions, such as accountability and voice, legal enforcement, and control for corruption, minimize embezzlement of government borrowings that might demean the positive effects of debt.

Arguing empirically from 79 developing economies, Cordella et al. [35] submitted that debt and institutions are complementary inputs that influence investment. Their study agreed on a certain threshold at which debt is favorable to investment and postulated that strong institutions increase the absorptive capacity of economies, blocking the negative effects of debt. Eberhardt and Presbitero [44] in their comparative study, sampling 118 developing economies, argued that countries with the fastest-growing economies and investment within their sample have an average institutional quality of 1.06. Also, Lau et al. [66] stated that country-specific effects such as culture, religion, and racism play a significant role in capital inflows to complement local infrastructure. Egbetunde and Akinlo [46] used the system GMM method within the region of sub-Saharan Africa and concluded that debt has crowding-out effects, but institutions block the loopholes through legal contract enforcement and risk reduction. In the opinion of Mabula and Mutasa [70], countries with weak rule of law, political instability, are associated with high corruption that undermines the effectiveness of contracts and legal protections, thus increasing risks associated with debt. Benayed et al. [24, 25] documented that political instability and constant changes in regulations make the investment climate unpredictable. This tends to increase the risk associated with investment and cause the investment schedule to trend downward or remain flat, even though borrowed funds are used for building infrastructures and other business enablers.

Methods and materials

Data source and description of variables

The study bases its analysis on an extensive annual dataset encompassing observations for 47 sub-Saharan African countries. The specific timeframe covered spans from 1996 to 2021. The selection of countries was guided by data availability, and a detailed list is provided in annexA. The measurement of domestic investment (GFCF) is represented by gross fixed capital formation as a proportion of GDP. The percentage of external debt stock to GDP is employed as an indicator for external debts (EXD). Net inflows of foreign direct investment as a percentage of GDP (FDI) are utilized to represent foreign investment. The yearly growth rate of per capita income (gRGDPPC) is employed as a proxy for measuring economic growth. Real interest rates (IR) are used to measure interest rates, while the real exchange rate (EXR) proxies exchange rates. Debt services (DS) were measured using Debt service (PPG and IMF only, % of exports of goods, services, and primary income). The percentage of total trade in relation to GDP (OPN) was used to quantify trade openness. The institutional quality index is computed by averaging six established indicators: control of corruption (CC), rule of law (RL), regulatory quality (RQ), government effectiveness (GE), political stability and absence of violence/terrorism (PS), and voice and accountability (VA) [56, 67, 92]. Missing data points are addressed using a four-year moving average technique [13, 91, 92].

Econometric strategy

This study conducts a trilateral analysis of external debt, institutional quality, and domestic investment in sub-Saharan Africa. The model is constructed based on established prior research in this area [26, 48, 92, 101]. The empirical model is presented as follows:

$${\rm GFCF}_{\rm it}={\beta }_{0}{+ \beta }_{1}{\rm GFCF}_{{\rm it}-1}+{\beta }_{2}{\rm EXD}_{\rm it}+{\beta }_{3}{\rm IQ}_{\rm it}+ {\beta }_{4}{\rm DS}_{\rm it}+ {\beta }_{5}{\rm FDI}_{\rm it}+ {\beta }_{6}{\rm rGDPPC}_{\rm it}+{\beta }_{7}{\rm OPN}_{\rm it}+ {\beta }_{8}{IR}_{\rm it}+ {\beta }_{9}{\rm EXR}_{\rm it}+ {\in }_{i}+{\varepsilon }_{\rm it}$$
(1)

where \({\mathbf{G}\mathbf{F}\mathbf{C}\mathbf{F}}_{\mathbf{i}\mathbf{t}}\) represents domestic investment, \({\mathbf{G}\mathbf{F}\mathbf{C}\mathbf{F}}_{\mathbf{i}\mathbf{t}-1}\) represents the dynamic effects of domestic investment, EXD stands for external debt, IQ represents institutional quality, DS denotes debt service, FDI stands for foreign direct investment, represents economic growth, OPN indicates trade openness, IR denotes the interest rate, EXR stands for the exchange rate, \({\in }_{\mathbf{i}}\) implies a constant term and country fixed effect, and t is the time index, while the subscripts \(\mathbf{i}\) index countries. The independent and identically distributed stochastic error term, denoted by \({{\varvec{\varepsilon}}}_{{\varvec{i}}{\varvec{t}}}\), is assumed to follow a normal distribution with a mean of zero and a constant variance of 0 within the scope of this study [117]. That is, \({{\varvec{\varepsilon}}}_{{\varvec{i}}{\varvec{t}}}\sim {\varvec{N}}({{\varvec{\sigma}}}^{2},0)\). The parameters to be estimated are denoted by\(\boldsymbol{ }{{\varvec{\beta}}}_{0},\boldsymbol{ }\boldsymbol{ }{{\varvec{\beta}}}_{1}{,\boldsymbol{ }{\varvec{\beta}}}_{2}{,\boldsymbol{ }{\varvec{\beta}}}_{3}{,\boldsymbol{ }{\varvec{\beta}}}_{4},\boldsymbol{ }{{\varvec{\beta}}}_{5}{,\boldsymbol{ }{{\varvec{\beta}}}_{6},\boldsymbol{ }{\varvec{\beta}}}_{7}{,\boldsymbol{ }{{\varvec{\beta}}}_{8}\boldsymbol{ }{\varvec{a}}{\varvec{n}}{\varvec{d}}\boldsymbol{ }{\varvec{\beta}}}_{9}\) respectively. Extending Eq. (1), several studies have affirmed that the interaction term between institutional quality (IQ) and external debt (EXD) has a significant influence on domestic investment (GFCF) [29, 82]. This interaction effect captures the moderating effect of institutional quality on the relationship between external debt and investment. We incorporated the interactive term into the model and respecified it as follows:

$${{\rm GFCF}}_{\rm it}={\beta }_{0}{+ \beta }_{1}{\rm GFCF}_{{\rm it}-1}+{\beta }_{2}{\rm EXD}_{\rm it}+{\beta }_{3}{\rm IQ}_{\rm it}+ {\beta }_{4}{({\rm IQ}}_{\rm it}*{\rm EXD}_{\rm it})+ {\beta }_{5}{\rm DS}_{\rm it}+ {\beta }_{6}{\rm FDI}_{\rm it}+ {\beta }_{7}{\rm rGDPPC}_{\rm it}+{\beta }_{8}{\rm OPN}_{\rm it}+ {\beta }_{9}{\rm \rm IR}_{\rm it}+ {\beta }_{10}{\rm EXR}_{\rm it}+ {\in }_{i}+{\varepsilon }_{\rm it}$$
(2)

Equation (3.2) enables the study to explore the distinct impact of the interaction between external debt and institutional quality on domestic investment in the sub-Saharan Africa region. Drawing insights from the literature [13, 46, 82, 88, 91, 92], we estimate the marginal effect of external debt (EXD) on domestic investment. This was achieved by taking the partial derivative of Eq. (2) with respect to EXD. This led to the formulation of Eq. (3), expressed as follows:

$$\frac{{\partial {\rm GFCF}}_{\rm it}}{{\partial {\rm EXD}}_{\rm it}}= {\beta }_{2}+{\beta }_{4}{\rm IQ}_{\rm it}$$
(3)

In Eq. (3), the coefficients \({\beta }_{2}\) and \({\beta }_{4}\) capture the interaction effect between external debt (EXD) and institutional quality (IQ) on domestic investment. The signs and magnitudes of these coefficients will determine the specific nature of this interaction. Four possible scenarios can emerge based on the estimated values of λ₂ and λ₄:

In Eq. (3), the coefficients \({\beta }_{2}\) and \({\beta }_{4}\) capture the interaction effect between external debt (EXD) and institutional quality (IQ) on domestic investment. The signs and magnitudes of these coefficients will determine the specific nature of this interaction. Four possible scenarios can emerge based on the estimated values of \({\beta }_{2}\) and \({\beta }_{4}.\)

  1. i.

    If \({\beta }_{2}>0\) and \({\beta }_{4}>\) it implies that external debt contributes positively to investment and institutional quality constitutes a complimentary input that strengthen the positive effect.

  2. ii.

    \({\beta }_{2}>0\) and \({\beta }_{4}<0\) it suggests that external debt is a positive predicator of investment, but institutional quality weakened the positive effect.

  3. iii.

    \({\beta }_{2}<0\) and \({\beta }_{4}>0\) it implies that the negative effects of external debt on domestic investment is mitigated and lessened by institutional quality.

  4. iv.

    If \({\beta }_{2}<0\) and \({\beta }_{4}<0\) it suggests that external debt crowds out domestic investment, and institutional quality exacerbate the negative effect of external debt on investment.

In Eq. (3), coefficients \({\beta }_{2}\) and \({\beta }_{4}\) with opposite signs suggest a threshold effect of institutional quality (IQ) on the relationship between external debt and domestic investment. Beyond this threshold, EXD might have a stronger positive effect on domestic investment [9, 12, 82]. Following the path of extant studies [9, 58, 59, 91, 92], the threshold value of institutional quality is expressed thus,

$${\rm IQ}>\left(\frac{{-\beta }_{2}}{{\beta }_{4}}\right)$$
(4)

Previous studies [10, 72, 84, 101] highlight potential bias in estimates from traditional pooled OLS, fixed, and random effects models for dynamic panel data with country-specific effects (\({\in }_{i}\)) and lagged dependent variables \(({\rm GFCF}_{{\rm it}-1})\). This is because the country-specific effects might be correlated with the lagged dependent variable {E \(({\rm GFCF}_{{\rm it}-1}, {\in }_{i})\ne 0)\). To address the limitations of traditional estimators, the literature suggests employing the first-difference transformation [120]. This technique eliminates the country-specific effects (\({\in }_{i}\)) by differencing Eq. (2). The transformed equation is presented below:

$${\Delta {\rm GFCF}}_{{\rm it}}={\beta }_{0}{+ \beta }_{1}{\Delta {\rm GFCF}}_{{\rm it}-1}+{\beta }_{2\Delta }{\rm EXD}_{\rm it}+{\beta }_{3}\Delta {\rm IQ}_{\rm it}+ {\beta }_{4}\Delta {({\rm IQ}}_{\rm it}*{{\rm EXD}}_{\rm it})+ {\beta }_{5}\Delta {\rm DS}_{\rm it}+ {\beta }_{6}{\Delta {\rm FDI}}_{\rm it}+ {\beta }_{7}\Delta {{\rm rGDPPC}}_{\rm it}+{\beta }_{8}\Delta {\rm OPN}_{\rm it}+ {\beta }_{9}\Delta {\rm IR}_{\rm it}+ {\beta }_{10}{\Delta {\rm EXR}}_{\rm it}+ \Delta {\varepsilon }_{\rm it}$$
(5)

Some existing studies affirmed a two-way causality between external debt and domestic investment [2, 49, 90], so estimating Eq. (5) with traditional models will breed simultaneity bias which can constitute sources of endogeneity [32, 117]. Endogeneity can also arise from omitted variable bias, as some macroeconomic variables such as financial development, inflation, and human capital were omitted in the model [2, 60, 82].

In Eq. (5), the first-difference transformation (denoted by Δ) eliminates the country-specific effects (∈ _i) and achieves orthogonality between the differenced error terms (\(\Delta {\varepsilon }_{\rm it}\)) and the lagged dependent variable (\({\Delta {\rm GFCF}}_{{\rm it}-1}\)); however, it introduces endogeneity as a new challenge. This arises because the differencing process can induce a correlation between the transformed error terms and the lagged explanatory variables [92]. This correlation occurs because differencing creates a correlation between the lagged dependent variable and the differenced error terms or E( \({\Delta {\rm GFCF}}_{{\rm it}-1}, \Delta {\varepsilon }_{\rm it} )\ne 0.\) Some existing studies affirm a two-way causality between external debt and domestic investment [2, 49, 90], so estimating Eq. (5) with traditional models will breed simultaneity bias, which can constitute sources of endogeneity [32, 117]. Endogeneity can also arise from omitted variable bias, as some macroeconomic variables such as financial development, inflation, and human capital were omitted in the model [2, 60, 82].

In an attempt to address potential endogeneity concerns, this study employed the recently developed dynamic generalized method of moments (GMM) technique, following the footprint of existing studies [88, 92, 103, 104]. This approach leverages instrumental variables to mitigate the issue of endogeneity. We then applied the linear moment restrictions in the following way:

E(\({\rm GFCF}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})\)= E(\({\rm EXD}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it}) =\) E(\({IQ}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})=\)[E(\({IQ}_{{\rm it}-i}*{\rm EXD}_{{\rm it}-i}), \Delta {\varepsilon }_{\rm it})=(\) E(\({\rm DS}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})\)= E(\({\rm FDI}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})\)= E(\({\rm rGDPPC}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})\)= E(\({\rm OPN}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})\)= E(\({\rm IR}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})\)= E(\({\rm EXR}_{{\rm it}-i}, \Delta {\varepsilon }_{\rm it})\)= 0.

Building on the work of Arellano and Bond [18], we employed their method of moment restrictions to obtain consistent and reliable estimates. Unlike OLS, GMM requires the number of cross-sectional units (N) to be strictly greater than the number of time-series observations (T) for identification [27, 28, 117, 120]. This is because GMM relies on moment conditions that become more reliable with a larger number of cross-sectional units. In the case of our study, spanning from 1996 to 2021 (26 years), there were 47 countries as cross-sectional units. This implies that T < N.

To estimate the threshold effects of institutional quality on the effects of external debt on domestic investment, Eq. (4) constitutes a static model with numerous criticisms in the literature. We argue that static threshold models, while useful for identifying nonlinear relationships, have limitations when analyzing the threshold effect of institutional quality and external debt on domestic investment in the SSA region. According to Makun [71], static models typically estimate a single threshold value. This assumes a sharp transition from one regime to another, which might not be realistic in practice. The effect of institutional quality and debt on investment could gradually change rather than abruptly shift at a specific point [96]. Both institutional quality and external debt might be influenced by past investment decisions. This endogeneity can bias the estimated threshold effect. Static models do not adequately address this issue [88, 91, 92]. Investment decisions today are influenced by past levels of investment, institutional quality, and debt. Static models wouldn't capture these dynamic relationships [115]. SSA countries are diverse. Static models do not adequately control for unobserved country-specific factors that can influence investment alongside institutional quality and debt [52, 106, 107, 114]. To address the econometric issues, this study relied on dynamic panel threshold regression introduced by Seo and Shin [107] and Seo, et al. [106]. The equation is specified thus:

$${\rm GFCF}_{\rm it}=\left(1, {{X}{\prime}}_{\rm it}\right){\alpha }_{1}1\left({Z}_{\rm it}\le \delta \right)+{\alpha }_{2}1\left({Z}_{\rm it}>\delta \right)+{\varepsilon }_{\rm it}$$
(6)

where \({\varepsilon }_{\rm it}={\gamma }_{i}+{v}_{\rm it}\)

\({X}{\prime}\) is a K *1 vector of time-varying regressors, meaning matrix of both control and independent variables with lagged of domestic investment (\({\rm GFCF}_{{\rm it}-1}\)). 1{.} suggest indicators function; \(\delta\) is the threshold value and \({Z}_{\rm it}\) measured external debt and institutional quality and both are our transition variables. \({\alpha }_{1}\) and \({\alpha }_{2}\) are the slope coefficients linked with the two regimes and the stochastic error term is denoted by \({\varepsilon }_{\rm it}\). All the analyses were done using STATA 16, and the summary of the source and description of the variables can be found in Table 1

Table 1 Summary of data and variable measurement

Results and discussion

This section presents econometric analyses aimed at resolving the debate surrounding the relationship between debt, institutions, and investment using robust econometric estimators. The initial part displays the summary statistics and correlation results, followed by a presentation of the main estimators, which are summarized and provided in various tables.

Table 2 (Panel A) presents the results of summary statistics. The findings infer that the average value of domestic investment (% of GDP) within the scope of this study stands at 20.95. This finding strongly suggests there is a low prevalence of investment within the sub-Saharan African (SSA) region. This outcome can be attributed to multifarious economic uncertainties, the weak quality of institutions, notably characterized by a high level of corruption, and inefficiency in governance. Also, we observe that external debt, foreign direct investment, growth of real income per capita, exchange rate, trade openness, debt service, interest rate, and institutional quality exhibit mean values of 66.161, 4.250, 1.703, 104.902, 67.742, 9.097, 9.097, and − 0.644, respectively. Additionally, the measure of institutional quality in the SSA region, quantified on a scale ranging from − 2.5 to 2.5, reveals a disconcerting mean value of − 0.644. This downward trajectory is indicative of prevalent issues such as high levels of corruption, a deficient regard for the rule of law, and a recurrent backdrop of political instability, among other factors [46]. Furthermore, the standard deviation values across all series demonstrate a pattern of low dispersion, implying that the datasets employed in this study exhibit a pronounced proximity to their respective means. It is noteworthy that Botswana boasts the lowest debt burden, standing at 3.895, while Liberia carries the onus of the highest debt burden at 610.451. Additionally, the analysis identifies Sierra Leone and the Republic of Congo as occupying polar ends in terms of investment levels within the sub-Saharan African region. Lastly, with regard to institutional quality, the spectrum ranges from Congo, Dem. Rep., exhibiting the weakest institutional quality with a value of − 1.957, to Mauritius, characterized by the most robust institutional quality at 0.867, solidifying its position as the strongest institutional framework in the panel.

Table 2 Descriptive statistics and correlation matrix

In Panel B of Table 2, a summary of the correlation matrix is presented. The results indicate a negative association between external debt, exchange rate, and debt service with the investment level in SSA. This implies that as external debt levels increase, there is a higher tendency for investment levels to decline. Conversely, foreign direct investment, income per capita growth, trade openness, and institutional quality show a positive correlation with investment, suggesting that an increase in these variables is likely to accelerate investment levels in Africa. The primary purpose of conducting correlation analysis in this study is to examine and eliminate independent variables that demonstrate strong correlations, mitigating potential issues of multicollinearity [50, 63, 76]. As anticipated, a strong positive correlation is observed between debt and debt service, with a coefficient of 0.705. Consequently, debt service and external debt were included in the same model as the value is below the threshold of 0.8 identified in the literature [50, 63]. Therefore, we are confident that the analyses were free of multicollinearity issues.

As summarized in Table 3, all four models (columns 1 to 4) reached a consensus that external debt crowds out investment in the sub-Saharan African region at a statistically significant level. This finding aligns with the extant literature [99, 113, 116]. It corroborates the argument of Thilanka and Ranjith [113], who contend that excessive debt contraction causes liquidity constraints, interest rate hikes, and ultimately makes borrowing difficult for investors, thus crowding out investment. However, Ogunjimi [87], who found a positive and significant association between debt and investment, argued from the perspective of financing gap closure channels. They stated that external debt helps fill the financing gap for productive domestic investments, especially in developing countries with limited domestic savings. These funds can be used for infrastructure projects, technology acquisition, or business expansion, ultimately leading to higher economic growth and potentially attracting further investment. Additionally, Penzin et al. [96] supported these arguments by emphasizing that external debt enables investors to access the global market and achieve risk diversification through access to external finance, allowing investors to spread their risks across portfolios and nations.

Table 3 Debt-institution-investment results from 2-SGMM, Drisc/Kraay and random effects

In this study, we argue that external debt can be a powerful tool for financing investment, but its effectiveness hinges on the quality of a region's institutions. Africa is characterized by weak rule of law and high corruption, where borrowed funds are often diverted to private pockets and inefficient projects. This reduces the amount available for productive investment in the region [7, 89]. The view of the institutional school of thought is supported by our findings, as institutions favorably and significantly predict the outcome of domestic investment, holding other variables fixed, ceteris paribus. Our empirical findings align with other studies [58, 59, 91], implying that strong institutions facilitate access to credit and capital, build trust and social capital, thus influencing investment decisions. The interaction terms indicated that the corruption that erodes debt's benefits disappears when strong institutions are in place. However, the study indicated that the benefits of debt can only be realized by the SSA region when the quality of institutions is above 0.25 on the scale of − 2.5 to 2.5 (See column 2). The existence of this threshold is supported by the literature [17, 58, 59, 77, 96].

Financial inflows (FDI), economic growth, and economic openness act as attractors of domestic investment through technological spillover, increased demand for industrial output resulting from a positive surge in income, and the globalization benefits of openness, influencing investment decisions [20, 99]. Consistent with theoretical postulations, investment is negatively sensitive to exchange rate depreciation and interest rate hikes [23, 47, 69, 74, 94]. These negative effects occur through an increase in the cost of borrowing, which lowers the demand for loans, increases production costs and output prices, as firms aim to maximize profits. It also leads to reduced demand for firms' output [17, 66, 116]. Exchange rate depreciation leads to an increase in the cost of industrial inputs, reduced industrial output competitiveness, heightened capital flight, lowering investors' confidence, and subsequently reducing domestic investment [47, 85, 94]. Bahal [21] documented that exchange rate depreciation can increase the burden of foreign-dominated companies, leading to financial crises and reduced output demand, affecting aggregate demand for industrial output.

Table 4 presents the results of the distributional effects of external debt and institutional quality on domestic investment across different quantiles in the SSA region using generalized panel quantile regression. The results highlight that external debt crowds out investment levels at the 10th to 50th quantiles but has a significantly positive influence at the 75th and 90th quantiles. This aligns with prior findings from two-step GMM and random effect estimators. The finding implies that the impact of external debt on domestic investment in the SSA region is heterogeneous across countries, depending on their initial level of investment. From the 10th to 50th Quantiles (Low Investment Countries), external debt crowds out domestic investment. This aligns with the traditional crowding-out effect, where high debt burdens reduce government resources for infrastructure and increase borrowing costs for private firms [99, 113, 116]. While from 75 to 95th (High Investment Countries), the results suggest that for countries with a strong foundation of existing investment, additional debt can act as a source of financing for further investment projects [115].

Table 4 Distributional effects from generalized panel quantile regression

Interestingly, institutional quality positively influences domestic investment from the 10th to the 50th quantile. However, at the 75th and 90th quantiles, the effect turns negative and statistically significant. Contrary results propose that weak institutional quality may lead to arbitrary taxation policies, changes in fiscal regulations, and inadequate investor protection, creating financial instability and discouraging long-term investment planning [58, 59]. Based on our findings, we argue that strong institutions ensure legal certainty, protect investor rights, promote transparent governance, and minimize bureaucracy. This fosters a favorable climate for long-term investments, consequently driving economic growth.

Robustness with Drisc/Kraay and simultaneous quantile regression

In panel data analysis, where data are collected for multiple countries (N) over time, cross-sectional dependence arises when the error terms are not independent across countries. This means unobserved factors influencing domestic investment in one country might also be affecting investment in other SSA nations. Ignoring this dependence can lead to biased estimates and misleading conclusions [22, 97]. Regional economic shocks, policy contagion, and regional economic integrations demand accounting for cross-sectional dependence. Therefore, we applied the Drisc/Kraay estimator to account for CD in our study. The results are summarized and presented in Table 4 (see columns 5 and 6). The results from this estimator supported that debt is a negative predictor of investment, and institutional quality blocked the negative loopholes that enable the SSA region to enjoy the managerial and technological spillover effects of debt on investment, with evidence of threshold effects confirmed. The random effects chosen based on the Hausman test validated the above assertion. The alignment in our results using different estimators confirmed the validity of the policy recommended. A robustness check was conducted on the distributional effect of debt and institutional quality using simultaneous quantile regression, the results of which are presented in Table 5. These results closely align with those obtained using generalized quantile regression, with the negative influence of external debt on domestic investment at the lower quantiles (10th and 25th) being significant. However, the medium and long-term effects are negligibly negative. Furthermore, institutional quality acts as a negative driver of domestic investment at the 75th and 90th quartiles. The pattern observed is that external debt crowds out investment, while institutional quality moderates this negative effect, although significance is noted only at the 75th and 90th quantiles. The static threshold obtained from SGMM was subjected to further testing using panel dynamic threshold regression, and the results confirmed the existence of threshold effects (Table 6).

Table 5 Distributional effects from simultaneous quantile regression results
Table 6 Output of dynamic threshold estimator

Threshold effect of external debt and institutional quality on investment

The results displayed in Table 6 unveil crucial insights. In the lower regime, external debt exerts a negative and significant effect on investment at the 10% level, aligning with the crowding-in hypothesis. Conversely, in the upper regime, the crowding-out hypothesis is substantiated at the 1 percent level. This signifies that exceeding an external debt threshold of 46.616 has a deteriorating impact on investment in the SSA region, echoing the diminishing returns associated with high debt levels. Beyond this threshold, the escalating debt service burden diverts resources from productive investments. Additionally, at the lower regime, institutional quality negatively impacts investment but to a negligible extent. In contrast, at the higher regime, institutional quality becomes a positive and significant driver of investment at the 1% level. This underscores that institutional frameworks beyond − 1.174 on a scale of − 2.5 to 2.5 enhance investment. The rationale lies in the enhanced perception of reduced risks, improved property rights protection, smoother business operations, and better contract enforcement in an improved institutional environment. These conducive factors collectively amplify investment activities, resulting in the observed positive and highly significant effect. This argument finds robust support in previous studies [7, 57, 58]. Conversely, at the higher regime of institutional quality, external debt significantly drives investment negatively at the 1% level. In contrast, at the lower regime, debt crowds-in investment at the 10% level, contradicting the conclusions drawn by some existing authors [78]. The output from this research is a substantial contribution to the existing body of knowledge concerning the debt-institution-investment trilogy. We anticipate that forthcoming research seeking to enrich the current literature will greatly benefit from this empirical support.

Conclusions and policy implications

The relationship between external debt and economic growth has been extensively studied by researchers and policymakers. However, the link between external debt and domestic investment remains an underexplored area of research. Our study contributes to the existing body of research by examining the moderating role of institutional quality on the influence of external debt on domestic investment using a dataset of 47 SSA countries. We adopted two-step GMM and the Driscoll/Kraay estimator, which are robust to endogeneity and cross-sectional dependencies in panel data. The findings from our analysis reveal that the external debt stock of SSA countries crowds out investment in the region, and the magnitude of this effect is moderated by institutional quality. We argue that strong institutional quality enhances investor confidence and creates a conducive environment for investment, mitigating the negative impact of external debt. These findings underscore the importance of improving institutional quality in SSA to promote sustainable economic growth and investment. Furthermore, the dynamic threshold estimator reveals that domestic investment is enhanced when the institutional framework is above − 1.174. The heterogeneous effects of debt indicate that short-term effects of debt are favorable for investment, while the medium-term and long-term effects remain detrimental and highly significant.

The policy implications of this research are twofold. Firstly, there is a level of external debt that can be beneficial to investment; hence, governments of SSA countries should implement debt ceilings based on the identified threshold to avoid excessive borrowings, which could cripple investments. Also, improvements in institutional quality have a positive impact on investment, which will reduce borrowing, so policymakers in the SSA region should prioritize efforts to enhance institutional quality. This includes addressing corruption, strengthening the rule of law, and promoting political stability. These measures can help create a favorable investment climate and attract both domestic and foreign investors. Additionally, they should establish mechanisms for debt usage disclosure to build trust and allow inclusive development for improved institutional quality. Furthermore, cost–benefit analysis frameworks should be established before acquiring new debt, and alternative financing avenues like public–private partnerships or domestic resource mobilization should be explored. This framework will help develop targeted debt utilization while exploring funding sources beyond external debt can reduce exposure to external shocks.

The study has limitations in using aggregated institutional quality and external debt. Therefore, we recommend future research to check the disaggregated form of institutional quality to determine which one is more conducive to domestic investment. Additionally, future research can disaggregate debt into multilateral and bilateral external debt and examine their influence on domestic investments.