Analysis. Components of a Time Series

Similar documents
Suan Sunandha Rajabhat University

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

Modeling and forecasting global mean temperature time series

2. An Introduction to Moving Average Models and ARMA Models

Time Series Analysis -- An Introduction -- AMS 586

Firstly, the dataset is cleaned and the years and months are separated to provide better distinction (sample below).

Chapter 8: Model Diagnostics

Univariate ARIMA Models

Forecasting of the Austrian Inflation Rate

7 Introduction to Time Series

ECONOMETRIA II. CURSO 2009/2010 LAB # 3

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

Basics: Definitions and Notation. Stationarity. A More Formal Definition

Time Series and Forecasting

Lab: Box-Jenkins Methodology - US Wholesale Price Indicator

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

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15

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

Problem Set 2: Box-Jenkins methodology

Empirical Market Microstructure Analysis (EMMA)

Time Series I Time Domain Methods

Minitab Project Report - Assignment 6

Lecture 19 Box-Jenkins Seasonal Models

Economics 618B: Time Series Analysis Department of Economics State University of New York at Binghamton

Univariate linear models

Eco and Bus Forecasting Fall 2016 EXERCISE 2

Frequency Forecasting using Time Series ARIMA model

CHAPTER 8 MODEL DIAGNOSTICS. 8.1 Residual Analysis

Forecasting. Simon Shaw 2005/06 Semester II

Proposed Changes to the PJM Load Forecast Model

Time Series and Forecasting

TIME SERIES DATA ANALYSIS USING EVIEWS

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

FE570 Financial Markets and Trading. Stevens Institute of Technology

Austrian Inflation Rate

STAT 436 / Lecture 16: Key

ARIMA Models. Jamie Monogan. January 16, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 16, / 27

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

5 Autoregressive-Moving-Average Modeling

Romanian Economic and Business Review Vol. 3, No. 3 THE EVOLUTION OF SNP PETROM STOCK LIST - STUDY THROUGH AUTOREGRESSIVE MODELS

Univariate, Nonstationary Processes

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

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA

A SEASONAL TIME SERIES MODEL FOR NIGERIAN MONTHLY AIR TRAFFIC DATA

Introduction to Regression Analysis. Dr. Devlina Chatterjee 11 th August, 2017

Autoregressive models with distributed lags (ADL)

Chart types and when to use them

Econ 427, Spring Problem Set 3 suggested answers (with minor corrections) Ch 6. Problems and Complements:

Answer all questions from part I. Answer two question from part II.a, and one question from part II.b.

Economics 620, Lecture 13: Time Series I

FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL

Analysis of Violent Crime in Los Angeles County

SOME BASICS OF TIME-SERIES ANALYSIS

Cointegration, Stationarity and Error Correction Models.

Classic Time Series Analysis

Financial Time Series Analysis: Part II

3 Time Series Regression

Empirical Approach to Modelling and Forecasting Inflation in Ghana

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

Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia

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

F9 F10: Autocorrelation

Autocorrelation. Think of autocorrelation as signifying a systematic relationship between the residuals measured at different points in time

Problem set 1 - Solutions

White Noise Processes (Section 6.2)

Modelling Monthly Rainfall Data of Port Harcourt, Nigeria by Seasonal Box-Jenkins Methods

LINEAR REGRESSION ANALYSIS. MODULE XVI Lecture Exercises

FinQuiz Notes

Lecture 5: Estimation of time series

Exercises - Time series analysis

MCMC analysis of classical time series algorithms.

LECTURE 13: TIME SERIES I

Econometric Forecasting Overview

Ch 6. Model Specification. Time Series Analysis

Available online at ScienceDirect. Procedia Computer Science 72 (2015 )

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

MODELING MAXIMUM MONTHLY TEMPERATURE IN KATUNAYAKE REGION, SRI LANKA: A SARIMA APPROACH

CLIMATE RESILIENCE FOR ALBERTA MUNICIPALITIES CLIMATE PROJECTIONS NORTHERN ALBERTA. Dr. Mel Reasoner Reasoner Environmental Consulting

Likely causes: The Problem. E u t 0. E u s u p 0

Analyzing And Predicting The Average Monthly Price of Gold. Like many other precious gemstones and metals, the high volume of sales and

Volume 11 Issue 6 Version 1.0 November 2011 Type: Double Blind Peer Reviewed International Research Journal Publisher: Global Journals Inc.

Testing for IID Noise/White Noise: I

Applied Forecasting (LECTURENOTES) Prof. Rozenn Dahyot

MODELLING TIME SERIES WITH CONDITIONAL HETEROSCEDASTICITY

