Enhancing Vector Autoregression with Machine Learning Techniques for Causal Analysis of Macroeconomic Indicators in African Economies

R. N. Okafor *

Department of Statistics, Faculty of Physical Sciences, Nnamdi Azikiwe University, Awka, Nigeria.

H. O. Obiora-Ilouno

Department of Statistics, Faculty of Physical Sciences, Nnamdi Azikiwe University, Awka, Nigeria.

J. O Odum

Department of Statistics, Faculty of Physical Sciences, Nnamdi Azikiwe University, Awka, Nigeria.

*Author to whom correspondence should be addressed.


Abstract

Africa exhibits a wide variation in macroeconomic performance reflecting differences in economic diversification, natural resource dependence, governance systems, political stability, and exposure to global economic cycles. This study investigates the dynamic interactions among key macroeconomic variables, annual inflation rate, exchange rate, foreign direct investment (FDI), and government final expenditure, across eight African economies: Nigeria, South Africa, Egypt, Angola, Morocco, Ethiopia, Tanzania, and Mozambique. Using annual data spanning 1990 to 2024 obtained from the World Development Indicators (WDI), the study employs Vector Autoregression (VAR) models and extends them by integrating machine learning architectures, specifically Random Forest (RF), Multilayer Perceptron (MLP), and XGBoost, to develop VAR–machine learning hybrid forecasting models. The comparative performance of the baseline VAR and hybrid models is evaluated using Mean Absolute Error (MAE) and Root Mean Square Error (RMSE). The findings show substantial forecasting accuracy improvements when machine learning components are incorporated into the VAR framework. For inflation, the VAR+MLP model achieves the most significant reduction in forecasting errors in Nigeria, South Africa, and Morocco, with South Africa’s MAE decreasing from 1.471 (VAR) to 0.888 under the hybrid model. Similarly, FDI predictions improve markedly across nearly all countries, with Tanzania exhibiting a major decline in MAE from 0.534 (VAR) to 0.184 (VAR+XGBoost). For government expenditure, hybrid models outperform VAR in Angola, South Africa, Morocco, and Cameroon, while exchange rate dynamics show mixed outcomes, with traditional VAR excelling in more stable economies such as Nigeria and Morocco. The results demonstrate that hybrid VAR–machine learning models more effectively capture nonlinear macroeconomic relationships and yield superior predictive performance for inflation and FDI, underscoring their relevance for economic planning and policy formulation in African economies.

Keywords: Vector autoregression, machine learning, macroeconomic variables, hybrid models, Africa


How to Cite

Okafor, R. N., H. O. Obiora-Ilouno, and J. O Odum. 2026. “Enhancing Vector Autoregression With Machine Learning Techniques for Causal Analysis of Macroeconomic Indicators in African Economies”. Asian Journal of Probability and Statistics 28 (2):80-101. https://doi.org/10.9734/ajpas/2026/v28i2868.

Downloads

Download data is not yet available.