Ch 8. MODEL DIAGNOSTICS. Time Series Analysis

Similar documents
CHAPTER 8 MODEL DIAGNOSTICS. 8.1 Residual Analysis

Chapter 8: Model Diagnostics

STAT 520 FORECASTING AND TIME SERIES 2013 FALL Homework 05

Ch 6. Model Specification. Time Series Analysis

Ch 4. Models For Stationary Time Series. Time Series Analysis

Problem Set 2: Box-Jenkins methodology

Univariate ARIMA Models

Circle the single best answer for each multiple choice question. Your choice should be made clearly.

Circle a single answer for each multiple choice question. Your choice should be made clearly.

Final Examination 7/6/2011

at least 50 and preferably 100 observations should be available to build a proper model

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA

Part 1. Multiple Choice (50 questions, 1 point each) Part 2. Problems/Short Answer (10 questions, 5 points each)

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

FE570 Financial Markets and Trading. Stevens Institute of Technology

Forecasting using R. Rob J Hyndman. 2.4 Non-seasonal ARIMA models. Forecasting using R 1

Lab: Box-Jenkins Methodology - US Wholesale Price Indicator

Midterm Suggested Solutions

EASTERN MEDITERRANEAN UNIVERSITY ECON 604, FALL 2007 DEPARTMENT OF ECONOMICS MEHMET BALCILAR ARIMA MODELS: IDENTIFICATION

STAT Financial Time Series

Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting)

ibm: daily closing IBM stock prices (dates not given) internet: number of users logged on to an Internet server each minute (dates/times not given)

distributed approximately according to white noise. Likewise, for general ARMA(p,q), the residuals can be expressed as

Modelling using ARMA processes

5 Autoregressive-Moving-Average Modeling

APPLIED ECONOMETRIC TIME SERIES 4TH EDITION

Ch3. TRENDS. Time Series Analysis

Review Session: Econometrics - CLEFIN (20192)

Autoregressive Moving Average (ARMA) Models and their Practical Applications

Empirical Market Microstructure Analysis (EMMA)

CHAPTER 8 FORECASTING PRACTICE I

Minitab Project Report - Assignment 6

MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH. I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo

Ch 5. Models for Nonstationary Time Series. Time Series Analysis

MCMC analysis of classical time series algorithms.

Vector autoregressions, VAR

3 Theory of stationary random processes

COMPUTER SESSION 3: ESTIMATION AND FORECASTING.

Estimation and application of best ARIMA model for forecasting the uranium price.

ECON/FIN 250: Forecasting in Finance and Economics: Section 8: Forecast Examples: Part 1

Chapter 6: Model Specification for Time Series

The ARIMA Procedure: The ARIMA Procedure

Applied time-series analysis

Ch 9. FORECASTING. Time Series Analysis

Introduction to Time Series Analysis. Lecture 11.

Stat 153 Time Series. Problem Set 4

Part 1. Multiple Choice (40 questions, 1 point each) Part 2. Problems/Short Answer (10 questions, 6 points each)

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MAS451/MTH451 Time Series Analysis TIME ALLOWED: 2 HOURS

Chapter 3: Regression Methods for Trends

2. An Introduction to Moving Average Models and ARMA Models

MAT3379 (Winter 2016)

Estimating AR/MA models

Module 3. Descriptive Time Series Statistics and Introduction to Time Series Models

Lecture 4a: ARMA Model

Lecture 3: Autoregressive Moving Average (ARMA) Models and their Practical Applications

STAT 436 / Lecture 16: Key

Ross Bettinger, Analytical Consultant, Seattle, WA

The log transformation produces a time series whose variance can be treated as constant over time.

Econometrics for Policy Analysis A Train The Trainer Workshop Oct 22-28, 2016 Organized by African Heritage Institution

STAT 443 Final Exam Review. 1 Basic Definitions. 2 Statistical Tests. L A TEXer: W. Kong

Dynamic Time Series Regression: A Panacea for Spurious Correlations

ECONOMETRIA II. CURSO 2009/2010 LAB # 3

Multivariate Time Series Analysis and Its Applications [Tsay (2005), chapter 8]