0.1 ARIMA: ARIMA Models for Time Series Data

OPD Attendance of Under-5 Children at an Urban Health Training Centre in West Bengal, India: A Time Series Analysis

Chapter 2: Unit Roots

Time Series Analysis of Currency in Circulation in Nigeria

Statistics for Managers using Microsoft Excel 6 th Edition

Time Series Econometrics 4 Vijayamohanan Pillai N

AUTOCORRELATION. Phung Thanh Binh

Ch 8. MODEL DIAGNOSTICS. Time Series Analysis

Short-run electricity demand forecasts in Maharashtra

LECTURE 10: MORE ON RANDOM PROCESSES

Marcel Dettling. Applied Time Series Analysis SS 2013 Week 05. ETH Zürich, March 18, Institute for Data Analysis and Process Design

Problem Set 2 Solution Sketches Time Series Analysis Spring 2010

Modeling Monthly Average Temperature of Dhahran City of Saudi-Arabia Using Arima Models

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests

APPLIED ECONOMETRIC TIME SERIES 4TH EDITION

Transcription:

Module 8: Time Series Analysis 8.2 Components of a Time Series, Detection of Change Points and Trends, Time Series Models Components of a Time Series There can be several things happening simultaneously in a time series: A trend in the mean A seasonal component that shows a regular pattern repeating on a set cycle (yearly or daily temperatures for example) A cyclic component that is separate from seasonality (19 year tidal cycle) Excursions due to an outside influence (may be temporary or permanent) A random error component Module 8.2 2 1

Components of a Time Series Value 800 600 400 200 0 Time Series Jan-95 Jan-96 Dec-96 Dec-97 Dec-98 Time Module 8.2 3 Components of a Time Series Value Time Series 800 600 400 200 0 Jan-95 Jan-96 Dec-96 Dec-97 Dec-98 Time This series has a linear trend and a 12 month seasonal component and some sort up upset at 37 months and random error Module 8.2 4 2

Components of a Time Series Any given time series may have a combination of these sort of characteristics. The main thing about time series analysis is that it is needed when the data are autocorrelated - that s when the standard techniques fail. Module 8.2 5 Detection of Change Points Detecting a change point means finding an upset or shift in the mean. If it happened at a known time (a known release occurred) then it involves testing for a change in the mean before and after the event. Note that you must use techniques that do not assume independence if significant autocorrelation exists. Module 8.2 6 3

Detection of Change Points Nonparametric techniques will work in this case. If the change occurred at an unknown time, it is a very difficult problem. Consult an expert. Module 8.2 7 Another common problem is detecting and modeling a trend. With independent data points, use simple least squares regression analysis. After the model is fit, test for autocorrelation in the residuals using the Durbin-Watson statistic If the residuals are autocorrelated, you must use a different method of fitting than least squares or use time series methods Module 8.2 8 4

Straight Line Regression Value 800 600 400 200 0 0 10 20 30 40 50 60 Time Module 8.2 9 200 Residuals from Regression Residuals 100 0-100 0 10 20 30 40 50 Time Module 8.2 10 5

Detection of Autocorrelation Durbin-Watson Test n ( i 2 V e ) 2 i ei 1 n ei i 1 where e i to e n are the residuals from the regression analysis V will be 2 if there is no autocorrelation, significantly more than 2 if observations are negatively autocorrelated, and less than 2 if positively autocorrelated 2 Module 8.2 11 Detection of Autocorrelation Durbin-Watson Test Table A2.5 (Manly p 278) gives the critical values for the Durbin-Watson Test For example, for a regression of Y on X with 20 data points, run the regression, obtain the residuals, and calculate V. If positive autocorrelation exists (most common in environmental data), V would be less than 2. The data are definitely significantly positively autocorrelated if V<1.08. Module 8.2 12 6

Detection of Autocorrelation - Durbin-Watson Test Example Square of Square of Time Predicted Y Residuals Residuals Differences Differences 1 8.02 15.44 238.52 2 18.51 387 3.87 14.99-11.57 133.93 3 29.01 69.90 4885.66 66.03 4359.46 4 39.50 74.11 5492.77 4.22 17.77 5 49.99 40.23 1618.31-33.88 1148.19 6 60.48-20.48 419.41-60.71 3685.44 7 70.97-33.38 1114.54-12.91 166.54 8 81.46-16.43 269.80 16.96 287.61 9 91.95-77.01 5930.29-60.58 3670.28 10 102.44-42.07 1770.22 34.93 1220.41 11 112.94-59.35 3521.98-17.27 298.33 12 123.43 23.2727 541.37 82.61 6825.03 13 133.92 6.43 41.41-16.83 283.34 14 144.41 30.59 935.79 24.16 583.50 and so on and so on and so on and so on and so on and so on 155675.64 108745.64 V = 0.70 Module 8.2 13 Detection of Autocorrelation - Durbin-Watson Test Example Null Hypothesis: Data are independent Alt. Hypothesis: Data are autocorrelated V=0.70 n=48 p=1 (regression on one variable) d 1 = 1.42 (for n=50) d 2 = 1.50 (for n=50) The test is significant since V is less than 1.42. Reject the null hypothesis. Module 8.2 14 7

