Semiparametric Panel Generalized Additive Models for Separate Forecasting of GDP Growth and Inflation in African Economies
Abstract
Reliable forecasts of GDP growth and price dynamics support macroeconomic monitoring and economic planning, particularly in heterogeneous African economies where macroeconomic relationships may vary across economic conditions. This study develops and evaluates separate semiparametric Panel Generalized Additive Models (Panel GAMs) to examine nonlinear conditional associations and forecast GDP growth and the inverse hyperbolic sine-transformed Consumer Price Index (IHS-CPI). We analyse quarterly panel data for 53 African economies covering 2005Q1–2025Q4. The models represent the effects of exchange rate, money supply, interest rate, and time using smooth functions while accounting for country-specific heterogeneity through country-level random effects. We evaluate out-of-sample forecasting performance against a Linear Mixed Model. The estimated smooth terms provide evidence of statistically significant nonlinear conditional associations for both GDP growth and IHS-CPI. The Panel GAM achieves adjusted R2 values of 0.230 for GDP growth and 0.709 for IHS-CPI, indicating stronger in-sample fit for IHS-CPI. For out-of-sample forecasting, the Panel GAM produces RMSE and MAE values of 3.465 and 2.027 for GDP growth and 1.669 and 1.211 for IHS-CPI, respectively, compared with 3.368 and 1.931 for GDP growth and 1.632 and 1.192 for IHS-CPI from the Linear Mixed Model. Thus, the Panel GAM does not achieve superior out-of-sample point-forecast accuracy relative to the Linear Mixed Model, although it provides a flexible framework for representing nonlinear conditional associations and country-specific heterogeneity.