Introduction

The debate on the sources of growth continues to generate attention in the political and academic landscapes due to its relevance for policy formulations on welfare, international competition, and economic management. From the saving-oriented (Domar, 1947; Harrod, 1939) and technical progress neoclassical theories of economic growth (Solow, 1956) to the imperfect market-augmented endogenous growth theories of Romer (1990), Aghion and Howitt (1990), and Grossman and Helpman (1991), economists are still exploring which variables matter for growth. The need to identify the key drivers of economic growth has even become crucial than ever following the emergence of the coronavirus pandemic (IMF, 2020; World Bank, 2020). For developing economies such as those in sub-Saharan Africa (SSA), knowledge on the key drivers of economic growth is a great step in formulating and implementing policies to foster, sustain, and share growth. Additionally, identifying the key drivers of economic growth would be a giant breakthrough on the parts of policymakers and developing partners in mapping out growth strategies in line with the green growthFootnote 1 agenda of the region.

A plethora of prior contributions identifies covariates such as trade openness, foreign direct investment, and innovation (Agbloyor et al., 2014; Sakyi et al., 2015), financial development (Opoku et al., 2019; Peprah et al., 2019), macroeconomic management (Alagidede & Ibrahim, 2017), institutional quality (Berhane, 2018; Chakamera, 2018), human capital (Anyanwu, 2014; Gyimah-Brempong et al., 2006), and ICT (Adeleye & Eboagu, 2019; Asongu & Odhiambo, 2019) as drivers of economic growth in SSA. A conspicuous lacuna in the extant scholarship, however, is that, all these variables deemed crucial for economic growth are selected based on the researcher’s discretion even in large dataset regression problems. The concern with preferential selection of covariates is that, even tenuous drivers of growth may be deemed highly influential under certain assumptions, model specification, or estimation techniques. Another challenge is that, the preferential selection of covariates in the midst of several potential determinants of growth partly contributes to the inconclusive results in big data regression problems. Addressing this challenge and thus informing policy appropriately can be through the application of machine learningFootnote 2 (artificial intelligence) techniques for regularization, and inference (see Tibshirani, 1996; Zou & Hastie, 2005; Zou, 2006). Indeed, machine learning techniques have been applied in various fields, for example, in health (see Mateen et al., 2020; Doupe et al., 2019; Beam & Kohane, 2018), transportation (Bhavsar et al., 2017; Tizghadam et al., 2019), games and psychology (Sandeep et al., 2020; De Almeida-Rocha & Duarte, 2019; Luxton, 2016), and finance (Bredt, 2019; Bazarbash, 2019; Akbari et al., 2021).

Despite the rise in the application of machine learning techniques in several fields, rigorous empirical works exploring its applicability and power in selecting variables crucial for economic growth in SSA are hard to find. This fundamentally forms the contribution of this paper. The first objective, therefore, is to train several machine learning algorithms to identify the main drivers of economic growth in SSA. The second objective is to provide reliable estimates and confidence intervals for these main determinants of economic growth, taking into consideration possible endogeneity, multicollinearity, and modeling complexities. To the best of our knowledge, this study is the first of its kind in SSA to apply machine learning techniques in selecting the main drivers of economic growth. Particularly, following renewed efforts to achieve, sustain, and share growth gains in line with implementation of the African Continental Free Trade Area (AfCFTA) and the institution of the African Agenda 2063, our results could prove crucial to the course by aiding the planning, modeling, and the targeting of growth.

Our choice of the study area is informed by a number of factors. First, as Kaufman et al. (2010) note, SSA countries are fundamentally common in terms of institutions. Despite lags in several facets of governance such as the rule of law, regulatory quality, and corruption-control, the quality of these indicators, as the World Governance Indicators suggest, is rising steadily across the region. However, macroeconomic challenges relating to inflation, exchange rate fluctuations, macroeconomic bailouts, and geopolitical fragilities are common among countries in the region. Second, SSA countries are remarkably similar in terms of structural or real sector setting (OECD/ILO, 2019; UNCTAD, 2021; World Bank, 2021a). For instance, most of the region’s active workforce is employed in the agricultural sector and are more susceptible to political, financial, and trade shocks. Also worth mentioning is the common goal of SSA countries in using economic integrationFootnote 3 as a vehicle to spur industrialization, growth, poverty alleviation, and equitable income distribution. Another peculiarity is the low industrial output but fast rising service sector, providing policymakers with opportunities to leapfrog classical development processes (IMF 2020). Third, as noted by the African Development Bank (2018), countries in the region are markedly common in infrastructural development. Particularly, SSA countries report sharp deficits in digital and physical infrastructure such as ICT, electricity, transportation, as well as water and sanitation compared to their North African counterparts. Finally, countries in SSA are substantially similar in terms of growth trajectories, level of development, and lingering concerns of inability to build sustained growth momentum.