Advanced Econometrics

Econometrics II Heij et al. Chapter 7.1

Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book; you are not tested on them.

10. Time series regression and forecasting

Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models

ITSM-R Reference Manual

Homework 2. For the homework, be sure to give full explanations where required and to turn in any relevant plots.

Forecasting using R. Rob J Hyndman. 2.5 Seasonal ARIMA models. Forecasting using R 1

Testing for IID Noise/White Noise: I

Univariate linear models

Econometric Forecasting

Multivariate Time Series: VAR(p) Processes and Models

Econometrics I: Univariate Time Series Econometrics (1)

A test for improved forecasting performance at higher lead times

Stat 565. (S)Arima & Forecasting. Charlotte Wickham. stat565.cwick.co.nz. Feb

AR, MA and ARMA models

A SEASONAL TIME SERIES MODEL FOR NIGERIAN MONTHLY AIR TRAFFIC DATA

{ } Stochastic processes. Models for time series. Specification of a process. Specification of a process. , X t3. ,...X tn }

Lecture Notes of Bus (Spring 2017) Analysis of Financial Time Series Ruey S. Tsay

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis

Austrian Inflation Rate

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9)

Econometría 2: Análisis de series de Tiempo

Decision 411: Class 9. HW#3 issues

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline. Return Rate. US Gross National Product

STOR 356: Summary Course Notes

Chapter 9: Forecasting

of seasonal data demonstrating the usefulness of the devised tests. We conclude in "Conclusion" section with a discussion.

Time Series Analysis

University of Oxford. Statistical Methods Autocorrelation. Identification and Estimation

Time Series I Time Domain Methods

Gaussian Copula Regression Application

AR(p) + I(d) + MA(q) = ARIMA(p, d, q)

Problem Set 1 Solution Sketches Time Series Analysis Spring 2010

Time Series Analysis

Levinson Durbin Recursions: I

FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL

Transcription:

Model diagnostics is concerned with testing the goodness of fit of a model and, if the fit is poor, suggesting appropriate modifications. We shall present two complementary approaches: analysis of residuals from the fitted model and analysis of overparameterized models.

8.1 Residual Analysis For an AR(p) model: Y t = p k=1 φ ky t k + θ 0 + e t, after obtaining the estimated coefficients ˆφ k and ˆθ 0, the residuals are defined as p ê t = Y t ˆφ k Y t k ˆθ 0. k=1 For an invertible ARMA(p,q) model containing MA terms, we use the inverted infinite AR form of the model to define residuals: Y t = π 1 Y t 1 + π 2 Y t 2 + π 3 Y t 3 + + e t ê t = Ŷ t ˆπ 1 Y t 1 ˆπ 2 Y t 2 ˆπ 3 Y t 3 or residual = actual predicted. The ˆπ s are calculated implicitly as functions of the estimated φ s and θ s. If the model is correctly specified and the parameter estimates are reasonably close to the true values, then the residuals should have nearly the properties of white noise.

8.1 Residual Analysis For an AR(p) model: Y t = p k=1 φ ky t k + θ 0 + e t, after obtaining the estimated coefficients ˆφ k and ˆθ 0, the residuals are defined as p ê t = Y t ˆφ k Y t k ˆθ 0. k=1 For an invertible ARMA(p,q) model containing MA terms, we use the inverted infinite AR form of the model to define residuals: Y t = π 1 Y t 1 + π 2 Y t 2 + π 3 Y t 3 + + e t ê t = Ŷ t ˆπ 1 Y t 1 ˆπ 2 Y t 2 ˆπ 3 Y t 3 or residual = actual predicted. The ˆπ s are calculated implicitly as functions of the estimated φ s and θ s. If the model is correctly specified and the parameter estimates are reasonably close to the true values, then the residuals should have nearly the properties of white noise.

