Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

International Journal of Science and Science Education Ondo, 1 (xx) (2020) xxx-xxx

© School of Science, Adeyemi college of Education, Ondo


www.ijosse.org

ARIMA Modeling and Forecasting of Food Price in Nigeria


Ibrahim A.1*, Osho F. T.2 and Muhammad U.A.1,2

1
Department of Mathematics, Adeyemi College of Education,Nigeria
2
Department of Mathematics, Adeyemi College of Education,Nigeria
1,2
Department Three, Institution Three, Country Three
* E-mail: anaseencollection@gmail.com, oshofemi@gmail.com,umuhd@gmail.com

Abstract
For any economic agent to formulate effective policy, it must take into consideration the general
increase in price level of food within a period of time. Due to such increase in the general price
level of foods, there is need to conduct proper investigation on Inflation in food Price. This research
work is carried out using ARIMA modeling approach to obtain the best model for the Inflation on
Food Price Index in Nigeria and forecast its probable future values. Monthly inflation figures in
Food Price were collected spanning from 2009:01 to 2019:12 to build the model. Inflation was
found to be integrated of order one and follows ARIMA (3,1,3) order. Inflation was predicted
comparing the log of the original Food Price data on December, 2019 (0.009756) with the predicted
one for December, 2022 (0.010420). It is therefore recommended that appropriate measures should
be taken and put in place to prevent future inflation because the model suggests that, inflation has a
long trending upward memory and it will take a long period of time to be in a stable state.

Key Words: Inflation, Food Price, ARIMA, ACF, PACF, Box-Jenkins, Differencing method,
forecasting.

2 Introduction
Inflation is a persistent rise in the general price levels of goods and services in an economy over a
period of time. Inflation rate has been regarded as one of the major economic indicators in any
country. It is undeniably one of the most leading and dynamics macroeconomics issues confronting
almost all economies of the world (Ayinde et’al, 2010). Food prices refer to the (averaged) price
2 International Journal of Sciences and Science Education Ondo

level for food in particular countries or regions or on a global scale. The food industry's contribution
to the price levels and fluctuations come from the food production process, food marketing and food
distribution. The price of food has risen quite drastically since the 2007-08 world food price crisis,
and has been most noticeable in developing countries while less so in the OECD (Organization for
Economic Cooperation and Development) countries and North America.

The FAO (Food and Agriculture Organization) food price index is a measure of the monthly
change in international prices of a market basket of food commodities (Wikipedia, 2019). Food
inflation refers to the condition whereby there exists increase in wholesale price index of
essential food item (defined as food basket) relative to the general inflation or the food price index
(Wasif M., 2017). S.K. Srivastava (2016) carried out an Investigation on food inflation and found
that the food inflation was found to be more volatile as compared to non-food inflation and
followed a cyclical trend. Further, trend in food inflation was not uniform across different food
commodities. Primary food articles were the found to be the driving force for the overall food
inflation. The improvement in marketing and processing infrastructure will help in reducing the
food inflation.

Food price increases have been major components of unanticipated increases in the general
inflation rate. The rate of food price inflation exceeded the inflation rate, as measured by the
Consumer Price Index (CPI). A supply-shift concept of food price inflation generally is offered as a
fundamental explanation of why food prices have increased rapidly in recent years. The effects of
higher farm product prices on food prices are analyzed using Pascal distributed lag models of the
price adjustment process. Estimates are presented for 23 selected food products. (R. M. Lamm,
1979). V. Jadhav et al (2017) demonstrated the utility of price forecasting of farm prices and
validating the same for major crops namely, Paddy, Ragi and Maize in Karnataka. The results were
obtained from the application of univariate ARIMA techniques to produce price forecasts for cereal
and the forecasted prices of selected commodities were almost similar to actual prices with very
good validation. Therefore, the ARIMA model serves as a good technique for predicting the
magnitude of any variable.