The rest of the paper is organized as follows: the next section presents a brief survey of economics-related studies applying machine learning. The data and empirical models are also presented in Sect. 3. The results and discussions are presented in Sect. 4 while Sect. 5 concludes with some policy recommendations.

Literature Survey on Empirical Works Using Machine Learning

The literature on economic growth is vast and an attempt to present all of them will be a daunting one. Therefore, attention is paid to the recent advances and applications of machine learning regularization techniques in the area of growth and development. For instance, this study is similar to Schneider and Wagner (2012) who focus solely on the lasso (least absolute shrinkage and selection operator) in determining the key drivers of growth in the NUTS2 regionFootnote 4 of the European Union over the period 1995–2005. The results indicate that covariates such as initial GDP per capita, human capital, and initial unemployment rate matter for economic growth.

Similarly, in identifying which income distribution measure matter for development outcomes, Dutt and Tsetlin (2016) applied the Elasticnet and the lasso techniques to select from 37 potential covariates of development. The authors find that the poverty headcount indicator matters most in predicting three development outcomes (i.e., per capita income, schooling, and institutional quality). A similar work is Tkacz (2001), which, in forecasting Canadian GDP growth, applied the neural network algorithms. The study finds that, relative to traditional methods such as the linear and univariate forecasting methods, neural network techniques yield lower forecast errors on annual growth rate. The author goes further to indicate that neural techniques perform better in forecasting long-term growth than short-term growth. Further, Richardson et al. (2021) explore the power of several machine learning techniquesFootnote 5 relative to classical methods in forecasting real GDP growth in New Zealand. The authors find that machine learning algorithms outperform classical statistical methods in prediction. Jung et al. (2018) also employ machine learning algorithms of lasso, ridge, Elasticnet, neural networks, and super learner to examine the GDP growth of the G7 countries. The authors provide strong evidence to conclude that machine learning algorithms outperformed standard prediction techniques.

In the case of SSA, however, the literature shows that researchers have not explored how relevant these techniques can be in aiding policymakers plan and target growth. The results we provide could prove invaluable in helping policymakers turn around the slow growth (real GDP per capita) trajectories of the SSA as presented in Figs. 1 and 8 in the Appendix.

Fig. 1
figure 1

Trend of GDP per capita across regions, 1990–2019. Source: authors’ construct using data from World Development Indicators

Literature Survey on Drivers of Economic Growth Based on Traditional Techniques

In this section, we present a survey of the literature on the effects of several covariates included in this study on economic growth. Using a dataset on 21 SSA countries for the period 2000–2014, Ngongang (2015) employed the dynamic GMM technique to examine the relationship between financial development and economic growth. The author finds a significant positive relationship between the variables. In the same way, Ibrahim and Alagidede (2018) use a panel dataset spanning 1980–2014 for 29 SSA countries to examine the conditional and unconditional effects of financial development in economic growth. The results suggest that while financial development has a positive impact on economic growth, the joint effect of financial development and investment is rather remarkable. Kodongo and Ojah (2016) also explore the link between infrastructure and economic development in SSA countries. The results, which are based on system GMM estimator and a dataset on 45 SSA countries for the period 2000–2011, show that relative to middle-income countries, infrastructure plays a salient role in the economic development of least developed countries.

Omoteso and Mobolaji (2014) also apply the panel fixed effect, random effect, and the maximum likelihood estimation techniques to test the linear relationship between governance and economic growth in some selected SSA countries for the period 2002 to 2009. The authors find strong evidence to conclude that while political stability and regulatory quality enhance growth, government effectiveness adversely affect economic growth. Using a panel of 27 countries in SSA, Kebede and Takyi (2017) also employed the panel causality and system GMM estimation techniques to examine the relationship between institutional quality and economic growth. While the authors find a unidirectional causality from economic growth to institutional quality, the reverse does not hold. The results further show that institutional quality, trade openness, financial development, and debt positively affect economic growth.

In exploring the link between government expenditure and economic growth, Olaoye et al. (2020) apply the system GMM and the Driscoll and Kraay estimator to examine the asymmetrical phenomenon in government spending and growth relationship in 15 ECOWAS countries. Aside from confirming the asymmetric link between government spending and economic growth, the authors find evidence of an inverted U-shaped connection between government spending and economic growth. Also, Adams and Opoku (2015) investigate the effect of FDI on economic growth using a panel of 22 SSA for the period 1980–2011. The authors find evidence from the GMM estimator to show that although unconditionally FDI does not drive economic growth, the joint effect of FDI and regulations is positive and statistically significantly. Adams et al. (2016) also examine the link between energy consumption and economic growth, and the modulating role of democracy using a panel data of 16 SSA countries from 1971 to 2013. The study provides evidence from the panel vector autoregressive model to show that energy consumption enhances economic growth in the region. The study further finds that the joint effect of democracy and energy consumption on economic growth is positive and significant.