8.1 Residual Analysis For an AR(p) model: Y t = p k=1 φ ky t k + θ 0 + e t, after obtaining the estimated coefficients ˆφ k and ˆθ 0, the residuals are defined as p ê t = Y t ˆφ k Y t k ˆθ 0. k=1 For an invertible ARMA(p,q) model containing MA terms, we use the inverted infinite AR form of the model to define residuals: Y t = π 1 Y t 1 + π 2 Y t 2 + π 3 Y t 3 + + e t ê t = Ŷ t ˆπ 1 Y t 1 ˆπ 2 Y t 2 ˆπ 3 Y t 3 or residual = actual predicted. The ˆπ s are calculated implicitly as functions of the estimated φ s and θ s. If the model is correctly specified and the parameter estimates are reasonably close to the true values, then the residuals should have nearly the properties of white noise.

8.1.1. Plots of the Residuals The parameters of the AR(1) model were estimated using maximum likelihood. The plot shows a rectangular scatter around a zero horizontal level with no trend, which supports the model.

The model of hare 0.5 built in Exhibit 7.8 is an AR(3) model with φ 2 term dropped: Yt = 3.483 + 0.919 Y t 1 0.5313 Y t 3 + e t From the standardized residual plot, the variation looks not quite consistent. The model is not so ideal. (The seemingly large negative standardized residuals are not outliers according to the Bonferroni outlier criterion with critical values ±3.15. )

The standardized residual plot looks fine, except for a few spikes. At least two or three residuals have magnitude greater than 3, which is rare for a standard white noise process. We should investigate the other factors influencing the change of oil prices. ( The Bonferroni critical values with n = 241 and α = 0.05 are ±3.71, so the outliers do appear to be real.)

8.1.2 Normality of the Residuals We use quantile-quantile plots and Shapiro-Wilk normality test on standardized residuals to assess normality. The QQ plot and the Shapiro-Wilk normality test (W = 0.9754, p-value= 0.6057) would not lead us to reject normality of the error terms in this model.

8.1.2 Normality of the Residuals We use quantile-quantile plots and Shapiro-Wilk normality test on standardized residuals to assess normality. The QQ plot and the Shapiro-Wilk normality test (W = 0.9754, p-value= 0.6057) would not lead us to reject normality of the error terms in this model.

The extreme values look suspect. However, the sample is small (n = 31) and the Bonferroni criteria do not indicate outliers. Shapiro-Wilk Test does not reject null hypothesis of normality.

The outliers are quite prominent. Shapiro-Wilk Test would reject the null hypothesis.

8.1.3 Autocorrelation of the Residuals For true white noise with large n, the sample autocorrelations r k are approximately normally distributed with zero means. We have seen that For the sample autocorrelations ˆr k of the residuals in a correctly specified model, however, Var (ˆr k ) has slightly different behaviors: for small lags k and j, Var (ˆr k ) can be substantially less than 1/n and the estimates Var (ˆr k ) and Var (ˆr j ) can be highly correlated. For larger lags, the approximate variance 1/n does apply; furthermore, Var (ˆr k ) and Var (ˆr j ) are approximately uncorrelated.

For an AR(1) Model, for large n, Var (ˆr 1 ) φ2 n and Var (ˆr k) 1 n for k > 1. Exhibit 8.7 shows the approximations for Residual Autocorrelations in AR(1) Models.

There is no evidence of autocorrelation in the residuals of this model.

For an AR(2) model, we have Var (ˆr 1 ) φ2 2 n, Var (ˆr 2) φ2 2 + φ2 1 (1 + φ 2) 2 n If the AR(2) parameters are not too close to the stationarity boundary, then Var (ˆr k ) 1 n for k 3.

The graph does not show statistically significant evidence of nonzero autocorrelation in the residuals.

With monthly data, we may pay special attention to the residuals at lags 12, 24, and so forth. With quarterly series, lags 4, 8, and so forth would merit special attention. Chapter 10 contains examples of these ideas. The residuals for MA models have similar results.

8.1.4 The Ljung-Box Test To study the independence of the residuals, we may takes into account the magnitudes of all residual correlations {ˆr k } as a group. The Ljung-Box test statistic is ( ˆr 2 Q = n(n + 2) 1 n 1 + ˆr 2 2 n 2 + + ˆr K 2 ) n K where K is selected large enough such that the Ψ-weights are negligible for j > K. We would reject the ARMA(p,q) model if the observed value of Q exceeded an appropriate critical value in a chi-square distribution with K p q degrees of freedom.

