Tutorial for solution of Assignment week 39 “A. Time series without seasonal variation Use the data in the file 'dollar.txt'. “

Slides:



Advertisements
Similar presentations
Autocorrelation Functions and ARIMA Modelling
Advertisements

DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Exam 1 review: Quizzes 1-6.
Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)
Part II – TIME SERIES ANALYSIS C4 Autocorrelation Analysis © Angel A. Juan & Carles Serrat - UPC 2007/2008.
Part II – TIME SERIES ANALYSIS C5 ARIMA (Box-Jenkins) Models
Analysis of Sales of Food Services & Drinking Places Julianne Shan Ho-Jung Hsiao Christian Treubig Lindsey Aspel Brooks Allen Edmund Becdach.
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Lecture 7: Box-Jenkins Models – Part II (Ch. 9) Material.
Time Series Building 1. Model Identification
Regression Analysis Once a linear relationship is defined, the independent variable can be used to forecast the dependent variable. Y ^ = bo + bX bo is.
How should these data be modelled?. Identification step: Look at the SAC and SPAC Looks like an AR(1)- process. (Spikes are clearly decreasing in SAC.
Business Forecasting Chapter 10 The Box–Jenkins Method of Forecasting.
Tutorial for solution of Assignment week 40 “Forecasting monthly values of Consumer Price Index Data set: Swedish Consumer Price Index” sparetime.
BABS 502 Lecture 9 ARIMA Forecasting II March 23, 2009.
© 2010 Pearson Prentice Hall. All rights reserved Least Squares Regression Models.
Assignment week 38 Exponential smoothing of monthly observations of the General Index of the Stockholm Stock Exchange. A. Graphical illustration of data.
ARIMA-models for non-stationary time series
Time series analysis - lecture 3 Forecasting using ARIMA-models Step 1. Assess the stationarity of the given time series of data and form differences if.
BA 555 Practical Business Analysis
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 13-1 Chapter 13 Simple Linear Regression Basic Business Statistics 11 th Edition.
Some more issues of time series analysis Time series regression with modelling of error terms In a time series regression model the error terms are tentatively.
MOVING AVERAGES AND EXPONENTIAL SMOOTHING
Exercise 7.1 a. Find and report the four seasonal factors for quarter 1, 2, 3 and 4 sn1 = 1.191, sn2 = 1.521, sn3 = 0.804, sn4 = b. What is the.
BABS 502 Lecture 8 ARIMA Forecasting II March 16 and 21, 2011.
Modern methods The classical approach: MethodProsCons Time series regression Easy to implement Fairly easy to interpret Covariates may be added (normalization)
REGRESSION AND CORRELATION
Basic Business Statistics, 11e © 2009 Prentice-Hall, Inc. Chap 15-1 Chapter 15 Multiple Regression Model Building Basic Business Statistics 11 th Edition.
Correlation and Regression Analysis
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS & Updated by SPIROS VELIANITIS.
BOX JENKINS METHODOLOGY
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 11 Regression.
AR- MA- och ARMA-.
Regression Method.
Diploma in Statistics Introduction to Regression Lecture 2.21 Introduction to Regression Lecture Review of Lecture 2.1 –Homework –Multiple regression.
M23- Residuals & Minitab 1  Department of ISM, University of Alabama, ResidualsResiduals A continuation of regression analysis.
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Lecture 8: Estimation & Diagnostic Checking in Box-Jenkins.
1 Chapter 10 Correlation and Regression 10.2 Correlation 10.3 Regression.
#1 EC 485: Time Series Analysis in a Nut Shell. #2 Data Preparation: 1)Plot data and examine for stationarity 2)Examine ACF for stationarity 3)If not.
Intervention models Something’s happened around t = 200.
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Exam 2 review: Quizzes 7-12* (*) Please note that.
Chapter 10 Correlation and Regression
Chap 13-1 Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall Chap 13-1 Chapter 13 Simple Linear Regression Basic Business Statistics 12.
Time series Model assessment. Tourist arrivals to NZ Period is quarterly.
John G. Zhang, Ph.D. Harper College
Introducing ITSM 2000 By: Amir Heshmaty Far. S EVERAL FUNCTION IN ITSM to analyze and display the properties of time series data to compute and display.
Multiple Regression I 1 Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 4 Multiple Regression Analysis (Part 1) Terry Dielman.
STAT 497 LECTURE NOTE 9 DIAGNOSTIC CHECKS 1. After identifying and estimating a time series model, the goodness-of-fit of the model and validity of the.
Estimation Method of Moments (MM) Methods of Moment estimation is a general method where equations for estimating parameters are found by equating population.
Forecasting (prediction) limits Example Linear deterministic trend estimated by least-squares Note! The average of the numbers 1, 2, …, t is.
Case 2 Review Brad Barker, Benjamin Milroy, Matt Sonnycalb, Kristofer Still, Chandhrika Venkataraman Time Series - February 2013.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Simple Linear Regression Analysis Chapter 13.
The Box-Jenkins (ARIMA) Methodology
Chapter 12 Simple Linear Regression.
Seasonal ARIMA FPP Chapter 8.
Ch16: Time Series 24 Nov 2011 BUSI275 Dr. Sean Ho HW8 due tonight Please download: 22-TheFed.xls 22-TheFed.xls.
Testing for equal variance Scale family: Y = sX G(x) = P(sX ≤ x) = F(x/s) To compute inverse, let y = G(x) = F(x/s) so x/s = F -1 (y) x = G -1 (y) = sF.
MODEL DIAGNOSTICS By Eni Sumarminingsih, Ssi, MM.
Forecasting. Model with indicator variables The choice of a forecasting technique depends on the components identified in the time series. The techniques.
Yandell – Econ 216 Chap 16-1 Chapter 16 Time-Series Forecasting.
Stats Methods at IC Lecture 3: Regression.
Inference for Least Squares Lines
Chapter 6: Autoregressive Integrated Moving Average (ARIMA) Models
Simple Linear Regression
Chapter 13 Simple Linear Regression
Quality In Manufacturing : US Minting and Nickel Weight
Multiple Regression Chapter 14.
Regression Forecasting and Model Building
BOX JENKINS (ARIMA) METHODOLOGY
Chap 7: Seasonal ARIMA Models
Chapter 13 Simple Linear Regression
Presentation transcript:

Tutorial for solution of Assignment week 39 “A. Time series without seasonal variation Use the data in the file 'dollar.txt'. “

“Construct a time series graph of the fluctuations of the dollar exchange rate, y t, for the period ”

Note! The time scale is best set to index here as the days are not consecutive in time series (Saturdays, Sundays and other holidays are not present)

“Construct also a point plot for all pairs (y t-1, y t ) and try to visually estimate how strong the correlation between two consecutive observations is (=autocorrelation).”

Strong positive autocorrelation! “How do the estimated autocorrelations change with increasing timelags between observations?” To estimate the autocorrelation function, copy the relevant rows (data for ) of column $US/SEK to a new column and use the autocorrelation function estimation on that column

As was deduced from the scatter plot, the autocorrelations are strongly positive. The autocorrelations do not change very much with increasing time lags. Note that this is what we see when the time series is non-stationary (has a trend).

“Construct a time series graph of the changes z t = y t - y t-1 of the dollar exchange rate. Then try to judge upon how the estimated autocorrelations for the series z t change with the time lag between observations and check your judgement by estimating the autocorrelations.” The changes are already present in the column Difference. The analogous procedures are applied to this column to produce the time series graph and the estimated acf plot, i.e. by including only values where column Year is  1994.

Noisy plot  As previously plot z t vs. z t – 1 Seems to be no autocorrelation at all

Our conclusions are verified!

“B. Time series with seasonal variation Use the time series of monthly discharge in the lake Hjälmaren (‘Hjalmarenmonth.txt’), which you have used in the assignment for week 36. Compute the autocorrelation function (Minitab: Stat  Time series  Autocorrelation…) for the variable Discharge.m.”

“Deseasonalise the time series and make a new graph of the seasonally adjusted values. Try to visually estimate how the autocorrelations look like and check your judgement by computing the autocorrelation function.” Additive model for deseasonalization seems best!

Plot DESE1(t) vs. DESE1(t-1) Indicates positive autocorrelation

Indication confirmed!

“C. Forecasting with autoregressive models Data set: The Dollar Exchange rates Consider again the time series of dollar exchange rates for the period Then use the Minitab time series module ARIMA (see further below) to estimate the parameters in an AR(1)-model (1 nonseasonal autoregressive parameter) and plot the observed values together with forecasts for a period of 20 days after the last observed time-point.” Use the already created column of $US/SEK exchange rates from (there is no opportunity in Minitab’s ARIMA module to just analyze a subset of a column like in the graphing modules)

Forecasts for a 20 days period are requested. (Origin field is left blank analogously to previous modules) Three new columns should be entered here! See next slide!

Must be checked (not default) Should always by checked for diagnostic purposes

Final Estimates of Parameters Type Coef SE Coef T P AR Constant Mean Number of observations: 1229 Residuals: SS = (backforecasts excluded) MS = DF = 1227 Modified Box-Pierce (Ljung-Box) Chi-Square statistic Lag Chi-Square DF P-Value Significant! Keep in mind for comparison with next model OK!

Forecasts from period Percent Limits Period Forecast Lower Upper Actual These forecasts and prediction limits are stored in columns C12, C13 and C14 (as entered in dialog box)

Seems to be OK (as was confirmed by the Ljung-Box statistic)

The column widths_1 (C15) will later be compared with the widths from another model Use the stored prediction limits to calculate the widths of the prediction intervals

“Investigate also if the forecasts can improve by instead using an AR(2)-model.” Don’t forget to enter new columns here!

Final Estimates of Parameters Type Coef SE Coef T P AR AR Constant Mean Number of observations: 1229 Residuals: SS = (backforecasts excluded) MS = DF = 1226 Modified Box-Pierce (Ljung-Box) Chi-Square statistic Lag Chi-Square DF P-Value Non-significant! Slightly larger than in AR(1)-model Still OK!

Calculate widths for the new prediction intervals

Make a time series plot of the intervals widths from the two analyses.

Slightly wider prediction intervals with AR(2)-model (widths_2)  Forecasts do not improve with AR(2)-model

“Finally perform a residual analysis of the errors in the one-step-ahead forecasts (can be asked for under the “Graph” button in the dialog box. By residuals we mean here the errors in the one-step-ahead forecasts). Are there any signs of serial correlations in the residuals?” AR(1): AR(2): No signs of serial correlations in resiaduals in any of the models

“D. ARIMA models and differentiation In this task you will first have to judge upon whether you need to differentiate the current time series ( z t = y t - y t-1 ) before forecasting with an ARMA-model can be applied. Then you shall try different models with a number of parameters to find the model that gives the least one-step-ahead prediction errors on the average. Finally you shall make some residual plots to investigate if the selected model of forecasting can be improved.” “Forecasting monthly dollar exchange rates in Danish crowns (DKK) Data set: The Dollar-Danish Crowns Exchange rates”

“D.1. The need for differentiation Construct a time series graph for the monthly means of dollar exchange rates in Danish crowns (file ‘DKK.txt’). Then estimate the autocorrelations and display them in a graph. Does the time series show any obvious upward or downward trend?”

Note that the y- axis do not start at zero! A slight upward trend may be concluded “Are there any signs of long-time oscillations in the time series (that can be seen from the time series graph)?” Yes, there seem to be a cyclical variation with cycle periods longer than a year.

“Is there a fast cancel-out in the autocorrelations?” No, the cancel-out is not fast (although the spikes come quickly within the red limits) “Is there need for differentiation to get a time series suitable for ARMA- modelling?” Probably, but not certainly!

“D.2 Fitting different ARMA-models Calculate the estimated autocorrelations possibly after differentiation of the original series and display these estimates in a graph.” Without differentiation: (Slowly) decreasing postive autocorrelations. One positive spike (at lag 1) in SPAC  Either this is a non-stationary time series or an AR(1)-time series with a  close to 1.

With first-order differentiation (use the ready series of differences): No obvious pattern in any of these two plots.  The differentiated series may be an ARMA-series

“Then try to predict the dollar exchange rate by combining differentiation with ARMA-models of different orders.” Strategy: On original series, try AR(1) On differentiated series, try AR(1), AR(2), MA(1), MA(2), ARMA(1,1), ARMA(1,2), ARMA(2,1) and ARMA(2,2) Compare the values of MS from each model. This measure corresponds with one- step-ahead prediction errors on the average.

ModelMS OriginalDifferentiated AR(1) AR(1) AR(2) MA(1) MA(2) ARMA(1,1) ARMA(2,1) ARMA(1,2) ARMA(2,2) None of the models on the differentiated series produces better MS value than the AR(1) on original series, but MS seems to decrease with larger complexity.

“What happens if one tries to fit a very complex model with a lot of parameters to the observations?” Study e.g. ARMA(3,3) and ARMA(4,4) on the differentiated series:

Final Estimates of Parameters Type Coef SE Coef T P AR AR AR MA MA MA Constant Differencing: 1 regular difference Number of observations: Original series 95, after differencing 94 Residuals: SS = (backforecasts excluded) MS = DF = 87 Modified Box-Pierce (Ljung-Box) Chi-Square statistic Lag Chi-Square DF P-Value No severe problems but not all parameters are significant! ARMA(3,3) Even lower than in ARMA(2,2)

No severe problems here either, but spikes seem to increase with lag!

Unable to reduce sum of squares any further Final Estimates of Parameters Type Coef SE Coef T P AR AR AR AR MA MA MA MA Constant Differencing: 1 regular difference Number of observations: Original series 95, after differencing 94 Residuals: SS = (backforecasts excluded) MS = DF = 85 Estimation problems! ARMA(4,4) Increased! None of the parameters are significant! Estimation problems and an increase in MS.

The conclusion must be that an AR(1)-model on original data seems to be the best. “D.3. Residual analysis Construct a graph for the residuals (the one-step-ahead prediction errors) and examine visually if anything points to a possible improvement of the model.” SAC and SPAC of residuals do not indicate that another ARIMA-model should be used.

There do not seem to be any violations of the assumption of normal distribution and constant variance either.