In addition, Adams and Klobodu (2016) assess the effect of remittances and regime change on economic growth for 33 SSA counties over the period 1970–2012. Their results from the system GMM estimation technique show that while remittances do not significantly affect growth, regime change suppresses growth. The study concludes that the growth-enhancing effect of remittances is amplified in the presence of a democratic and stable government. Appiah-Otoo and Song (2021) also use a panel of 123 countries composed of 45 high-income countries, 58 middle-income countries, and 20 low-income countries for the period 2002–2017 to examine the impact of ICT on economic growth. The authors provide strong evidence that the effect of ICT diffusion on growth across rich and poor countries is significantly different and that poor countries tend to gain more from the ICT innovations. Employing a panel dataset on 20 African countries, Akadiri and Akadiri (2018) applied the fixed effect estimator to test the relationship between growth and income inequality, on the one hand, and the pathway through which growth determinants influence income inequality for the period 1991 to 2015. The study finds evidence of positive long-run relationship between income inequality and growth. The study further reveals that population growth, mortality rate, government consumption expenditure, and foreign direct investment are principal determinants of the long-run growth and income inequality in the sampled countries.

In the same vein, Mavikela et al. (2019) examined the effect of inflation on economic growth for South Africa and Ghana with data over the period 2001 to 2016. Evidence from the quantile regression shows that while high inflation is positively related with growth in Ghana, it is the opposite in the case of South Africa. The study further shows an adverse effect of inflation at all threshold levels on growth in the post 2008/2009 global financial crisis.

Data and Methodology

Data

The study employed a large balanced panel spanning 1980–2019 for the analysis. The study sampled 42 SSA countriesFootnote 6 on grounds of data availability. The outcome variable, economic growth, is the annual real GDP growth rate and is drawn from the World Development Indicators (World Bank, 2021b). Data on 113 potential drivers of growth are considered based on the extant scholarship on economic growth. Taking into consideration the real sector of the economies under consideration, variables such as vulnerable employment, inflation, and self-employment are considered (Bittencourt et al., 2015; Barro, 2013). Likewise, we include variables such as trade openness, and tariff considering the rise in economic globalization of SSA following the implementation of the AfCFTA and the projected rise in FDI inflow to the region in 2022 (UNCTAD, 2021; OECD/ACET, 2020). The essence of economic integration for growth in marginalized settings like SSA rests in the classical trade argument that it can foster social progress and the contemporary view that trade is essential for innovation diffusion, technological transfer, global value chain participation and export diversification (Asongu & Odhiambo, 2019; Asongu & Nwchukwu, 2016; Sakyi et al., 2015; Adams & Opoku., 2015).

Variables such as financial development and infrastructure are also considered due to their contribution to growth through resource allocation and the facilitation of economic activities (Koomson et al., 2020; Opoku et al., 2019; Peprah et al., 2019, African Development Bank, 2018). We source data on financial development from the World Bank’s Global Financial Development Database (Čihák et al., 2013) and the International Monetary Fund’s financial development index (Svirydzenka, 2016). Also, the study includes welfare variables of poverty and inequality due to their prevalence in the selected countries despite gains chalked in recent years and the fact that such developments waste human capital, consequently dragging down growth.

Data on poverty and inequality are sourced from the World Bank’s Poverty and Equity Database, and the Global Consumption and Poverty Project (Lahoti et al., 2016), while that of globalisationFootnote 7 is drawn from the Konjunkturforschungsstelle (KOF) index (Gygli et al., 2019). Per empirical evidence on the contribution of institutions and policy to growth, we consider country policy and institutional scores on macroeconomic management, trade policy, social protection, social inclusion, and financial sector management (Akobeng, 2016; Anyanwu, 2003; Asongu & Gupta, 2015; Asongu & Nwachukwu, 2017; Fosu, 2012). Also, we consider ICT skills, access, and usage given the momentous rise in the digital infrastructure of the region (Appiah-Otoo & Song, 2021; Tchamyou et al., 2019; Adeleye et al., 2019). The definitions and sources of all the variables are reported in Table 1.

Table 1 Variable definition and data sources

Estimation Strategy

The empirical focus of this paper is in two parts. The first part is dedicated to the specification of the variable selection techniques while the inferential models are presented in the second part. In line with the objectives of the study, we do not employ traditional panel data estimation techniques for the analysis. For instance, the panel least squares estimator is inappropriate as it cannot explicitly perform variable selection from the 113 potential drivers of growth. Second, traditional methods such as the panel corrected standard errors and generalized method of moments cannot be relied upon as the presence of more predictors can cause the required matrix (\({X}^{^{\prime}}X\)) to be invertible. Even if it is possible, the presence of too many covariates may cause overfitting. In the presence of overfitting, although the attendant estimates are not biased, they are less efficientFootnote 8 (James et al., 2013). This is due to the fact that as the covariates become large, least squares assumptions of no multicollinearity, homoscedasticity, and exogeneity typically break down, therefore overfitting the model. This causes the out of sample error to increase, making inference and predictions flawed (James et al., 2013).