The Ljung-Box test statistic can be calculated by the command: LB.test(m1.color, lag=6)

Exhibit 8.12 (cont) The command tsdiag displays three of our diagnostic tools in one display a sequence plot of the standardized residuals, the sample ACF of the residuals, and p-values for the Ljung-Box test statistic for a whole range of values of K from 5 to 15. Everything looks very good. The estimated AR(1) model seems to be capturing the dependence structure of the color property time series quite well. The runs test also do not reject the independence of the residuals.

tsdiag(m1.color,gof=15,omit.initial=f) The tsdiag function in the TSA package has been modified from that in the stats package of R. It performs model diagnostics on a fitted model. 1 The argument gof specifies the maximum number of lags in the acf function used in the model diagnostics. The maximum lag should be set sufficiently large, so that the original time series has negligible autocorrelation, and thus the Ljung-Box (portmanteau) test statistic can be performed. 2 Setting the argument omit.initial=t omits the few initial residuals from the analysis. This option is especially useful for checking seasonal models where the initial residuals are close to zero by construction and including them may skew the model diagnostics. In the example, the omit.initial argument is set to be F so that the diagnostics are done with all residuals.

Ex. [Exercise 8.3, TS-ch8.R] Based on a series of length n = 200, we fit an AR(2) model and obtain residual autocorrelations of ˆr 1 = 0.13, ˆr 2 = 0.13, and ˆr 3 = 0.12. If ˆφ 1 = 1.1 and ˆφ 2 = 0.8, do these residual autocorrelations support the AR(2) specification? Individually? Jointly?

Exercise 8.3 Solution: For an AR(2) model, we first use (8.1.8), (8.1.9), (8.1.10): φ 2 Var (ˆr1 ) 2 ( 0.8) n = 2 = 0.057, so ˆr 1 = 0.13 is too large; 200 φ 2 Var (ˆr2 ) 2 + φ 2 1 (1 + φ 2) 2 = 0.059, so ˆr 2 = 0.13 is too large; n 1 1 Var (ˆrk ) n = 200 = 0.071 for k 3, so ˆr 3 = 0.12 is fine; The Ljung-Box statistic: Q = n(n + 2) ( ˆr 2 1 n 1 + ˆr 2 2 n 2 + ˆr 3 2 ) = 9.83, n 3 if the AR(2) model is correct, then Q is approximately a chi-square distribution with 3 2 0 = 1 degree of freedom. Check the commands of chi-square distribution by?chisquare. Here we use 1-pchisq(9.83, df=1) to see that Prob[Q > 9.83] = 0.0017. Hence the residual autocorrelations are (jointly) too large to support the AR(2) model.

Ex. (Exercise 8.7, TS-ch8.R) Fit an AR(3) model by maximum likelihood to the square root of the hare abundance series (filename hare). 1 Plot the sample ACF of the residuals. Comment on the size of the correlations. 2 Calculate the Ljung-Box statistic summing to K = 9. Does this statistic support the AR(3) specification? 3 Perform a runs test on the residuals and comment on the results. 4 Display the quantile-quantile normal plot of the residuals. Comment on the plot. 5 Perform the Shapiro-Wilk test of normality on the residuals.

Overfitting and Parameter Redundancy Another basic diagnostic tool is that of overfitting. After fitting a likely adequate model, we fit a slightly more general model and compare it with the original model. The original model would be confirmed if: 1 the estimate of the additional parameter is not significantly different from zero, and 2 the estimates for the parameters in common do not change significantly from their original estimates. We may compare the other statistics, such as log-likelihood and AIC, as well.

Ex. We have specified, fitted, and examined the residuals of an AR(1) model for the industrial color property time series. Let us compare it with slightly more general models: AR(2) and ARMA(1,1) models.

(cont.) Here are some observations: 1 In Exhibit 8.14, the estimate of φ 2 is not statistically different from zero; 2 two estimates of φ 1 and µ are quite close; 3 while the AR(2) model has a slightly larger log-likelihood value, the AR(1) fit has a smaller AIC value. Therefore, the simpler AR(1) model is better. Next we compare the AR(1) model with the ARMA(1,1) model.