Franck Cachia, 2014 uses Hybrid ARIMA-GARCH models and estimated food price for
each region, with additional explanatory variables constructed from a large and high-frequency
dataset. The out-of-sample analysis indicates a satisfactory performance of the models at predicting
the overall variability in prices as well as the sign and direction of price changes. Anas I. and
International Journal of Sciences and Science Education Ondo 3

Olagunju S.O. (2020) carried out a research work using ARIMA modeling approach to obtain the
best model for the Inflation on Food Price Index in Nigeria and forecast its probable future values,
they found that Inflation on Consumer Price Index exist and conclude that there is no unit root or
the time series is stationary after first difference of the log Consumer Price Index.

The objective of this paper is to use Autoregressive integrated moving average modelling
strategies pioneered by Box and Jenkins (called Box – Jenkins) in 1976; to obtain the best ARIMA
model for the Inflation on Food Price in Nigeria.

3 Preliminary notes/ Research Methodology


2.1 Autoregressive Process {AR (p)}
An autoregressive process of order p denoted by AR (p) or an AR (p) model is a time series

 Xt  which satisfies the equation


X t  m1  et  1 X n1  2 X n2  . . .   p X n  p
p
i.e. X t  m1  et   k X nk
k 1

e
For t  0, where { t }n  0 is a series of independent identically distributed (i.i.d) random

1
variable and
m is some constant.
3.2 Moving Average Process {MA (q)}
The moving average technique is often used for linear fitting and as defined by Box and
Jenkins (1976), a moving average process of order q denoted by MA(q) is a stationary time

series { X t } if it has the representation:

X t  m1  et  1et 1  2et 2  . . .  q et q
q
i.e. X t  m1  et   k et k
k 1

e e e
For t>1 where { t } is a white noise process, E { t } = 0, var { t } =    , m1 is the
2

mean, also called constant and θ1, θ2, θ3, θ4…,θq are the parameters to be estimated in the given
4 International Journal of Sciences and Science Education Ondo

data. X t is represented on the current value of the white noise process and the immediate
passed value of the white noise process.
2.3 Autoregressive Moving Average Process {ARMA(p, q)}
According to Box and Jenkins (1975), an ARMA(p,q) process is the combination of p th-

order autoregressive and qth-order moving average process. A time series { X t } is an ARMA
(p,q) process if it has the following representation:
q q
X t   k et k  m1  et    j et  j
k 1 j 1
p q
X t  m1  et   k X t k    j et  j  0
It can also be represented as: k 1 j 1

Where { X t }>1, m1 is some constant and the k and are defined as parameters for AR and
MA models respectively.
The ARMA process is stationary if the AR-component of the process is stationary and is
invertible if the MA-component of the process is invertible.
2.4 Autoregressive Integrated Moving Average Process {ARIMA (p,d,q)}
Developed by Box and Jenkins (1976), this process helps to remove trends and uncover
hidden patterns in non-stationary data because ARMA process can only model stationary
data (i.e. containing no trend and seasonal variation).
ARIMA process first transforms non-stationary time series, by differencing it number of
times, then models it with an ARIMA (p,d,q) process. As described above, non-stationary
time series can often be converted to a stationary one by simple differencing. Differencing a
non-stationary time series a number of times into a stationary one is a form of differencing
the series (i.e. by removing the trend component).
Knowing that every stationary time series is integrated of order d(I(d)) and if by
differencing the term becomes an ARIMA (p,d,q) representation, then, the time series can be
expressed as:

 (L)d X t   ( L)et
A time series ( X t ) is said to be integrated of order d(I(d)), (d = 1, 2, 3, …, ∞).
International Journal of Sciences and Science Education Ondo 5

If
(1  L)d 1 X t is not stationary, then
(1  L)d X t is stationary and has the

representation of the form:


 (L)d X t   ( L)et
Where d (1  L)d d
is a stationary series and (1  L) represents the number of regular
et
difference, and is the white noise.

4 A step before the final submission/Analysis