Addressing this econometric concern can be through the application of machine learning regularization techniques, which are effective for variable selection regardless of the number of covariates, model specification, nonlinearity, and time (Tibshirani, 1996). In this study, therefore, we train recent machine learning regularization algorithms to learn patterns in the underlying dataset to identify the main drivers of economic growth. Regularization is done by utilizing the bias-variance trade-off, where a tuning parameter (i.e., the bias) is introduced to reduce the variance associated with large datasets and consequently yield sparse estimates. In specifics, we train algorithms for four alternative shrinkage models—the first three from the lasso family (i.e., the Standard lasso, the minimum Schwarz Bayesian information criterion lasso, and the Adaptive lasso) and the Elasticnet to achieve the first objective.Footnote 9 Next, we perform causal inference on the selected covariates in objective 1 by running the lasso inferential models of double-selection linear lasso, partialing-out lasso linear regression, and partialing-out lasso instrumental variable regression to address objective 2. To this end, the STATA (version 16) and R (version 3.6) software are employed. The latter is employed primarily for data engineering and descriptive purposes while the data partitioning, regularization, and inferential estimates are carried out using the former.

Specification of Regularization Models

Specification of Standard Lasso and Minimum BIC Lasso Models

To address the ineffectiveness of traditional regression techniques in variable selection, Tibshirani (1996) introduced the standard lasso. Like other shrinkage techniques, the main advantages of the Standard lasso are that it (1) enhances the model interpretability by eliminating irrelevant variables that are not associated with the response variable; (2) enhances prediction accuracy, because shrinking and removing irrelevant predictors can reduce variance without a substantial increase in the bias; and (3) is limitless to data dimensionality.

In line with objective 1 of this study, the Standard lasso is applied to select the key drivers of economic growth by penalizing the model coefficients through a tuning parameter (λ) (Tibshirani, 1996; Belloni & Chernozhukov, 2014). Following Tibshiran (1996), we specify the objective function for the Standard lasso as shown in Eq. (1). For the Standard lasso algorithms to detect the key predicators of economic growth from a pool of several possible predictors, the penalty (\(\lambda \sum_{j=1}^{\rho }|{\beta }_{j}|\)), also referred to \({\mathcal{l}}_{1}\)-norm, is introduced to obtain \({\widehat{\beta }}_{lasso}\) defined in Eq. (2):

$${Q}_{L}=\frac{1}{N}\sum\textstyle_{i=1}^{N}{\omega }_{i}f\left({y}_{it}, {\beta }_{0}+{X}_{it}{\beta }^{^{\prime}}\right)+\lambda \sum\textstyle_{j=1}^{p}{k}_{j}|{\beta }_{j}|$$
(1)
$${\widehat{\beta }}_{lasso}=min\left\{SSE+\lambda \sum\textstyle_{j=1}^{\rho }|{\beta }_{j}|\right\}$$
(2)

where \({y}_{it}\) is economic growth in country i in year t and \({X}_{it}\) is a vector of all the possible predictors of economic growth. The objective, therefore, is the minimization of the model sum of square errors with a given \({\mathcal{l}}_{1}\)-norm. It is imperative to point out that if the tuning parameter, \(\uplambda =0\), then we have a full model as in the least square estimator, while \(\uplambda \to \infty\) is an intercept-only model. For brevity, we indicate that the specification of the minimum BIC lasso follows that of the Standard lasso with the same penalty and objective function but variable selection is based on the model with the least BIC (Schwarz, 1978). Some known drawbacks of these techniques are that, they (1) may become inconsistent as features grow rapidly and (2) are unable to perform hypothesis tests.

Specification of Adaptive Lasso Model

To enhance the consistency of regularization, Zou (2006) introduced the adaptive lasso technique, which in addition to the \({\mathcal{l}}_{1}\)-norm penalty, adds the oracle property (\({z}_{j}\)). Relative to the Standard lasso, the oracle property enhances shrinkage or subset selection even when data attributes grow faster than the number of observations. In this study, we employ the Adaptive lasso technique as an alternative to the Standard lasso and minimum BIC lasso in addressing objective 1. Following Zou (2006), we minimize the objective function in (3) by applying the Adaptive lasso estimator (\({\widehat{\beta }}_{AdaptiveLasso}\)) specified in Eq. (4):

$${Q}_{L}=\frac{1}{N}\sum\textstyle_{i=1}^{N}{\omega }_{i}f\left({y}_{it}, {\beta }_{0}+{X}_{it}{\beta }^{^{\prime}}\right)+\lambda \sum\textstyle_{j=1}^{p}{k}_{j}|{\beta }_{j}|$$
(3)
$${\widehat{\beta }}_{AdaptiveLasso}=min\left\{SSE+\lambda \sum\textstyle_{j=1}^{\rho }{z}_{j}|{\beta }_{j}|\right\}$$
(4)

