Tropical Agriculural Research Vol. 5 (4): 53 531 (014) Use of Unobserved Componens Model for Forecasing Non-saionary Time Series: A Case of Annual Naional Coconu Producion in Sri Lanka N.K.K. Brinha, S. Samia 1, N.R. Abeynayake I.M.S.K. Idirisinghe 3 and A.M.D.P. Kumarahunga 3 Posgraduae Insiue of Agriculure Universiy of Peradeniya Sri Lanka ABSTRACT: Forecasing a ime series is generally done by using auoregressive inegraed moving average (ARIMA) models. The main drawback of his echnique is ha he ime series should be saionary. In realiy, his assumpion is rarely me. The Unobserved Componen Model (UCM) is a promising alernaive o ARIMA in overcoming his problem as i does no make use of he saionary assumpion. In addiion, i breaks down response series ino componens such as rends, cycles, and regression effecs, which could be useful especially in forecasing he producion of perennial crops. The presen sudy was aimed a using UCM for annual naional coconu producion daa from 1950 o 01, which is nonsaionary, and o forecas he coconu producion in Sri Lanka. Resuls revealed ha boh he rend componens, level and slope, have non-sochasic processes. Furher, i revealed ha he level was significan (p=0.0001) and slope was non-significan (p>0.1). The linear rend model zero variance slope was found o be he bes fi for he daa wih 11.3 years of esimaed period of he cycle. The forecased error for 011 and 01 were 1.08% and 1.69%, respecively. From he fied model, prediced annual coconu producion for 013 was 739.1 million nus and he 95% CI is 048.7 o 349.5 million nus. Thus, he use of UCM is recommended for annual daa series, oo. Keywords: Non sochasic process, prediced producion, rend componens INTRODUCTION Box Jenkins and o a limied exen he exponenial smoohing echniques are commonly used in he analysis of ime series in agriculure. Main drawbacks in hese models are ha, hey are suiable only for he saionary series (Box e al., 1994), empirical in naure and fail o explain he underlying mechanism. I is no always possible o creae a ime-series saionary by differencing or by some oher means. Hence, his approach could be limied o few daa ses. Also, correlogram and parial auo correlaion funcion specifying he models are no always very informaive, especially in small samples. This could lead o inappropriae models and predicions. 1 3 Deparmen of Crop Science, Faculy of Agriculure, Universiy of Peradeniya, Sri Lanka Deparmen of Agribusiness Managemen, Faculy of Agriculure and Planaion Managemen, Wayamba Universiy of Sri Lanka Coconu Research Insiue, Lunuwila, Sri Lanka Corresponding auhor: ilbrinha@yahoo.com
Brinha e al. Unobserved componen model (UCM) is a promising alernaive approach o overcome hese problems (Harvey, 1996). I is also known as srucural ime series models and i is a flexible class of models which are useful for forecasing. I decomposes he response series ino laen componens such as rend, cycle and seasonal effec and linear and nonlinear regression effecs. The saline feaure of he UCM is laen componens, which follow suiable sochasic models and i provides suiable se of paerns o capure he ousanding acions of he response series. UCM can also consis of explanaory variables. Apar from he forecas, srucural modeling gives esimaes of hese unobserved componens and i is of very useful in pracical usage. UCM can handle inensive daa irregulariies oo. I is very similar o dynamic models and also popular in he Bayesian ime series (Wes & Harrison, 1999). Perennial crop producion is influenced by environmenal and managemen facors. I is quie hard o assume ha he underlying parameers are consisen and difficul o capure he laen componens by univariae ARIMA models. Harvey & Todd (1983) repored in deail he advanages of UCM over seasonal ARIMA. Ravichandran & Prajneshu (001) compared he efficiencies of ARIMA and Sae Space Modeling uilizing all-india Marine producs expor daa and Kapombe & Colyer (1998) sudied ha srucural ime series model o esimae he supply response funcion for broiler producion in he Unied Saes using quarerly daa. Ravichandran & Muhurama, (006) uilized UCM model o model and forecas he rice producion of India. Even hough he UCM has been used in acual scenario, here is hardly any use of UCM in forecasing perennial crop producion. The aim of his sudy was o invesigae he possibiliy of using UCM for modeling and forecasing annual naional coconu producion of Sri Lanka. Daa used in he sudy METHODOLOGY Annual coconu producion from 1950 o 01 colleced from Coconu Research Insiue (CRI) in Sri Lanka was used for he sudy. UCM A UCM consiss of rend, cycle, seasonal and irregular componens, and specified of he form (Harvey and Sock, 1993). where Y = µ + ϕ + ω + ε µ, ϕ and ω denoes he sochasic rend, sochasic cycle and seasonal componen respecively. Here ε is he overall error (irregular componen), which is assumed o be a Gaussian whie noise wih variance σ ε (1). Since he daa used is annual, seasonal effec canno be idenified and hus he UCM for he daa can be formulaed of he form Y = µ + ϕ + ε () 54
Unobserved Componens Model for Forecasing Non-saionary Time Series Esimaing rend effec There are wo differen ways o modeling he rend componen in UCM. The firs mehod is by mean of random walk (RW) model, (3). The RW model can be formulaed of he form (Harvey & Koopman, 009). µ = µ 1 + δ, δ ~ i. i. d N(0, ) σ δ (3) The second mehod involves modeling he rend as a Locally Linear Time rend (LLT), which consis of boh level and slope (Harvey, 001). The rend, µ is modeled as a sochasic componen wih varying level and slope and i can be formulaed of he form, = µ 1 + β 1 δ ; µ + δ ~ i. i. d N(0, β = β 1 + τ ; τ ~ i. i. d N(0, ) σ δ ) (4a) σ τ (4b) β is he slope of he local linear ime rend. The disurbances δ and Where are independen. Special cases of his rend model is obained by seing assumed o be muually one or boh of he disurbance variances, σ δ andσ τ, equal o zero. If σ τ is se equal o zero, hen he rend becomes linear (fixed slope). If σ δ is se o zero, hen he subsequen model generally has a smooher rend. If boh he variances are se o zero, hen he resuling model is he deerminisic linear ime rend, τ µ = µ 0 + β0 (5) Thus he reduced form of a LLM is he ARIMA (0,, ) model. Esimaing cyclic effec Cyclical funcion of ime ϕ wih frequency λ is usually measured in radians. The period of he cycle, which is he ime aken o go hrough is complee sequence of values, is π / λ. A cycle can be expressed as a mixure of sine and cosine waves, depending on wo parameers, α and β (Harvey & Sock, 1993). Accordingly, ϕ = α cos λ + β sin λ (6) ( β ϕ = α sin λ + β cosλ 1/ α + ) is called he ampliude and an 1 ( β / α) where is he phase. As wih he linear rend, he cycle can be buil up recursively, leading o he sochasic model. (7) 55
Brinha e al. ϕ cosλ sin λ ϕ 1, = 1,,... T = sin cos ϕ λ λ ϕ 1 Then he cyclic componen ϕ cos λ sin λ ϕ = ρ ϕ sin λ cos λ ϕ ϕ is modeled of he form. Here ρ is he damping facor, where 0 ρ 1 and he disurbances υ and υ are muually independen whie noise disurbances wih zero mean and common varianceσ. This resuls in a damped sochasic cycle ha has ime-varying ampliude and phase, and a fixed period equal o π / λ The parameers of his UCM are he differen disurbance. variances, σ, δ, τ, andσ, he damping facor ρ, he frequency λ The model is. ε υ 1 1 υ + υ saionary if ρ is sricly less han one, and if λ is equal o 0 or π i reduces o a firs-order auoregressive process. υ Residual analysis and forecasing A useful diagnosic ool for invesigaing he randomness of a se of observaions is he correlogram. Residual diagnosic plos are useful for checking he normaliy and he randomness in he residuals. For he fied models, disribuion of auo correlaion funcion residuals were examined graphically as well as esed. Afer verificaion of he assumpions of residuals of he seleced model, model was used o forecas he values from 013 o 017. The PROC UCM of SAS was used for model fiing. RESULTS AND DISCUSSION The ime series plo of annual coconu producion showed he posiive rend (Fig. 1). Wih his posiive rend in he daa, all possible componens such as cycle and irregular componen was esed by using a UCM of he form. Y = µ + ϕ + ε 56
Unobserved Componens Model for Forecasing Non-saionary Time Series 300 3000 800 producion 600 400 00 000 1800 1950 1960 1970 1980 Year 1990 000 010 Fig. 1. Time series plo of annual coconu producion (1950-01) A he firs sage, analysis was aimed o recify he exising componen in he model by UCM echnique. Error variances of he irregular, level, slope, and cyclic componens were considered as free parameers of he model and heir esimaes are showed in he Table 1. These esimaes, heir corresponding -values and he associaed P values were used o es he hypohesis of he form. H 0 : Corresponding componen is non-sochasic H a : Corresponding componen is sochasic According o he Table 1, disurbance variances for he level and slope componens are no significan. This suggess ha a deerminisic rend model may be more appropriae and level and slope can be reaed as consan. Table 1. Final Esimaes of he Parameers Componen Parameer Esimae Sd. Error T value Pr> Irregular Error variance 338.54 1563.1 0.1 0.8358 Level Error variance 14484 8806.1 1.64 0.1000 Slope Error variance 0.00014 0.08968 0.00 0.9989 Cycle Damping facor 0.76777 0.1486 5.17 <.0001 Cycle Period 3.885 0.37 11.87 <.0001 Cycle Error variance 17067 858.8.07 0.0388 However wheher model is deerminisic or no, canno be deermined from esimaes of parameers of sage 1 (Table 1) and i should be deermined from he second sage analysis, which is he significan analysis of componen. In addiion, significan analysis of componen helps o decide if level and slope can be dropped from he model afer esing he following hypohesis, H 0 : Given componen is no significan H a : Given componen is significan 57
Brinha e al. The goodness of fi of he analysis of componens is shown in Table. According o Table, slope is no significan and can be dropped from he model. However, level is significan and canno be dropped from he model hus he model is a sochasic model. The conribuion of irregular componen is also no significan, bu since i is a sochasic componen, i canno be dropped from he model. Table. Significance Analysis of Componen (Final Sae) Componen DF Chi-square P>chisq Irregular 1 0.01 0.930 Level 1 515.86 <0.0001 Slope 1 0.7 0.6048 A he hird sage, slope variance was fixed and free parameers were obained. Accuracy measures, AIC and BIC wih fixed slope models were recorded as 810.7 and 80.84 respecively and likelihood opimizaion algorihm converged a 1 ieraions. Afer fixing he slope, MAPE was 9.66 and he esimaed period of he cycle was 11.30 years. The esimae of he damping facor was 1, suggesing ha he periodic paern of producion does no diminish quickly as shown in Fig.. Fig.. Smooh cycles wih consan slope. Noe ha doed line indicaes he beginning of forecased values. Residual analysis Fig. 3 clearly indicaes ha residuals have he normal disribuion (P = 0.79 from Anderson Darling es). According o Fig. 4, he indicaion is ha here is no serious violaion of auo correlaion assumpion. 58
Unobserved Componens Model for Forecasing Non-saionary Time Series Fig. 3. Disribuion of residual for fixed slope, normal, kernal Fig. 4. ACF for fixed slope, wo sandard errors Forecasing Smooh rend for he producion is shown in Fig. 5. Fig. 5. Smooh rend for he producion ( 95% confidence limis) acual, --begining of forecased values, Observed, fied and forecased values for fixed slope srucural ime series model is shown in Table 3. According o Table 3, forecased error percenages for pas five years were below 4% excep in 010. In fac, large error percenage for he year 010 could be due o he unusual value for 010 compared o oher years. Forecased value for 013 is 739.1 million nus. 59
Brinha e al. Table 3. Observed, fied and forecased values for fixed slope Year Obseved value Fied / forecased 95% limi Absolue values Lower Upper % Error 008 908 800.9 31.7 3370. 3.68 009 76 808.5 1.1 3404.9 1.68 010 317 798.8 176.4 341.1 0.79 011 808 777.6 130.9 344.3 1.08 01 80 754.4 085. 343.6 1.69 013 739.1 048.7 349.5 014 739.3 08.3 3450.3 015 758.0 06. 3489.7 016 79.4 039.1 3545.8 017 835.3 059.0 3611.5 CONCLUSION UCM wih slope variance zero seems o fi he annual naional coconu producion daa well. Forecased error percenage for years of 011 and 01 were 1.08% and 1.69% respecively. Obained model prediced he annual coconu producion of 739.1 million nus in 013 and he 95% CI is 048.7, 349.5. UCM models can effecively be uilized for he ime series modeling of perennial crop producion, especially ha are of non-saionary. ACKNOWLEDGMENT The auhors wish o express heir sincere graiude o Coconu Research Insiue, Sri Lanka for providing naional coconu producion daa and HETC projec, Minisry of Higher Educaion, Sri Lanka for he gran provided o pursue he sudy. REFERENCE Box, G.E.P., Jenkins, G.M. and Reinsel, G.C. (1994). Time series analysis: Forecasing and conrol, 3 rd ediion. Prenice Hall, New Jersey. Harvey, A. and Koopman, S.J. (009). Unobserved componens models in economics and finance. The role of kalman filer in Time series economerics. pp 71-81. Harvey, A.C. and Sock, J.H. (1993). Esimaion, Smoohing, Inerpolaion and Disribuion in Srucural Time Series Models in Coninuous Time (wih J Sock), in Models, Mehods and Applicaions of Economerics, P C B Phillips (ed.), pp 55-70. Harvey, A.C. and Todd, P.H.J. (1983). Forecasing economic ime series wih srucural and Box Jenkins models: A case sudy. Journal of Business and Economics saisics, 1(4), 99-315. Harvey, A.C. (1993). Time series models. nd Ediion, Harveser Wheasheaf. 530
Unobserved Componens Model for Forecasing Non-saionary Time Series Harvey, A.C. (1996). Forecasing, Srucural Time Series Models and he Kalman Filer. Cambridge Univ. Press, U.K. Harvey, A.C. (001).Forecasing, Srucural Time series models and he Kalman filer. Cambridge Univ. Press, U.K. Kapombe, Crispin M. and Colyer, Dale. (1998). Modeling U.S. broiler supply response: A srucural ime series approach. Agriculural and Resource Economics Review, 7(), 41-51. Ravichandran, S. and Prajneshu. (001). Sae space modeling versus ARIMA ime series modeling. Journal Ind. Soc. Ag. Saisics, 54(1), 43-51. Ravichandran, S. and Muhuraman, P. (006). Srucural ime-series modelling and forecasing India s rice producion", Agriculural siuaion in India, pp.773-776. Wes, M. and Harrision, J. (1999). Bayesian forecasing and dynamic models, nd ediion, New York; Springer-Verlag. 531