Forecasting (prediction) limits Example Linear deterministic trend estimated by least-squares Note! The average of the numbers 1, 2, …, t is.

Slides:



Advertisements
Similar presentations
FINANCIAL TIME-SERIES ECONOMETRICS SUN LIJIAN Feb 23,2001.
Advertisements

Time series modelling and statistical trends
Autocorrelation Functions and ARIMA Modelling
Model Building For ARIMA time series
Part II – TIME SERIES ANALYSIS C5 ARIMA (Box-Jenkins) Models
Model specification (identification) We already know about the sample autocorrelation function (SAC): Properties: Not unbiased (since a ratio between two.
Unit Roots & Forecasting
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Lecture 7: Box-Jenkins Models – Part II (Ch. 9) Material.
Applied Business Forecasting and Planning
Time Series Building 1. Model Identification
STAT 497 LECTURE NOTES 8 ESTIMATION.
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.
Tutorial for solution of Assignment week 40 “Forecasting monthly values of Consumer Price Index Data set: Swedish Consumer Price Index” sparetime.
Non-Seasonal Box-Jenkins Models
BABS 502 Lecture 9 ARIMA Forecasting II March 23, 2009.
Forecasting JY Le Boudec 1. Contents 1.What is forecasting ? 2.Linear Regression 3.Avoiding Overfitting 4.Differencing 5.ARMA models 6.Sparse ARMA models.
ARIMA-models for non-stationary time series
Modeling Cycles By ARMA
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.
Data Sources The most sophisticated forecasting model will fail if it is applied to unreliable data Data should be reliable and accurate Data should be.
BABS 502 Lecture 8 ARIMA Forecasting II March 16 and 21, 2011.
1 Ka-fu Wong University of Hong Kong Pulling Things Together.
Prediction and model selection
ARIMA Forecasting Lecture 7 and 8 - March 14-16, 2011
Financial Econometrics
Modern methods The classical approach: MethodProsCons Time series regression Easy to implement Fairly easy to interpret Covariates may be added (normalization)
Part II – TIME SERIES ANALYSIS C2 Simple Time Series Methods & Moving Averages © Angel A. Juan & Carles Serrat - UPC 2007/2008.
Non-Seasonal Box-Jenkins Models
Business Statistics - QBM117 Statistical inference for regression.
BOX JENKINS METHODOLOGY
Box Jenkins or Arima Forecasting. H:\My Documents\classes\eco346\Lectures\chap ter 7\Autoregressive Models.docH:\My Documents\classes\eco346\Lectures\chap.
AR- MA- och ARMA-.
Inference for regression - Simple linear regression
Regression Method.
The Box-Jenkins Methodology for ARIMA Models
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Lecture 8: Estimation & Diagnostic Checking in Box-Jenkins.
#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.
Tutorial for solution of Assignment week 39 “A. Time series without seasonal variation Use the data in the file 'dollar.txt'. “
Lecture 7: Forecasting: Putting it ALL together. The full model The model with seasonality, quadratic trend, and ARMA components can be written: Ummmm,
Autoregressive Integrated Moving Average (ARIMA) Popularly known as the Box-Jenkins methodology.
It’s About Time Mark Otto U. S. Fish and Wildlife Service.
MGS3100_04.ppt/Sep 29, 2015/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Regression Sep 29 and 30, 2015.
John G. Zhang, Ph.D. Harper College
Autocorrelation, Box Jenkins or ARIMA Forecasting.
Big Data at Home Depot KSU – Big Data Survey Course Steve Einbender Advanced Analytics Architect.
1 Chapter 3:Box-Jenkins Seasonal Modelling 3.1Stationarity Transformation “Pre-differencing transformation” is often used to stablize the seasonal variation.
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.
MULTIVARIATE TIME SERIES & FORECASTING 1. 2 : autocovariance function of the individual time series.
Auto Regressive, Integrated, Moving Average Box-Jenkins models A stationary times series can be modelled on basis of the serial correlations in it. A non-stationary.
Estimation Method of Moments (MM) Methods of Moment estimation is a general method where equations for estimating parameters are found by equating population.
Seasonal ARMA forecasting and Fitting the bivariate data to GARCH John DOE.
Review and Summary Box-Jenkins models Stationary Time series AR(p), MA(q), ARMA(p,q)
The Box-Jenkins (ARIMA) Methodology
Seasonal ARIMA FPP Chapter 8.
2/25/ lecture 121 STATS 330: Lecture 12. 2/25/ lecture 122 Diagnostics 4 Aim of today’s lecture To discuss diagnostics for independence.
Introduction to stochastic processes
Time Series Analysis PART II. Econometric Forecasting Forecasting is an important part of econometric analysis, for some people probably the most important.
Subodh Kant. Auto-Regressive Integrated Moving Average Also known as Box-Jenkins methodology A type of linear model Capable of representing stationary.
MODEL DIAGNOSTICS By Eni Sumarminingsih, Ssi, MM.
EC 827 Module 2 Forecasting a Single Variable from its own History.
Analysis of Financial Data Spring 2012 Lecture 4: Time Series Models - 1 Priyantha Wijayatunga Department of Statistics, Umeå University
Lecture 8 ARIMA Forecasting II
Chapter 6: Autoregressive Integrated Moving Average (ARIMA) Models
STAT 497 LECTURE NOTE 9 DIAGNOSTIC CHECKS.
CHAPTER 16 ECONOMIC FORECASTING Damodar Gujarati
BOX JENKINS (ARIMA) METHODOLOGY
Chap 7: Seasonal ARIMA Models
Presentation transcript:

Forecasting (prediction) limits Example Linear deterministic trend estimated by least-squares Note! The average of the numbers 1, 2, …, t is

Hence, calculated prediction limits for Y t+l become where c is a quantile of a proper sampling distribution emerging from the use of and the requested coverage of the limits. For t large it suffices to use the standard normal distribution and a good approximation is also obtained even if the term is omitted under the square root

ARIMA-models Using R ts=arima(x,…) for fitting models plot.Arima(ts,…) for plotting fitted models with 95% prediction limits See documentation for plot.Arima. However, the generic command plot can be used. forecast.Arima Install and load package “forecast”. Gives more flexibility with respect to prediction limits.

Seasonal ARIMA models Example “beersales” data A clear seasonal pattern and also a trend, possibly a quadratic trend

Residuals from detrended data beerq<-lm(beersales~time(beersales)+I(time(beersales)^2)) plot(y=rstudent(beerq),x=as.vector(time(beersales)),type="b", pch=as.vector(season(beersales)),xlab="Time") Seasonal pattern, but possibly no long-term trend left

SAC and SPAC of the residuals: SAC SPAC Spikes at or close to seasonal lags (or half-seasonal lags)

Modelling the autocorrelation at seasonal lags Pure seasonal variation:

Non-seasonal and seasonal variation: AR(p, P) s or ARMA(p,0)  (P,0) s However, we cannot discard that the non-seasonal and seasonal variation “interact”  Better to use multiplicative Seasonal AR Models Example:

Multiplicative MA(q, Q) s or ARMA(0,q)  (0,Q) s Mixed models: Many terms! Condensed expression:

Non-stationary Seasonal ARIMA models Non-stationary at non-seasonal level: Model dth order regular differences: Non-stationary at seasonal level: Seasonal non-stationarity is harder to detect from a plotted times-series. The seasonal variation is not stable. Model Dth order seasonal differences: Example First-order monthly differences: can follow a stable seasonal pattern

The general Seasonal ARIMA model It does not matter whether regular or seasonal differences are taken first

Model specification, fitting and diagnostic checking Example “beersales” data Clearly non- stationary at non- seasonal level, i.e. there is a long- term trend

Investigate SAC and SPAC of original data Many substantial spikes both at non-seasonal and at seasonal level- Calls for differentiation at both levels.

Try first-order seasonal differences first. Here: monthly data beer_sdiff1 <- diff(beersales,lag=12) Look at SAC and SPAC again Better, but now we need to try regular differences

Take first order differences in seasonally differenced data beer_sdiff1rdiff1 <- diff(beer_sdiff1,lag=1) Look at SAC and SPAC again SAC starts to look “good”, but SPAC not

Take second order differences in seasonally differenced data Since we suspected a non-linear long-term trend beer_sdiff1rdiff2 <- diff(diff(beer_sdiff1,lag=1),lag=1) Could be an ARMA(2,0)  (0,1) 12 or an ARMA(1,1)  (0,1) 12 Non-seasonal partSeasonal part

These models for original data becomes ARIMA(2,2,0)  (0,1,1) 12 and ARIMA(1,2,1)  (0,1,1) 12 model1 <-arima(beersales,order=c(2,2,0), seasonal=list(order=c(0,1,1),period=12)) Series: beersales ARIMA(2,2,0)(0,1,1)[12] Coefficients: ar1 ar2 sma s.e sigma^2 estimated as : log likelihood= AIC= AICc= BIC=451.42

Diagnostic checking can be used in a condensed way by function tsdiag. The Ljung-Box test can specifically be obtained from function Box.test tsdiag(model1) standardized residuals SPAC(standardized residuals) P-values of Ljung-Box test with K = 24

Box.test(residuals(model1), lag = 12, type = "Ljung-Box", fitdf = 3) Box-Ljung test data: residuals(model1) X-squared = , df = 9, p-value = K (how many lags included) p + q + P + Q (how many degrees of freedom withdrawn from K) For seasonal data with season length s the L-B test is usually calculated for K = s, 2  s, 3  s and 4  s

Box.test(residuals(model1), lag = 24, type = "Ljung-Box", fitdf = 3) Box-Ljung test data: residuals(model1) X-squared = , df = 21, p-value = 2.581e-05 Box.test(residuals(model1), lag = 36, type = "Ljung-Box", fitdf = 3) Box-Ljung test data: residuals(model1) X-squared = , df = 33, p-value = 2.431e-05 Box.test(residuals(model1), lag = 48, type = "Ljung-Box", fitdf = 3) Box-Ljung test data: residuals(model1) X-squared = , df = 45, p-value = 3.436e-05

Hence, the residuals from the first model are not satisfactory model2 <-arima(beersales,order=c(1,2,1), seasonal=list(order=c(0,1,1),period=12)) print(model2) Series: beersales ARIMA(1,2,1)(0,1,1)[12] Coefficients: ar1 ma1 sma s.e sigma^2 estimated as : log likelihood= AIC= AICc= BIC= Better fit ! But is it good?

tsdiag(model2) Not good! We should maybe try second-order seasonal differentiation too.

Time series regression models The classical set-up uses deterministic trend functions and seasonal indices The classical set-up can be extended by allowing for autocorrelated error terms (instead of white noise). Usually it is sufficient with and AR(1) or AR(2). However, the trend and seasonal terms are still assumed deterministic.

Dynamic time series regression models To extend the classical set-up with explanatory variables comprising other time series we need another way of modelling. Note that a stationary ARMA-model can also be written

The general dynamic regression model for a response time series Y t with one covariate time series X t can be written Special case 1: X t relates to some event that has occurred at a certain time points (e.g. 9/11) It can the either be a step function or a pulse function

Step functions would imply a permanent change in the level of Y t. Such a change can further be constant or gradually increasing (depending on  (B) and  (B) ). It can also be delayed (depending on b ) Pulse functions would imply a temporary change in the level of Y t. Such a change may be just at the specific time point gradually decreasing (depending on  (B) and  (B) ). Strep and pulse functions are used to model the effects of a particular event, as so-called intervention.  Intervention models For X t being a “regular” times series (i.e. varying with time) the models are called transfer function models