where \({y}_{it}\) is the outcome variable (economic growth) in country i in year t, \({X}_{it}\) is a vector of all 113 covariates of economic growth, and \({\beta }^{^{\prime}}\) are the attendant parameters.

Specification of Elasticnet Model

The Elasticnet method draws on the strengths of the Standard lasso and ridge regression by applying the \({\mathcal{l}}_{1}\) and \({\mathcal{l}}_{2}\) penalization norms. The strength of the Elasticnet is that in highly correlated covariates, it can produce sparse and consistent regularization than the lasso family algorithms (Zou & Hastie, 2005). Also, with the application of the \({\mathcal{l}}_{1}\) and \({\mathcal{l}}_{2}\) penalization norms, the Elasticnet becomes flexible in subset selection. To perform variable selection, the Elasticnet estimator minimizes the objective function:

$${Q}_{en}=\frac{1}{N}\sum\textstyle_{i=1}^{N}{\omega }_{i}f\left({y}_{it}, {\beta }_{0}+{X}_{i}{\beta }^{^{\prime}}\right)+\lambda \sum_{j=1}^{p}{k}_{j}\left\{\frac{1-\alpha }{2}{\beta }_{j}^{2}+|{\beta }_{j}|\right\}$$
(5)

where \({y}_{it}\), \({X}_{i}\), and \({\beta }^{^{\prime}}\) are as defined in previous sections and α is an additional Elasticnet penalty parameter,Footnote 10 which takes on values only in [0,1]. That is, sparsity occurs when 0 < α < 1 and λ > 0. This implies that in special cases, the Elasticnet plunges into either the ridge estimator (i.e., when λ = 0) or the Standard lasso estimator (i.e., when λ = 1).

Choice of Tuning Parameter

A fundamental concern regarding variable selection is the choice of the tunning parameter (λ). A good value of λ is essential for the overall performance of regularization models as it controls the strength of shrinkage and the concomitant prediction and inference (Schneider & Wagner, 2012). Among the widely used methods for choosing an efficient λ are cross validation (CV), Bayesian information criterion (BIC), and Akaike information criterion (AIC) (Tibshirani & Taylor, 2012). But it needs to be pointed out that if regularization becomes too strong, relevant variables may be omitted and coefficients may be shrunk excessively. Therefore, information criteria such as the BIC and AIC might be preferable to CV, since they are faster to compute and are less volatile in small samples (Zou et al., 2007). However, to the extent that setting λ under a researcher’s discretion can yield “target sparsity” and harm both predictive capacity and inferences (Hastie et al., 2019), we rely on BIC and CVFootnote 11in determining λ.

Specification of Lasso Inferential Models

Since the aforementioned variable selection techniques do not provide estimates and confidence intervals essential for inference,Footnote 12 we apply the lasso inferential techniques to provide robust estimates on the selected predictors of economic growth. In specifics, we run the double-selection lasso linear model (DSL), the partialing-out lasso linear regression (POLR), and the partialing-out lasso instrumental variable regression (POIVLR) using the selected covariates in objective 1 as the variables of interest and the unselected (redundant) variables as controls.

It is imperative to note that due to the sparsity of the regularization techniques, the control variables are usually many. In view of this, the lasso inferential models consider these controls as irrelevant, and therefore, their inferential statistics are not reported. However, the number of relevant controls and instruments are indicated as part of the general regression statistics. Further, unlike the variables of interest, which the researcher has no flexibility of adding or excluding from model, the researcher can indicate the number of controls in the model.Footnote 13 The strength of these models is that they are built to produce unbiased and efficient estimates irrespective of data dimensionality, model specification, and multicollinearity.

Double-Selection Lasso Linear Model

In line with the second objective, we follow Belloni et al. (2014) by specifying the double-selection lasso (DSL) linear model as:

$$E\left[Y|d,x\right]=\psi {\alpha }^{^{\prime}}+{\phi \beta }^{^{\prime}},$$
(6)

where y is economic growth and is modeled to depend on \(\psi\), containing J covariates of interest (i.e., the Elasticnet or lasso selected key drivers of economic growth) and \(\phi\), which contains \(p\) controls (i.e., the weak drivers of economic growth). The DSL estimator produces estimates on \(J\) while relaxing the estimates for \(p\).

Partialing-Out Lasso Linear Regression

In reference to the DSL, an added advantage of the partialing-out lasso linear regression (POLR) is that it enhances the efficacy of inference as the model becomes too complex. Following Belloni et al. (2012) and Chernozhukov et al. (2015), we specify the POLR estimator as:

