Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Time series (TS) doc.Ing. Zlata Sojková, CSc. 1 22 Vývoj miery nezamestnanosti SR - mesačné údaje za rr. 93-február 2000 v % 20 18 16 14 12 I.9 3 VI I.9 3 I.9 4 VI I.9 4 I.9 5 VI I.9 5 I.9 6 VI I.9 6 I.9 7 VI I.9 7 I.9 8 VI I.9 8 I.9 9 VI I.9 9 I.0 0 10 doc.Ing. Zlata Sojková, CSc. 2 What is the time serie?? data about the socio - economic phenomenon - in chronological order in time properly assembled time series data must meet the comparability of data: in time (the same length of periods) in space (the same territorial units, regions) and substantive comparability (same methodology) doc.Ing. Zlata Sojková, CSc. 3 Denote the value of the investigated variable: y1, y2 , y3 , ... yt …… yT, where t = 1, 2, …. T, T is the number of periods, t is formal time variable, which specifies the order of the value , e.g. Rok Yt t 1995 3110 1996 3570 1997 3860 1998 3870 1999 3770 1 2 3 4 5 doc.Ing. Zlata Sojková, CSc. GDP SR per capita. Years 95-99 v US$ 4 Basic types of time series depending on the nature of data Time Series Absolute variables Interval TS (yearly data about GDP of SR) deried variables instantaneous TS relative indicators average values (development of population) (rate of growth of GDP) (development of average wages) doc.Ing. Zlata Sojková, CSc. 5 By the length of the period we distinguish: Long-term time series - yearly data, etc. Short-term time series - quarterly, monthly data....etc... doc.Ing. Zlata Sojková, CSc. 6 Basic characteristics of time series analysis Absolute rate of growth (decline): absolute increase (decline) – first differences y t = y t - y t -1 second first differences (acceleration) y t 2 = y t - y t -1 doc.Ing. Zlata Sojková, CSc. 7 Relative rate of growth coefficients of growth: k t = y t / y t - 1 coefficient of increase: k t = k t - 1 growth rate (growth coef .in % ): Tt = k t . 100 Increase rate: T t =Tt - 100, resp. T t = (k t - 1 ) . 100 doc.Ing. Zlata Sojková, CSc. 8 GDP SR for years rr.95-99 in US$ per capita and year. Rok GNPSR (US$) coefficientcoefficient growth increase 1995 3110 of growth of increse in % rate rate in % 1996 3570 1,148 114,79 0,15 1997 3860 1,081 108,12 0,08 1998 3870 1,003 100,26 0,00 1999 3770 0,974 97,42 -0,03 In 1997 compared to 96 increased GDP per capita on 108,12% 14,79 8,12 0,26 -2,58 In 1997 compared to 96 increased GDP per capita by 8,12% doc.Ing. Zlata Sojková, CSc. 9 From individual growth rates can be calculated: average growth rate k T-1 k1 . k 2 . ...k T-1 _ 4 k = (1,148.1,081. 1,003 . 0,974) = 1.0493 For the period 95-99 was growth of GDP in SR per year approximately 4,9% doc.Ing. Zlata Sojková, CSc. 10 Components of time series Time series are created as the effect of important and not important factors on investigated phenomenon. These factors can be divided: Trend – determine the main direction of development t.j. trend in TS (Tt ) Periodic – cause regular fluctuations around the trend values of TS, can be divided: Cyclic (C t )- in long-term TS (economic cycles) Seasonal (S t )- in short-term TS (seasonal fluctuations of prices, seasonal demand…..), doc.Ing. Zlata Sojková, CSc. 11 Random effects (E t ) – random, iregular. These factors affect the development of each investigated variable in statistics. => We can decompose TS into three components: Trend (Tt ) Periodic (C t ), resp. (S t ) Random (E t ) Between components may be: Adittive relationship: Yt = T t + St + E t Multiplicative relationship: Yt = T t . St . Et doc.Ing. Zlata Sojková, CSc. 12 Analysis of trend and seasonal component (if occurs in TS) Using standard decomposition approach Analysis of trend in TS Analysis of trend using decomposition approach is based on: analytical smoothing of investigated values by appropriate trend function. analogy to the simple regression analysis, the estimated values are a function of time variable t, yt , = f (t) „trend function“ is then used not only to evaluating the quality of forecasts "ex post", but also to forecast ex-ante doc.Ing. Zlata Sojková, CSc. 13 Some types of simple trend functions y b o b1 / t ' t y b o b1 . log t ' t y 't b o b1 . t b 2 . t 2 y 't b o . b1t y bo . t ' t b1 y 't b o b1 . b 2t doc.Ing. Zlata Sojková,CSc. Historical data „Ex ante“ prognosis doc.Ing. Zlata Sojková, CSc. 21 14 Statistical evaluation of appropriatness of function • using index of correlation i yt , resp. • index of determination iyt2 Which reflects the quality of “ex-post” forecast T i yt 2 ( y ' y ) t t 1 T 2 ( y y ) t var.vysvet l. TF celk. var. y t t 1 •Priority is assesment of the fittnes of trend function. It is necessary to consider future development of examined variable y. doc.Ing. Zlata Sojková, CSc. 15 Analysis of seasonal component in TS Decomposition approach It is assumed: Multiplicative model of TS: Yt = Tt . St . Et Analysis of trend in TS (if present) by suitable trend function: Tt = yt, = f(t) Analysis of seasonal component using seasonal indices: y St y t , t , where y t , are values obtained from fitted trend function for t = 1,2…T doc.Ing. Zlata Sojková, CSc. 16 In table are data about Revenue of chosen company for 3 years. Analyse development of revenues in recent years and make forecast for year 1990. Year 1987 1988 1989 1990 Qartal 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 Revenue 184 173 160 189 191 185 179 200 205 192 200 229 ? Yt = Tt . St . Et Tt = yt, = f(t) We create variable t = 1,2,…,12 How to make Forecast for 1999 doc.Ing. Zlata Sojková, CSc. 17 Development of revenues (obvious seasonal fluctuations) Tržby v tis.Sk 250 200 150 1 3 5 7 doc.Ing. Zlata Sojková, CSc. 9 11 18 Procedure for analysis and prediction: First, we analyze the trend using suitable trend function. From the chart can be concluded that linear function is sufficient. We will use Excel (Tools- data Analysis -Regression) We calculate „predicted“ values according to trend function (also for year 1990) Seasonal Indices S t are calculated by dividing real value of revenues y t by value y t ‘ predicted according to trend function We make average of seasonal indices (to objectify seasonal component) and correct them for the sum of 4 (correction for accurancy) doc.Ing. Zlata Sojková, CSc. 19 Result of trend analysis Regression Statistics Multiple R 0.772 R Square 0.595 Adjusted R Square 0.555 Standard Error 11.591 Observations 12 Aproximately 60% of revenue variability is explained by trend, rest 40% is the variability caused by seasonal and random fluctuations ANOVA df Regression Residual Total Intercept X Variable 1 1 10 11 SS MS F Significance F 1975.470 1975.47 14.7045 0.00329 1343.446 134.34 3318.917 Coefficients Standard Error t Stat P-value 166.424 7.134 23.3297 0.0000 3.717 0.969 3.8346 0.0033 Lower 95% Upper 95% 150.530 182.319 1.557 5.876 We use trend function coefficients for „ex-post“ and „ex-ante“ forecast of trend doc.Ing. Zlata Sojková, CSc. 20 Analysis of seasonality and forecast Predicted values of trend Rok 1987 1988 1989 1990 Kvartál Tržby v tis.Sk 184 1 173 2 160 3 189 4 191 1 185 2 179 3 200 4 205 1 192 2 200 3 229 4 1 2 3 4 t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 yt´ 170.141 173.858 177.575 181.291 185.008 188.725 192.442 196.159 199.875 203.592 207.309 211.026 214.742 218.459 222.176 225.893 Seasonal indices Forecast Y t ‘ . St priem. St = yt / yt' St priemerne St pr. korig 1.046400 1.046494 1.0814558 0.972709 0.972797 0.995066 0.931891 0.931975 0.9010298 1.048999 1.049093 1.0425206 1.0323869 Suma St priem. 4 0.9802626 4.000359724 0.9301517 Korekcny faktor: 1.0195836 0.999910077 1.0256395 0.9430623 0.9647441 1.0851762 Forecast for Forecast trend and Of trend seasonality doc.Ing. Zlata Sojková, CSc. y* 178.036 169.113 165.48 190.174 193.593 183.575 179.335 205.77 209.15 198.036 193.189 221.366 224.706 212.497 207.044 236.961 21 Vývoj tržieb v rr. 87 89 a prognóza na r.90 Tržby v tis. Sk 250 230 Real values 210 190 170 150 Forecast of trend „ex-ante“ forecast for trend and seasonality 1 2 3 4 1 2 3kvartály 4 1 2 3 4 1 2 3 4 doc.Ing. Zlata Sojková, CSc. 22 It was just briefly … introduction in TS analysis….. …good luck... doc.Ing. Zlata Sojková, CSc. 23