3.1 Source of Data
The data used in this research work (ARIMA model on inflation in food price) is from
Nigeria National Bureau of Statistics (NBS), recorded (monthly) on inflation in food price
from 2009 to 2019.
The data used for this work is a secondary one extracted from the
CPI_REPORT_DEC_2019 (National Bureau of Statistics). Hence, the documentary method
of collecting data is used for this research work as the observation was not directly done by
the investigator; and the documentary data serve as a reliable source of information for this
research.

3.2 Data Analysis


Steps involved in the Box-Jenkins Methodology
Stage1: Model identification and Selection
Stage2: Model Estimation
Stage3: Model Checking
Stage4: Forecasting
3.21 ARIMA Model Identification and Selection
Model AIC SIC HQC

ARIMA(1,1,1) -929.3312 -917.8304 -924.6579

ARIMA(1,1,2) -934.9426 -920.5666 -929.1010

ARIMA(1,1,3) -933.2203 -915.9692 -926.2104

ARIMA(2,1,1) -937.4473 -923.0713 -931.6057

ARIMA(2,1,2) -935.7824 -918.5312 -928.7725

ARIMA(2,1,3) -939.8615 -919.7351 -931.6832


6 International Journal of Sciences and Science Education Ondo

ARIMA(3,1,1) -933.4938 -916.2426 -926.4839

ARIMA(3,1,2) -932.3843 -912.2579 -924.2060

ARIMA(3,1,3) -946.8189 -923.8173 -937.4723

Table 3.1: Result of ARIMA Model Identification and Selection for the log of Food Price
The table above selected Nine (9) models with low AIC, HQC and SIC which is common in
ARIMA modelling and find the best model among them. ARIMA (3,1,3) model is selected
because it has the minimum AIC, SIC and HQC.

3.22 ARIMA (3,1,3) Model Estimation


After the best model has been chosen, the parameters of the model are estimated.
The results of this estimate (with residual test for normality) are shown in the table below:
Parameter Coefficient Std. Error Z P-value
s
Constant 0.0102389 0.000608096 16.84 1.29e-063 ***
phi_1 0.0536743 0.0881481 0.6089 0.5426
phi_2 -0.0261632 0.0762530 - 0.7315
0.3431
phi_3 -0.815503 0.0728705 -11.19 4.51e-029 ***
theta_1 -0.0516215 0.104039 - 0.6198
0.4962
theta_2 0.336448 0.0866688 3.882 0.0001 ***
theta_3 0.789185 0.101177 7.800 6.19e-015 ***
Table 3.2: Result of ARIMA model identification for the Food Price
The table above indicate that the selected model ARIMA (3,1,3) is significant at 95%
confidence limit, as indicated on the p-value of phi_3 and theta_3 parameters.
3.23 Model Checking
How do we know that the model selected above is a reasonable fit to the data? One simple
diagnostic is to obtain residuals of the estimated model ARIMA (3,1,3) and obtain the
following tests:
Test Level of Test Statistics P-Value
Significance

Chi-Square 5% 49.6497 1.65466e-011


International Journal of Sciences and Science Education Ondo 7

ARCH 5% 61.7471 0.00175903

Table 3.3: Result of ARIMA Model (3,1,3) Checking


Since all the P-values are less than level of significance, the model is then normally
distributed at 5% tolerance limit.

ACF and PACF of these residuals


Residual ACF
0.3
+- 1.96/T^0.5
0.2

0.1

-0.1

-0.2

-0.3
0 5 10 15 20 25 30
lag

Residual PACF
0.3
+- 1.96/T^0.5
0.2

0.1

-0.1

-0.2

-0.3
0 5 10 15 20 25 30
lag

Figure 3.23: The Residual ACF and PACF of ARIMA(3,1,3) model of the log Food Price Index.
3.24 Forecasting
This is one of the reasons for the popularity of the ARIMA modelling. In many cases, the forecasts
obtained by this method are more reliable than those obtained from the traditional econometric
modelling. (D. N. Gujarati, Pp.778)
The figure below plot the actual and the predicted three year future values of food price given by
ARIMA (3,1,3) showing the behavior of the future values. It can be confirmed that the model
somehow fit the data well.
8 International Journal of Sciences and Science Education Ondo

