Time Series Modeling and Forecasting for Indonesian Coffee Export

DOI : 10.17577/IJERTV10IS030100

Download Full-Text PDF Cite this Publication

Text Only Version

Time Series Modeling and Forecasting for Indonesian Coffee Export

Zul Amry

Department of Mathematics, State University of Medan, Indonesia

=1

=1

AbstractThis paper to build a time series forecasting model for data of Indonesian coffee export from 1976 until 2019. The method used in this research is the Box Jenkins method. The autocorre-

tor as the value for the parameter that maximizes the likelihood function. If = (1, 2, , ) represents a random sample from (; ),then the likelihood function is:

lation function (ACF) and the partial autocorrelation function (PACF) are used for stationary test and model idenfication. Ljunc Box Q statistics are used for diagnostic test, whereas to show the

() =

(; )

(2)

accuracy model are used Root Mean Squared Error (RMSE), Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE).

KeywordsARIMA model, coffee export, forecasting, Box Jenkins method.

The maximum likelihood estimator, that is , is a value of

that satisfies:

(1, 2, , ; ) = (1, 2, , ; ) (3)

k

k

  1. INTRODUCTION The autocorrelation between Yt and Yt+k is defined as

    Indonesia is one of the largest coffee exporting countries

    Cov(Yt ,Yt k )

    (4)

    in the world and the demand for coffee exports to increase every year. In order for this demand to be fulfilled, it is

    Var(Yt ) Var(Yt k )

    necessary to forecast the demand coffee in the future. One of the tools for forecasting is the time series model forecasting.

    that can be estimated from sample data by

    nk

    Time series model forecasting is a type of forecasting that uses past observational data, investigates its behavior and is

    k

    k

    k

    Yt Y Yt k Y

    n

    n

    t 1

    (5)

    extrapolated into the future. The Autoregressive Integrated Moving Average (ARIMA) model developed by Box and Jenkins (1976) and has been widely used in various fields as a

    0

    Y

    t

    t

    t 1

    Y 2

    statistical model, especially related to forecasting problems. In connection with the brief description above, this paper focuses on constructing a time series forecasting model with the ARIMA model to be applied to Indonesian coffee export

  2. MATERIALS AND METHODS

    and the set k , k 0,1, 2, is called the ACF.

    as

    as

    The partial autocorrelation between Yt and Yt+k is defined

    Cov Yt Y , Yt k Y k

    t

    t

    t

    t

    The material used in this paper consists of coffee export

    kk

    Var Y Y Var Y Y

    (6)

    data and the theories of statistical related to forecasting time series models. Coffee export data is annual data of Indonesia

    t t t k

    t k

    coffee export from 1975 to 2019. The method used is the Box- Jenkins method. Some statistical theories in time series

    where

    Y k =

    1Ytk1 2Ytk2 k 1Yt1

    andkk

    can be

    t

    t

    analysis are ARIMA model, ACF, PACF, maximum

    estimated from sample data by

    likelihood method, Ljung-Box Q statistics, RMSE, MAE and MAPE.

    1 1

    2

    k 2

    1

    The ARIMA (p, d, q) model of the time series

    {1, 2, } is defined as

    () = () (1)

    1

    k 1

    kk 1

    1

    k 2

    1

    k 3

    k 3

    1

    2

    k

    where is the backward shift operator,

    = 1

    , = 1

    2

    1

    1

    2

    k 2

    k 1

    is the backward difference, = 1 1 2

    , = 1 1 22

    1

    k 1

    k 2

    1

    k 3

    k 3

    1

    k 2

    1

    Principle of maximum likelihood yields a choice of the estima-

    (7)

    kk

    kk

    and the set , k 0,1, 2, is called the PACF.

    The ACF and PACF use to identify the models. The following Table 1 summarizes how to identify the model of the stationary data by using of characteristics for the ACF and PACF.

    Table 1: Characteristics for the ACF and PACF

    Model

    ACF, k

    PACF, kk

    AR(p)

    Damped exponential and / or sine functions

    kk =0 for k>p

    MA(q)

    k = 0 for k >q

    Dominated by damped exponential and/or sine function

    ARMA(p,q)

    Damped exponential and/or sine functions after lag (q-p)

    Dominated by damped exponential and/or sine function after lag (p-q)

    Diagnostics checking aims to conclude whether the forecasting model which obtained is adequate. the way is to test the assumption of residual independence between lags. If the residual is whit noise, then the model is adequate. The hypothesis is 0: 1 = = = 0 vs 1: , 0 and tested with Ljung-Box Q Statistic

    Figure 1: Plot of x

    Figure 2: Plot ACF of x

    To overcome this condition, it is transformed to ; is the first differences of , that is = 1. The graph of the

    data in Figure 3 below and the ACF plot in Figure 4 with a

    = ( 2)

    2

    ~2( ) (8)

    muffled sine wave shape, indicates that the time series data is

    =1 ()

    where n is the sample size, 2 is the autocorrelation of residuals at lag k and K is the number of lags being tested, and

    stationary.

    1

    1

    reject 0 at the level , if > 2

    ( ).

    The measures to determine the accuracy of a forecasting model in this research is RMSE, MAE and MAPE defined respectively as follows:

    RMSE

    n

    ESS

    n

    (9)

    Figure 3: Plot of y

    t

    t

    Yt Y

    MAE t 1

    n

    (10)

    n

    t 1

    Yt Yt

    Yt

    n

    t 1

    Yt Yt

    Yt

    MAPE (11)

    n

    where =The actual value at time ; = The forecast value at time ; n =The number of observations and ESS=the error sum of square.

  3. CONTRUCTION OF FORECASTING MODEL The graph of the original data in Figure 1 shows an

    increasing trend and the ACF plot in Figure 2 shows a slow decline, this indicates that the time series data is not stationary.

    Figure 4: Plot ACF o y

    Figure 5: Plot PACF of y

    Furthermore, the construction of forecasting model consists of identification of model, estimation of parameter, diagnostic test, and accuracy of model. Based the ACF plot in Figure 4 and the PACF plot in Figure 5, they are interrupted after lag 1, then the possible models for data are ARMA (1, 0), ARMA (0, 1) or ARMA (1,1) or ARIMA (1,1,0), ARMA

    (0,1,1) or ARMA (1, 1, 1) for data. Results of estimation of parameters use likelihood maximum method presented in the Table 2 below:

    Tabel 2: Estimation of parameter

    Model

    estimate value of parameters

    1

    ARIMA (1,1,0)

    -0.3433

    ARMA (0,1,1)

    -0.4693

    ARIMA (1,1,1)

    0.0588

    -0.5131

    Results of diagnostic test use Ljunc-Box Q statistics to ARIMA (1,1,0), ARMA (0,1,1) and ARMA (1, 1, 1) at the

    level = 0.05 and degrees of freedom=15 with the value

    0.95

    0.95

    2 (15) = 24.996 presented in the Figure 6, Figure 7,

    Figure 8, and Table 3 below:

    Figure 6: Diagnostic test of ARIMA (1,1,0) model

    Figure 7: Diagnostic test of ARIMA (0,1,1) model

    Figure 8: Diagnostic test of ARIMA (1,1,1) model

    Tabel 3: Diagnostic test

    Model

    Q-value

    Decision for 0

    ARIMA (1,1,0)

    20.7242

    No reject

    ARMA (0,1,1)

    15.5253

    No reject

    ARIMA (1,1,1)

    15.7478

    No reject

    the results of diagnostic test in the Table 3 above concluded that all models were adequate.

    Results the accuracy of the model use RMSE, MAE and MAPE presented in the Table 4 below:

    Tabel 4: Accuracy; RMSE, MAE and MAPE

    Model

    Accuracy

    RMSE

    MAE

    MAPE

    ARIMA (1,1,0)

    7.7129

    6.2174

    16.9425

    ARMA (0,1,1)

    7.3466

    6.0200

    15.8802

    ARIMA (1,1,1)

    7.3236

    6.0147

    15.7893

    Next, based on the smallest values of RMSE, MAE and MAPE in the Table 4 above, it is concluded that the most suitable model is the ARIMA (1,1,1) model, that is

    1() 1 = 1()

    (1 1) (1 ) = (1 1)

    (1 1) ( 1) = 1

    1 1 + 11 = 1

    1 11 + 12 = 11

    1.0588 1 + 0.0588 2 = + 0.53111

    = 1.0588 1 0.0588 2 + 0.53111 +

  4. CONCLUSION