$$E\left[Y|d,x\right]=d{\alpha }^{^{\prime}}+{X\beta }^{^{\prime}},$$
(7)

where \(y\) is outcome variable (economic growth), \(d\) is a vector containing the \(J\) predictors of interest (i.e., the nonzero selected covariates of economic growth), and \(X\) contains the \(p\) controls (i.e., the unselected predictors of economic growth). Like the DSL, the POLR yields estimates, standard errors, and confidence intervals on the \(J\) covariates while relaxing that of the \(p\) controls.

Partialing-Out Lasso Instrumental Variable Regression

In large data regression problems like this study, sources of endogeneity abound largely due to bi-causality. For example, endogeneity can arise from the argument articulated in the supply-leading and demand-following hypotheses concerning financial development and economic growth (King & Levine, 1993). To address this, we follow Chernozhukov et al. (2015) by performing a partialing-out lasso instrumental variable regression (POIVLR). The POIVLR is specified as:

$$y=\Psi {\alpha }_{d}^{^{\prime}}+\Phi {\alpha }_{f}^{^{\prime}}+{X\beta }^{^{\prime}}+ \varepsilon ,$$
(8)

where \(y\) is economic growth;\(\Psi\) comprises \({J}_{d}\) endogenous covariates of interest; \(f\) contains the \({J}_{f}\) exogenous covariates of interest; and \(X\) contains \({\mathcal{p}}_{x}\) controls. Allowing for potential endogeneity primarily due to simultaneity, \({\mathcal{p}}_{z}\) outside instrumental variables denoted by \(z\) that are correlated with \(d\) but not with \(\varepsilon\) are introduced. As aforesaid, the simultaneity between financial development and economic growth presents endogeneity concerns which are addressed using the \(z\) instruments.Footnote 14 Theoretically, the controls and instrument can grow with the sample size; however, \(\beta\) and nonzero coefficients in \(z\) must be sparse.

Data Engineering and Partitioning

One of the key requirements of effective regularization is that the underlying dataset is strongly balanced. To this end, we employ the K-nearest neighbor (KNN) data imputation technique to address missing observations, particularly for variables such as the policy and institutional indicators (see Fig. 10). The KNN follows the principle that developments regarding variables drawn from a similar population exhibit similar properties (Van Hulse & Khoshgoftaar, 2014). In principle, the KNN selects the nearby neighbors based on a distance metric and estimates the missing observation with the attendant mean or mode. It is worth noting that while the mean rule is used to address missing observations in numerical variables, the latter is employed to address missing observations in categorical variables (Pan et al., 2015). Per this principle, this study relies on the mean rule, which uses the Minkowski distance as specified in Eq. (9) in addressing the missing observations.

$$d\left(i,j\right)={({\left|{x}_{i1}-{x}_{j1}\right|}^{q}+{\left|{x}_{i2}-{x}_{j2}\right|}^{q}+\dots +{\left|{x}_{i\rho }-{x}_{j\rho }\right|)}^{q}}^{1/q},$$
(9)

where \(q\) is the Minkowski coefficient, \(d\left(i,j\right)\) is the Minkowski distance for observations i and j, and \(x\) are the variables. That said, we follow Ofori et al. (2022) by partitioning the dataset into two parts—the training set (70%) and testing test (30%) samples. We do this by applying the simple random and stratified data splitting techniques. In line with Ofori et al. (2022), we take cues from James et al. (2013) that among all other possible sets, the 70–30 and 80–20 splits are the data partitioning sets allowing reasonable representation of all variables in both the training and testing samples.

Presentation and Discussion of Results

Exploratory Data Analysis

For brevity, the exploratory data analysis is limited to the data partitioning results,Footnote 15 the distribution of economic growth, and the summary statistics. Information gleaned from the summary statistics in Table 2Footnote 16 shows an average economic growth (i.e., real GDP growth rate) value of 3.58 percent in the training set as compared to 3.95 percent in the testing set. Also, the average trade openness value as a percentage of GDP is 67.48 in the training set compared to 66.85 percent in the testing set. Additionally, we observe a mean unemployment rate of 7.58 percent in the training set compared to 7.68 percent in the testing set. It is also evident from Table 2 that the average transparency, accountability, and corruption score of 2.81 and 2.8 in the training and testing sets, respectively. Finally, Fig. 9 in the Appendix shows that 99.9 percent observations were present in the dataset before the data imputation (see the data engineering results in Fig. 10 in the Appendix).

Table 2 Summary statistics for training and testing sets

Data Partitioning and Distribution of Economic Growth

A major decision regarding regularization is the form the outcome variable takes—either level or log transformed. On the latter, the distribution of economic growth as we show in Fig. 2 (right) is right-skewed. However, at level, as shown in Fig. 2 (left), economic growth is more symmetric and less heavy-tailed. At the backdrop that skewed distribution can have dire implications for regularization and the attendant inferential statistics, we run our shrinkage models using economic growth at level. Further, though non-standardization of covariates of economic growth does not constrain regularization, it is essential for ensuring the internal consistency of the data and comparability of the covariates. In view of this, the standardize option is invoked.