(cont.) Here are some observations: 1 In Exhibit 8.14, the estimate of φ 2 is not statistically different from zero; 2 two estimates of φ 1 and µ are quite close; 3 while the AR(2) model has a slightly larger log-likelihood value, the AR(1) fit has a smaller AIC value. Therefore, the simpler AR(1) model is better. Next we compare the AR(1) model with the ARMA(1,1) model.

(cont.) Here are some observations: 1 In Exhibit 8.14, the estimate of φ 2 is not statistically different from zero; 2 two estimates of φ 1 and µ are quite close; 3 while the AR(2) model has a slightly larger log-likelihood value, the AR(1) fit has a smaller AIC value. Therefore, the simpler AR(1) model is better. Next we compare the AR(1) model with the ARMA(1,1) model.

(cont.) Here are some observations: 1 In Exhibit 8.14, the estimate of φ 2 is not statistically different from zero; 2 two estimates of φ 1 and µ are quite close; 3 while the AR(2) model has a slightly larger log-likelihood value, the AR(1) fit has a smaller AIC value. Therefore, the simpler AR(1) model is better. Next we compare the AR(1) model with the ARMA(1,1) model.

(cont.) Here are some observations: 1 In Exhibit 8.14, the estimate of φ 2 is not statistically different from zero; 2 two estimates of φ 1 and µ are quite close; 3 while the AR(2) model has a slightly larger log-likelihood value, the AR(1) fit has a smaller AIC value. Therefore, the simpler AR(1) model is better. Next we compare the AR(1) model with the ARMA(1,1) model.

Ex. Observations: 1 the new parameter θ is not significantly different from zero; 2 the estimate of φ 1 and µ are not significantly different from the estimate in Exhibit 8.13; 3 the AIC is greater than that of the AR(1) fit. Again the AR(1) model looks better.

Ex. Observations: 1 the new parameter θ is not significantly different from zero; 2 the estimate of φ 1 and µ are not significantly different from the estimate in Exhibit 8.13; 3 the AIC is greater than that of the AR(1) fit. Again the AR(1) model looks better.

Ex. Observations: 1 the new parameter θ is not significantly different from zero; 2 the estimate of φ 1 and µ are not significantly different from the estimate in Exhibit 8.13; 3 the AIC is greater than that of the AR(1) fit. Again the AR(1) model looks better.

Ex. Observations: 1 the new parameter θ is not significantly different from zero; 2 the estimate of φ 1 and µ are not significantly different from the estimate in Exhibit 8.13; 3 the AIC is greater than that of the AR(1) fit. Again the AR(1) model looks better.

Ex. Observations: 1 the new parameter θ is not significantly different from zero; 2 the estimate of φ 1 and µ are not significantly different from the estimate in Exhibit 8.13; 3 the AIC is greater than that of the AR(1) fit. Again the AR(1) model looks better.

When generalizing ARMA models, we must be aware of the problem of parameter redundancy. Define the backshift operation B on any process {Y t } by B(Y t ) = Y t 1. For example, an ARMA(1,1) model: Y t = φy t 1 + e t θe t 1, may be expressed as Y t φy t 1 = e t θe t 1, which is (1 φb)y t = (1 θb)e t. If we have a correct ARMA model: φ(b)y t = θ(b)e t, then (1 cb)φ(b)y t = (1 cb)θ(b)e t is also a correct model. This creates parameter redundancy. To get unique ARMA model, we must cancel any common factors in the AR and MA characteristic polynomials.

To avoid parameter redundancy: 1 Try simple models first. 2 When overfitting, do not increase the the AR and MA orders simultaneously. 3 Extend the model in directions suggested by the analysis (e.g. ACF, PACF) of the residuals.

Ex. The estimates of φ 1, φ 2, and θ in this ARMA(2,1) fit are very different from those in AR(1) fit, and they are not significantly different from zero.

Ex. (TS-ch8.R) We simulate an ARMA(2,1) series with φ 1 = 0.3, φ 2 = 0.4, θ 1 = 0.5, and n = 1000. Then we specify the model, estimate the parameters, and analyze the residuals.