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

Mohammad Shahfaraz Khan

College of Economics and Business Administration, University of Technology and Applied Sciences‑Salalah, Salalah 211, Oman

Amir Ahmad Dar

Department of Statistics, Lovely Professional University, Phagwara 144411, India

Chinyere Perpetua Okechukwu

Department of Statistics, Lovely Professional University, Phagwara 144411, India

Mohammed Wamique Hisam

College of Commerce and Business Administration, Dhofar University, Salalah 211, Oman

Imran Azad

College of Economics and Business Administration, University of Technology and Applied Sciences‑Salalah, Salalah 211, Oman

Aseel Smerat

Faculty of Educational Sciences, Al‑Ahliyya Amman University, Amman 19328, Jordan

Murtaza M. Junaid Farooque

College of Commerce and Business Administration, Dhofar University, Salalah 211, Oman

DOI: https://doi.org/10.36956/rwae.v7i2.2820

Received: 10 October 2025 | Revised: 5 December 2025 | Accepted: 21 December 2025 | Published Online: 12 June 2026

Copyright © 2026 Mohammad Shahfaraz Khan, Amir Ahmad Dar, Chinyere Perpetua Okechukwu, Mohammed Wamique Hisam, Imran Azad, Aseel Smerat, Murtaza M. Junaid Farooque. Published by Nan Yang Academy of Sciences Pte. Ltd.

Creative Commons LicenseThis is an open access article under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) License.


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.

Keywords: Food Price Forecasting; Log‑Differencing; Multiple Linear Regression; Random Forest; Support Vector Machine; LSTM


References

[1] Akande, E.O., Akanni, E.O., Taiwo, O.F., et al., 2022. Predicting Inflation Component Drivers in Nigeria: A Stacked Ensemble Approach. SN Business & Economics. 3(1), 9.

[2] Nwafor, M., Lodugnon‑Harding, J., Tuyishime, C., et al., 2025. Nigeria Food and Agriculture Policy Monitoring Review: FAO Monitoring and Analysing Food and Agricultural Policies Programme. Food and Agriculture Organization: Rome, Italy.

[3] National Bureau of Statistics, 2021. Labor Force Statistics: Unemployment and Underemployment Report (Q4 2020). National Bureau of Statistics: Abuja, Nigeria.

[4] Shan, S., 2024. Identification of Socioeconomic Factors Influencing Global Food Price Security Using Machine Learning. arXiv preprint. arXiv:2403.04231. DOI: https://doi.org/10.48550/arXiv.2403.04231

[5] Ikuemonisan, E.S., Akinbola, A.E., 2021. Future Trends in Cassava Production: Indicators and Its Implications for Food Supply in Nigeria. Asian Journal of Agricultural Extension, Economics & Sociology. 39(3), 60–74.

[6] Kupferschmidt, K.L., Requiema, J., Simpson, M., et al., 2024. Food for Thought: How Can Machine Learning Help Better Predict and Understand Changes in Food Prices? arXiv preprint. arXiv:2412.06472. DOI:

[7] https://doi.org/10.48550/arXiv.2412.06472

[8] Ulussever, T., Ertuğ rul, H.M., Kılıç Depren, S., et al., 2023. Estimation of Impacts of Global Factors on World Food Prices: A Comparison of Machine Learning Algorithms and Time Series Econometric Models. Foods. 12(4),

[9] Majhi, S.K., Bano, R., Pradhan, R., et al., 2024. Food Price Index Prediction Using Time Series Models: A Study of Cereals, Millets and Pulses. In International Conference on Technology Advances for Green Solutions and

[10] Sustainable Development. Springer: Singapore. pp. 216–238.

[11] Ingio, J.A., Nsang, A.S., Iorliam, A., 2024. Comparing Machine Learning Algorithms for Rice Yield Prediction in Adamawa and Cross Rivers States of Nigeria. Gazi University Journal of Science Part A: Engineering and Innovation. 11(3), 481–496.

[12] Nayak, G.H., Alam, M.W., Singh, K., et al., 2024. Exogenous Variable Driven Deep Learning Models for Improved Price Forecasting of TOP Crops in India. Scientific Reports. 14(1), 17203.

[13] Sanusi, O.I., Safi, S.K., Adeeko, O., et al., 2022. Forecasting Agricultural Commodity Price Using Different Models: A Case Study of Widely Consumed Grains in Nigeria. Agricultural and Resource Economics: International

[14] Scientific E‑Journal. 8(2), 124–140.

[15] Sun, Y., Wang, X., Zhang, C., et al., 2023. Multiple Regression: Methodology and Applications. Highlights in Science, Engineering and Technology. 49, 542–548.

[16] Danbatta, S.J., Muhammad, A., Varol, A., et al., 2025. Forecasting Monthly Rainfall Using Hybrid Time‑Series Models and Monte Carlo Simulation Amidst Security Challenges: A Case Study of Five Districts from Northern

[17] Nigeria. Environment, Development and Sustainability. 27(6), 13815–13837.

[18] Eticha, A., 2020. Multiple Linear Regressions on Determinants of Ginger Production in Yeki District, Sheka Zone, South West Ethiopia. International Journal of Agricultural Science and Food Technology. 6(2), 151–156.

[19] Wu, T., Yu, J., Lu, J., et al., 2020. Research on Inversion Model of Cultivated Soil Moisture Content Based on Hyperspectral Imaging Analysis. Agriculture. 10(7), 292.