Fig. 2
figure 2

Distribution of economic growth at level (left) and its log-transformation (right)

On data partitioning, we perform a 70–30 split of the dataset using the stratified method (see Fig. 3 (left)). Additionally, in checking the reliability or consistency of the stratified split, we run the simple random data splitting technique, which yields similar results (Fig. 3 (right)).

Fig. 3
figure 3

Data partitioning plot (base R method), training (black), and test (red)

Regularization Results on the Main Drivers of Economic Growth in SSA

In this section, the results for the first objective are presented. As we show from Figs. 4, 5, 6 and 7 the lassos and Elasticnet algorithms select different non-zero coefficients (i.e., predictors) of economic growth. We find that the Standard lasso selects 12 covariates as key drivers of economic growth under a ten-fold cross-validation tuning parameter (\(\uplambda\)) value of 0.33 (see Fig. 4). Further, the Adaptive lasso selects only 10 covariates from the total 113 as chief drivers of economic growth in SSA with a tuning parameter (\(\uplambda\)) value of 0.24. Similarly, we find a special case for the Elasticnet regularization as it selects covariates based on a minimum cross-validation lambda of 0.33 and a minimum cross-validation alpha of 1. While the Elasticnet plunges into the Standard lasso (i.e., selects 12 non-zero predictors), we find a sparser regularization in the minimum BIC lasso as it selects only 7 covariates of the total 113.

In Table 3, a detailed output of how covariates enter and leave the respective shrinkage models is presented. The results from the minimum BIC lasso, which yields the best regularization indicates that the key drivers of economic growth in SSA are manufacturing (value addition), population, financial development, government spending, macroeconomic management, globalization, and social inclusion. The appropriateness of the results is evident in the post-estimation tests of cross-validation and coefficient path plots associated with each model (Figs. 45, 6 and 7).

Fig. 4
figure 4

Cross-validation plot (left) and coefficient path plot (right) for standard lasso

Fig. 5
figure 5

Cross-validation plot (left) and coefficient path plot (right) for minimum BIC lasso

Fig. 6
figure 6

Cross-validation plot (left) and coefficient path plot (right) for ElasticNet

Fig. 7
figure 7

Cross-validation plot (left) and coefficient path plot (right) for adaptive lasso

Table 3 Variable selection in regularization models

Inferential Results for the Main Drivers of Economic Growth in SSA

In this section, the estimates on the 7 covariates of growth identified in objective 1 are provided. The results, which are reported in Table 4 are based on the DSL, POLR, and POIVLR estimation techniques, meaning that they are robust to heteroskedasticity, endogeneity, and model misspecification. To inform policy appropriately, we run three separate results for the (i) full sample, (ii) low-income countries, and (iii) middle- and high-income countries.

Table 4 Lasso estimates on the main drivers of economic growth in sub-Saharan Africa

To begin with, we find that manufacturing value addition matters for economic growth in SSA. The results show that a 1 percent increase in manufacturing value addition boosts economic growth by 0.06 percent. Across the low-income and middle-income divide, however, we find that manufacturing value addition is significant only in the case of the former. The evidence suggests that with appropriate economic governance, it is low-income countries that can make remarkable strides in economic growth through enhanced manufacturing value addition considering the implementation of the AfCFTA. This is more so as improvement in manufacturing can spur forward and backward linkages as well as global value chain participation.

Further, the results show that although financial development is directly related to economic growth in both low-income and middle-income countries, it is statistically significant only in the former. In terms of magnitudes, the results suggest that for every 1-point increase in financial development, economic growth rises by 0.14 percent in low-income countries. The effect of financial development is remarkable, suggesting that access to financial products and services can propel the huge informal sector of low-income countries to realize their innovative and entrepreneurial objectives. This is more so considering the fact that lags in financial access are glaring in the low-income countries compared to middle-income countries.

Additionally, we find that economic globalization drives economic growth in SSA. In the remit of low-income and middle-income countries, however, we find that economic integration matters for growth only in the case of the latter. The plausible explanation for this is that, relative to low-income countries, middle-income countries have made remarkable strides in developing their manufacturing base, coupled with a good absorptive capacity that can enable them to gain significantly from economic globalization. Albeit statistically insignificant, the positive relationship between growth and economic globalization for low-income countries provides sheer optimism considering the implementation of the AfCFTA and the expected rebound of FDI to Africa from 2022.