0.05
d_l_Food_Price
forecast
95 percent interval
0.04

0.03

0.02

0.01

-0.01

-0.02

-0.03
2015 2016 2017 2018 2019 2020 2021 2022 2023

Figure 3.24: The forecast result given by ARIMA(3,1,3) Model of the first difference of the log
food price.

4 Main results
4.1 Stationarity Tests: Graphical Analysis
4.11: Graph of the Series before Differencing
The time plot of the series below (fig. 4.1) gives an initial clue about the likeky nature of the Food
Price time series. Over the period of study, the log of Food Price keeps increasing, showing an
upward trend, suggesting perhaps that the mean of the log of Food Price Index has been changing
with time or over time in Nigeria. Hence the series is not stationary.
350

300

250
F o o d _ P r ic e

200

150

100

50

Figur
2010 2012 2014 2016 2018 2020

e 4.1: Time plot of the series before differencing


4.12: Graph of the Series for Log of Food Price
International Journal of Sciences and Science Education Ondo 9

5.8

5.6
l_ F o o d _ P r ic e

5.4

5.2

4.8

4.6

4.4
2010 2012 2014 2016 2018 2020

Figure 4.2:Time plot of the series for log of Food Price


4.13 Graph of ACF and PACF for log of Food Price

ACF for l_Food_Price


1
+- 1.96/T^0.5

0.5

-0.5

-1
0 5 10 15 20 25 30
lag

PACF for l_Food_Price


1
+- 1.96/T^0.5

0.5

-0.5

-1
0 5 10 15 20 25 30
lag

Figure4.3: ACF and PACF for log of Food Price

4.2 Unit Root Tests for log of Food Price


4.21 Stationary Test for log of Food Price - ADF Test
H0: There is Unit root (the series is not stationary)
Test Test Statistics P-Value

Without constant 1.34714 0.9558

With constant 1.57545 0.9995


10 International Journal of Sciences and Science Education Ondo

With constant and Trend -1.56127 0.8082

Table 4.1 ADF Tests for log of Food Price


4.22 Stationary Test for log of Food Price - KPSS TEST
H0: The series is stationary.
Test Test Statistics Critical Value

With Trend 0.128061 10% (0.119)

Without trend 0.521417 10% (0.347)

Table 4.2 KPSS tests for log of Food Price


4.23 Time Plot of the Series for Log of Food Price after First Differencing
The figure below plotted the first differences of the log of Food Price series.
Unlike Figure 4.1, we do not observe any trend in this plot, perhaps suggesting that the log of first
differenced food price index series is stationary.
0.04

0.035

0.03
d _ l_ F o o d _ P r ic e

0.025

0.02

0.015

0.01

0.005

-0.005

-0.01
2010 2012 2014 2016 2018 2020

Figure 4.4: Time plot of the series after first difference of log Food Price
We can also see this visually from the ACF and PACF correlogram given in (4.24) below:
4.24 ACF and PACF after First Difference of the Log Food Price
International Journal of Sciences and Science Education Ondo 11

ACF for d_l_Food_Price

0.3 +- 1.96/T^0.5

0.2
0.1

-0.1

-0.2
-0.3

0 5 10 15 20 25 30
lag

PACF for d_l_Food_Price

0.3 +- 1.96/T^0.5

0.2

0.1

0
-0.1

-0.2
-0.3

0 5 10 15 20 25 30
lag

Figure 4.5: ACF and PACF after first difference of the log Food Price Index
The figure above estimated the ACF and PACF correlogram with no much different pattern. The
ACF at lag 2, 6, 12, 13, 14, and 22 seem statistically different from zero (at the 95% confidence
limit, those lags are asymptotic and so can be considered approximate), but at all other lags, they are
not statistically different from zero. We therefore conclude that the data series is now stationary.
4.3 Unit Root Tests after First Difference of the Log Food Price
A formal application of the Augmented Dickey-Fuller and KPSS unit root tests below may show
that this is indeed the case.