[20] Istifaroh, E.P., Harini, R., 2021. The Effect of Land Characteristics on Agricultural Productivity Using Multiple Linear Regression Method in Madiun Regency. E3S Web of Conferences. 325, 02005.

[21] Tule, M.K., Salisu, A.A., Chiemeke, C.C., 2019. Can Agricultural Commodity Prices Predict Nigeria's Inflation? Journal of Commodity Markets. 16, 100087.

[22] Das, D., Chakrabarti, S., 2023. An Extreme Learning Machine Approach for Forecasting the Wholesale Price Index of Food Products in India. Pertanika Journal of Science & Technology. 31(6), 3179–3198.

[23] Jin, B., Xu, X., 2025. Wholesale Price Forecasts of Green Grams Using the Neural Network. Asian Journal of Economics and Banking. 9(3), 463–490.

[24] Choong, K.Y., Sudin, S., Raof, R.A.A., et al., 2023. Hybrid Approach for Vegetable Price Forecasting in Electronic Commerce Platform. International Journal of Artificial Intelligence. 13(2), 1858–1867.

[25] Paul, R.K., Yeasin, M., Kumar, P., et al., 2022. Machine Learning Techniques for Forecasting Agricultural Prices: A Case of Brinjal in Odisha, India. Plos One. 17(7), e0270553.

[26] Tyralis, H., Papacharalampous, G., Langousis, A., 2019. A Brief Review of Random Forests for Water Scientists and Practitioners and Their Recent History in Water Resources. Water. 11(5), 910.

[27] Malysheva, T., Panachev, A., Medvedeva, M., et al., 2019. Application of Random Forest Algorithm to Predict the Average Issued Amounts in ATMs. In Proceedings of the International Conference of Computational Methods in Sciences and Engineering 2019 (ICCMSE‑2019), Rhodes, Greece, 1–5 May 2019. DOI: https://doi.org/10.1063/1.5137947

[28] Zhang, Y., Ma, J., Liang, S., et al., 2020. An Evaluation of Eight Machine Learning Regression Algorithms for Forest Aboveground Biomass Estimation from Multiple Satellite Data Products. Remote Sensing. 12(24), 4015.

[29] Doz, D., Cotič, M., Felda, D., 2023. Random Forest Regression in Predicting Students' Achievements and Fuzzy Grades. Mathematics. 11(19), 4129.

[30] Dimopoulos, T., Tyralis, H., Bakas, N.P., et al., 2018. Accuracy Measurement of Random Forests and Linear Regression for Mass Appraisal Models that Estimate the Prices of Residential Apartments in Nicosia, Cyprus. Advances in Geosciences. 45, 377–382.

[31] Vapnik, V., 2013. The Nature of Statistical Learning Theory. Springer: New York, NY, USA.

[32] He, H., Wang, K., Jiang, Y., et al., 2024. Quadratic Hyper‑Surface Kernel‑Free Large Margin Distribution Machine‑Based Regression and Its Least‑Square Form. Machine Learning: Science and Technology. 5(2), 025024.

[33] Rodrı́guez‑Pérez, R., Bajorath, J., 2022. Evolution of Support Vector Machine and Regression Modeling in Chemoinformatics and Drug Discovery. Journal of Computer‑Aided Molecular Design. 36(5), 355–362.

[34] Gers, F.A., Schmidhuber, J., Cummins, F., 2000. Learning to Forget: Continual Prediction with LSTM. Neural Computation. 12(10), 2451–2471.

[35] Hochreiter, S., Schmidhuber, J., 1997. Long Short‑Term Memory. Neural Computation. 9(8), 1735–1780.

[36] Hochreiter, S., Schmidhuber, J., 1994. Simplifying Neural Nets by Discovering Flat Minima. In Proceedings of the Advances in Neural Information Processing Systems, Denver, CO, USA, 1 January 1994; pp. 529–536.

[37] Van Houdt, G., Mosquera, C., Nápoles, G., 2020. A Review on the Long Short‑Term Memory Model. Artificial Intelligence Review. 53(8), 5929–5955.

[38] Fackler, P.L., Goodwin, B.K., 2001. Spatial Price Analysis. In: Gardner, B., Rausser, G. (Eds.). Handbook of Agricultural Economics. Elsevier: Amsterdam, Netherlands. pp. 971–1024.

[39] Newbold, P., Harvey, D.I., 2002. Forecast Combination and Encompassing. In: Clements, M.P., Hendry, D.F. (Eds.). A Companion to Economic Forecasting. Wiley: Hoboken, NJ, USA.

[40] Box, G.E.P., Jenkins, G.M., 1976. Time Series Analysis: Forecasting and Control. Holden‑Day: San Francisco, CA, USA.

[41] Breiman, L., 2001. Random Forests. Machine Learning. 45(1), 5–32.

[42] Cortes, C., Vapnik, V., 1995. Support‑Vector Networks. Machine Learning. 20(3), 273–297.

[43] Campbell, J.Y., Lo, A.W., MacKinlay, A.C., 1997. The Econometrics of Financial Markets. Princeton University Press: Princeton, NJ, USA.

[44] Granger, C.W.J., Newbold, P., 1974. Spurious Regression in Econometrics. Journal of Econometrics. 2(2), 111–120.

[45] Makridakis, S., Spiliotis, E., Assimakopoulos, V., 2017. The Accuracy of Machine Learning Forecasting Methods Versus Statistical Ones: Extending the Results of the M3‑Competition. University of Nicosia: Nicosia, Cyprus

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