Time series data of Indonesian coffee export from 1976 until 2019 is not stationary, but stationary for one level difference data, so that the data analyzed is the difference of one level and the results are returned to the original data. Based on calculations and analysis of data it is concluded that the most suitable model is the ARIMA (1,1,1).

REFERENCES

  1. Alfaki, M. M and Masih, S. B (2015). Modeling and Forecasting by using Time Series ARIMA Models. International Journal of Engineering Research & Technology (IJERT), Vol. 4 Issue 03, 914- 918.http://dx.doi.org/10.17577/IJERTV4IS030817

  2. Bain, L. J., & Engelhardt, M. (1992). Introduction to Probability and Mathematical Statistics (2nd ed.). Duxbury Press, Belmont,

    California. https://doi.org/10.2307/2532587

  3. Box, G.E.P. & Jenkins, G.M. (1976) Time Series Analysis: Forecasting and Control. Holden-Day, San Francisco.

  4. BPS-Statistics Indonesia (2020), Indonesian Coffee Statistics 2019.

  5. Ihaka, R. (2005). Time Series Analysis. Statistics Department University of Auckland.

  6. Directorate General of Estate Crops (2019). Tree Crop Estate Statistics of Indonesia 2018- 2019, Jakarta.

  7. Fattah, J. et. al. (2018), Forecasting of demand using ARIMA. International Journal of Engineering Business Management, Vol.10, 1-9, https://doi.org/10.1177/1847979018808673

  8. Jain, G. and Mallick, B. (2017), A Study of Time Series Models ARIMA and ETS, I.J. Modern Education and Computer Science, 4, 57-63. (http://www.mecs-press.org/) DOI: 10.5815/ijmecs.2017.04.07

  9. Madsen, H. (2008). Time Series Analysis. Chapmann Hall, Informatics and Mathematical Modelling, Technical University of Denmark. https://doi.org/10.1201/9781420059687

  10. Mgaya, J. F (2019). Application of ARIMA models in forecasting livestock products consumption in Tanzania Cogent Food & Agriculture Vol. 5, Issue 1, 1-29, https://doi.org/10.1080/23311932.2019.1607430

  11. Rossiter, D. G. (2013). Time Analysis in R. Department of Earth Systems Analysis, University of Twente, Faculty of Geo-Information Science & Earth, Observation (ITC), Enschede (NL)

  12. Sarpong, S. A (2013). Modeling and Forecasting Maternal Mortality; an Application of ARIMA Models. International Journal of Applied Science and Technology Vol. 3, No. 1; 19-28.

  13. Sudeshna, G. (2017). Forecasting Cotton Exports in India using the ARIMA model. Amity Journal of Economics, Vol. 2, Issue 2, 36-52

  14. Wei, W. W. S. (2006). Time Series Analysis Univariate and Multivariate Methods. Addison Wesley Publishing Company, Inc.

    Canada

  15. Zul Amry and Siregar, B.H. (2019). ARIMA Model Selection for Composite Stock Price Index in Indonesia Stock Exchange, International Journal of Accounting and Finance Studies, Vol. 2, No. 1, 31-38. https://doi.org/10.22158/ijafs.v2n1p31

Leave a Reply