The result on economic globalization is linked to the remarkable finding on macroeconomic management. There is strong empirical evidence to show that every 1-point increase in the score of macroeconomic management boosts economic growth by 0.73 percent (column 3). This result is even strong (i.e., 0.82%) in the case of low-income countries (column 6). Indeed, one of the major problems of the region has been poor macroeconomic management often resulting in bailouts by foreign institutions.Footnote 17 Although these bailouts have proved effective in propelling beneficiary countries toward prudent macroeconomic management paths, gains are mostly disrupted following exist, signifying the need for sustained commitment to fiscal and monetary discipline in SSA.

Also, we find that government expenditure is instrumental for economic growth in SSA. The result shows that a 1 percent increase in government expenditure boosts economic growth by 0.06 percent. However, this evidence is only significant in low-income SSA countries. A possible explanation for this is that, in middle-income countries, a high percentage of government expenditure goes into the recurrent expenditure compared to capital expenditure.

Moreover, we find that urban population matters for economic growth in the SSA. Additionally, the result reveal that urbanization is effective in fostering growth in the low-income countries compared to middle-income countries. This evidence appeals to logic in that economic activities driving growth in low-income SSA countries are mostly concentrated in urban centers. The result is in line with a World Bank (2009) report which argues that urban concentration is crucial in fostering growth in economies at the early stages of development. There is also the supporting evidence of gains from urbanization in that it reduces poverty and inequalities in opportunities, services, assets (Sekkat, 2017), and income inequality (see Oyvat, 2016).

Also, we provide strong empirical evidence to show that improving the coverage of social inclusion polices promotes economic growth in SSA by 3 percent (column 3). The result suggests that rolling out social intervention programs can propel SSA countries towards sustained growth trajectories. This is more so as social inclusion policies can build private sector capacity to withstand socioeconomic shocks. This is however not effective for growth in the low-income countries. This is also possible since institutions for developing human capital in these settings are weak, thereby providing little or no growth gains for such expenditure.

Conclusion and Policy Recommendations

The study contributes to the economic growth literature on SSA by employing recent advances in machine learning to identify the key drivers of growth. In doing so, we train algorithms for four machine learning regularization models—the Standard lasso, the minimum BIC lasso, the Adaptive lasso, and the Elasticnet based on a dataset spanning 1980–2019 for 42 African countries. Our results show that machine learning techniques are powerful and effective in reducing model complexities associated with large-data regression problems. In this study, while both the Standard lasso and Elasticnet techniques select 12 covariates as the main determinants of economic growth, the minimum BIC lasso selects only 7 out of the total 113 possible predictors. The uniqueness of the study is that it presents policymakers interested in the SSA growth agenda, variables to target to foster and sustain growth. These variables are manufacturing (value addition), urban population, financial development, government spending, macroeconomic management, economic globalization, and social inclusion.

For middle-income SSA countries, we suggest the following recommendations. First, in line with the implementation of the AfCFTA and the green growth agenda of the SSA, it is recommended that policymakers invest strategically in the manufacturing sectors of their economies. This can prove crucial in turning around the slow growth trajectories of the region as economic globalization can spur the industrialization through forward and backward linkages, innovation diffusion, and global value chain participation. Policymakers are therefore advised to build the technical workforce of their economies to make sense of the knowledge and innovation transfers associated with economic integration. Second, to improve the ability, opportunities, and dignity of the marginalized to contribute meaningfully to national development, policymakers are to invest strategically in areas such as health, education, and vocational training. This is more so as ICT diffusion can reduce inequalities in accessing information and high cost of accessing opportunities due to polarization of administrative procedures in the SSA.

For low-income countries, efforts should be made to develop the financial sector. This could prove crucial for efficient resource allocation, which can be a gamechanger in spurring the industrialization agenda of the region thorough competition, innovation, dynamism, and enhanced global value chain participation. Resources should thus be channeled towards the development of payment system platforms and services, financial innovation, and information flow on consumers. In this regard, institutions interested in SSA’s development agenda such as the African Development Bank, the IMF, and the World Bank should provide technical and logistical support to aid the transformation of the region’s predominantly low productive informal sector to a more dynamic, highly competitive and export-oriented one.

Additionally, we recommend that policymakers commit to prudent macroeconomic management. We reckon that in a setting like SSA where vulnerabilities are widespread, sound macroeconomic management will prove momentous in mitigating the welfare setbacks imposed by socioeconomic shocks (e.g., Covid-19) while lessening the impact of future ones. This also calls for the need to channel resources into productive expenditure like infrastructure and energy supply, which could contribute to ensuring that economic globalization propel these countries sustained growth trajectories.

The study leaves room for future works. First, considering the contributions this study makes through machine learning techniques, the academic community can also draw on similar techniques, for instance, to identify factors key for analyzing poverty and inequality. Second, these techniques can be employed to examine whether the growth-globalization relationship we find differs between landlocked and non-landlocked countries. Finally, considering the green growth agenda of the continent, regularization techniques can be employed to determine whether durable shared growth is driven largely by environmental factors or income growth and distributions.