Some useful concepts in univariate time series analysis Autoregressive moving average models Autocorrelation functions Model Estimation Diagnostic measure Model selection Forecasting Assumptions: 1. Non-seasonal 2. Linear 3. Non-trending 4. Constant variance 1
White Noise: Lag operator: Autoregressive (AR) model AR(p) Model: 2
Example: Example: AR(1) Model 3
1. If the parameters converges to zero and 2. If, the time series is explosives. 3. If, random walk. Artificial Data in Figure 3.1: 1. 200 numbers are generated from independent standard normal distributions 2. Replace the 100 th observation by 3. y 1 is set to zero 4. The other 199 observations are generated by where t=2,,200 and. 4
1.0 0.9 0.5 1. In this chapter, we consider the shocks have only transitory effects, i.e. <1 in the above case. 2. When a series display permanent effects of shocks, the series is usually transformed to a series with transitory effects by taking first differences of the series. 5
Moving average (MA) model MA(q) Model: or with Remark: Since the explanatory variables are Unobserved, it may cause estimation problem if q is big. Empirically, we usually set q=1 or 2. Roots of If at least one root is on or inside the unit circle, the MA(q) model is not invertible. If all roots are outside the unit circle, the MA(q) model is invertible. 6
Example: MA(1) Model 1.The impact of the values of the MA parameter is less clear-cut as in case of AR models. 2. Large shocks do not tend to change the direction of the time series. Non-invertible Invertible 7
Autoregressive moving average (ARMA) model ARMA(p,q) where How to choose the order p and q in ARMA model? Two tools that are useful to characterize ARMA model: Autocorrelations (ACF) Partical autocorrelations (PACF) 8
Autocorrelation function The autocorrelation function (ACF) of a time series y t is defined by where AR(1): AR(2): See Figure 3.3, 3.4, 3.5, and 3.6 9
10
11
ACF is not useful to identify the lag of AR model But, it is useful in MA(q) model MA(2): ARMA(p,q): the pattern of the ACF is a mixture of the ACF pattern for pure AR and MA models. ARMA(1,1) 12
Partical autocorrelation function The PACF value at lag 1, is given by The second PACF value regression results from the The third PACF value AR(1): = =0 AR(2): are not equal to zero, but AR(p): 13
Estimation of ACF and PACF ACF PACF (ACF) 14
Model estimation Start with an inspection of the ACF and EPACF, and decide the order or structure of ARMA models Investigate whether the residuals are approximately white noise 15
Estimation of AR models The choice of p is based on PACF values that are significant Estimate AR(p) by OLS AR(1) 16
Estimation of ARMA models Consider an ARMA(1,1) model z t = z t-1 then Given a value for, we can construct z t and estimate by OLS Diagnostic testing for residual autocorrelation The estimated residual time series is approximately white noise. If not, we may have missed some dynamic structure in y t. H 0 : All of the first m residual autocorrelation are significant ~ 2 (m-p-q) 17
LM test for residual autocorrelation H 0 : AR(p) H a : AR(p+r) or ARMA(p,r) (i) Estimate the model in H 0 (ii) Estimate the model where are the estimated residuals of model H 0 (iii) nr 2 ~ 2 (r) The F-version of the test, denoted F AC,1-r Diagnostic testing for normality of residuals H 0 : The residuals are normal distributed Where The Bera-Jarque test 18
Model selection min k is the number of parameter RSS is the residual sum of squares min 19
Forecasting Consider a MA(2) model Forecast error (Since ) Two step ahead forecast error Three step ahead forecast error 20
Consider an AR(2) model: 21
Comparing forecasts Check whether 95 percent of the forecasts indeed lie within the 95 percent interval (If not, the variance may be underestimate) The forecast error is about randomly positive or negative. (If not, the models underestimate or overestimate the conditional mean of the time series) Evaluation Mean square prediction error Mean absolute percentage error 22
Ho: the MSPEs of models A and B are the same Let d i =1 if MSPE Ai >MSPE Bi ; d i =0 otherwise The mean may not be well estimated 23