Detection of Autocorrelation - Durbin-Watson Test Example Conclusion: The data are significantly positively autocorrelated. The use of regression analysis is inappropriate since regression analysis assumes independent data (Note on Durbin-Watson test: If the test had been close, use linear interpolation to calculate the values for d 1 and d 2 in between the values given in the table) Module 8.2 15 It s becoming more and more common to use nonparametric tests of trend for environmental data: Mann-Kendall Test Seasonal Kendall Test Moving averages These tests do not assume normally distributed errors; However, the first two still assume independent data points Null hypothesis is always no trend exists Module 8.2 16 8

Mann-Kendall Test Use for data that do not have a seasonal component S where sign(x i -x j ) is -1 for x i -x j <0 0 for x i -x j =0 1 for x i -x j >0 n i 2 i 1 j 1 sign( x i x Module 8.2 17 j ) Mann-Kendall Test If no trend exists, then S is expected to be zero and has variance Var(S) = n(n-1)(2n+5)/18 If n>10, compare the test statistic Z = S/SE(S) against the critical values from the Standard Normal Table Module 8.2 18 9

Mann-Kendall Test Example 5 6 1 8 1 1 7-1 1 1 6-1 -1 0 1 7 1 0-1 1 1 8 1 1 1 0 1 1 9 1 1 1 1 1 1 1 9 0 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 Sums = 4 5 4 5 5 4 3 2 1 33 Module 8.2 19 Mann-Kendall Test Example S = 33 Var(S) = n(n-1)(2n+5)/18 = 10*9*25/18=125 SE(S) = 11.2 Z = S/SE(S) = 33/11.2 = 2.95 Prob (Z<-2.95 and Z>2.95)=2*0.002 = 0.004 Conclusion: Reject the null, there is a trend Module 8.2 20 10

Seasonal Kendall Test Use for data that t do have a seasonal component Calculate S separately for each season A season could be a month or could be groups of months like Spring, Summer, Fall, Winter Sum all of the S s Ss to get S T S T has expected value zero and variance equal to the sum of the variances of the S s Module 8.2 21 compare the test statistic Z = S/SE(S T ) against the critical values from the Standard Normal Table Module 8.2 22 11

Time Series Models Throughout this module, I have referred to time series analysis but haven t described what it is exactly. Much of that is because time series analysis is complex and it s details are beyond the scope of this course However, I will give a brief overview of time series analysis Module 8.2 23 Time Series Models A time series model involves explicitly modeling the residuals as autocorrelated For example: t = t-1 + u t or t = 1 t-1 + 2 t-2 + u t and so on where u t are normally distributed random errors Module 8.2 24 12

Time Series Models There are several types of models for the errors: Autoregressive (AR) Moving average (MA) Autoregressive moving average (ARMA) Integrated autoregressive moving average (ARIMA) Module 8.2 25 Time Series Models Special software is needed to help determine which of these models is best for a series Two correlograms are used: the autocorrelation function (ACF) and the partial autocorrelation function (PACF) Together they can help the modeler determine if the best error model is AR, MA or a mixed model Module 8.2 26 13

Time Series Models 1.0 Autocorrelation ti Plot Correlation 0.5 0.0-0.5-1.0 0 10 20 30 40 5 Lag Module 8.2 27 Time Series Models 1.0 Partial Autocorrelation ti Plot Correlation 0.5 0.0-0.5-1.0 0 10 20 30 40 5 Lag Module 8.2 28 14

Time Series Models Time Series Steps: Differencing to remove trend Seasonal differencing to remove seasonality Re-do ACF and PACF plots Determine order of AR and MA portions of series Use to forecast Module 8.2 29 Time Series Analysis The main point of this module is to be aware that autocorrelation can exist when data points are close together in time and that the presence of autocorrelation can make the use of standard techniques such as regression analysis inappropriate. p Alternative techniques include nonparametric analysis and time series analysis Module 8.2 30 15