Food Price Prediction in Nigeria: A Comparative Analysis of Linear Regression and Machine Learning Models to Analyze Subsector Price Interdependencies


Abstract

This study investigates the effectiveness of predictive performance of multiple modeling techniques in forecasting Nigeria’s Food Price Index (FPI) using monthly data from the Food and Agriculture Organization (FAO) Food Price Index spanning January 1990 to January 2025. Five major food subsector indices—Meat, Dairy, Cereals, Oils,and Sugar—serve as predictors. Initial regression on the raw series produced inflated R2 values, prompting diag‑nostic tests that revealed severe non‑stationarity and multicollinearity. These issues were addressed through a two‑step transformation: natural logarithmic conversion to stabilize variance, followed by first‑order differencing to achieve stationarity and eliminate false trends. Post‑transformation diagnostics confirmed full correction, with all variables stationary and multicollinearity reduced to acceptable levels. Using standardized log‑differenced data, five models were evaluated: Multiple Linear Regression, Artificial Neural Network, Random Forest, Support Vector Machine, and Long Short‑Term Memory (LSTM). On the transformed scale, the Support Vector Machine was the strongest performer; however, after back‑transforming predictions to the original scale through recursive exponential reconstruction, Random Forest achieved the highest accuracy (R2 = 0.9342, MAPE = 0.65%). LSTM models performed poorly, indicating a structural mismatch with differenced series lacking persistent trends. The study provides three methodological insights: (1) top performance on transformed data does not guarantee accuracy after inverse conversion; (2) log‑differencing is highly effective for resolving non‑stationarity, heteroscedasticity, and multicollinearity while preserving economic interpretability; and (3) ensemble averaging enhances recursive multi‑step forecasting stability. For practical policy applications requiring multi‑month food price projections, Random Forest is recommended, with Multiple Linear Regression serving as a transparent alternative for coefficient interpretation. These findings support the design of more informed food security interventions and market stabilization strategies in Nigeria.


References

Online ISSN: 2737-4777, Print ISSN: 2737-4785, Published by Nan Yang Academy of Sciences Pte. Ltd.