4.31 ADF Tests after first difference of the log Food Price
H0: The series is not stationary
TEST Test Statistics P-Value

Without constant 0.331412 0.7811

With constant -1.01108 0.7516

With constant and trend -1.66201 0.7681

4.32 KPSS Tests after first difference of the log Food Price
H0: The series is not non-stationary
Test Test Statistics Critical Value (5%)
With trend 0.111945 0.146
Without trend 0.190697 0.463
12 International Journal of Sciences and Science Education Ondo

5 Conclusion
Based on the analysis carried out, we were able to follow the steps involved in the Box-Jenkins
Methodology. After the first difference of the log Food Price, the data is stationary, a formal
ADF and KPSS tests confirmed that this is the case. We were able to identify ARIMA (3,1,3)
as the parsimonious and adequate model, and this model is used for a three year forecast
values.
Since all the tests statistics of the ADFs are less than the critical regions, we reject the
null hypothesis and therefore conclude that there is no unit root or the time series is stationary
(series with no trends, no seasonal variation and no hidden patterns), or it has no stochastic
trend, possibly around a deterministic trend.

In the KPSS tests, the test statistics are all less than the p-values. We therefore accept
the null hypothesis and conclude that the data series is stationary around a deterministic trend
(the data fit the model well; it is ready for modeling).

The study paints an unstable future for the Nigerian Economy following the Food Price
There is strong need for Government and Policy makers to focus on policies that will
strengthen and stabilize the macroeconomic structure of the Nigerian Economy and its
agricultural system.
It is also recommended for future research to consider multivariate models where other
variables will be involved and possibly SARIMA model because the Food Price Index series
exhibited seasonality after the first difference, as such, the series wouldn't have become
stationary without taking the log of the series.

Acknowledgements
The authors thank the referees for their constructive suggestions and we are also thankful to Dr.
Olagunju, Dr. Ganiyu, Mr. Muhammad U.A. and the entire staffs of Department of Mathematics,
Adeyemi College of Education, Ondo for providing necessary guide, advice and assistance to us.

References

Ayinde, O.E., Olatunji G.B., Omotesho O.A., and Ayinde K. (2010).Determination of Inflation in
Nigeria: a Co-integration Approach. 3rd African Association of Agricultural Economists
International Journal of Sciences and Science Education Ondo 13

(AAAE) and 48th Agricultural Economists Association of South Africa (AEASA) Conference,
Cape Town, South Africa.19-23.
Bayt, specialities
https://specialties.bayt.com/en/specialties/q/281738/what-is-food-inflation-its-causes-and-
impacts/
F. Cachia, (2014). Nowcasting Regional Consumer Food Inflation. Food and Agriculture
Organization of the United Nations, Working Paper Series ESS/14-07
Ibrahim A. and Olagunju S.O. (2020) ARIMA Modeling and Forecasting of Consumer Price Index
(CPI) in Nigeria. Journal of Mathematics Association of Nigeria, 2020.
R. M. Lamm (1979). Dynamics of Food Price Inflation. Western Journal of Agricultural
Economics. National Economic Analysis Division, Economics, Statistics, and Cooperatives
Service United States Department of Agriculture. December, 1979.
S.K. Srivastava (2016) Short Run Forecast of Food Inflation using ARIMA: A Combination
Approach. Astral International Pvt. Ltd. ICAR-NIAP, New Delhi – 110 012
V. Jadhav, B. V. Chinnappa Reddy, and G. M. Gaddi 2017. Application of ARIMA Model for
Forecasting Agricultural Prices Journal of Agricultural Sci. Tech. (2017) Vol. 19: 981-992
Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Food_prices#FAO_food_price_index

You might also like