# ITSM-R Reference Manual

 To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
Save this PDF as:

Size: px
Start display at page:

## Transcription

1 ITSM-R Reference Manual George Weigt June 5,

2 Contents 1 Introduction Time series analysis in a nutshell White Noise Variance ARMA Coefficients ARIMA Models Data Sets Functions aacvf acvf ar.inf arar arma autofit burg check forecast hannan hr ia ma.inf periodogram plota plotc plots Resid season sim smooth.exp smooth.fft smooth.ma smooth.rank specify test trend yw

3 1 Introduction ITSM-R is an R package for analyzing and forecasting univariate time series data. The intended audience is students using the textbook Introduction to Time Series and Forecasting by Peter J. Brockwell and Richard A. Davis. The textbook includes a student version of the Windows-based program ITSM The initials ITSM stand for Interactive Time Series Modeling. ITSM-R provides a subset of the functionality found in ITSM The following example shows ITSM-R at work forecasting a time series. library(itsmr) plotc(wine) M = c("log","season",12,"trend",1) e = Resid(wine,M) test(e) a = arma(e,p=1,q=1) ee = Resid(wine,M,a) test(ee) forecast(wine,m,a) # Load ITSM-R # Plot the data # Model the data # Obtain residuals # Check for stationarity # Model the residuals # Obtain secondary residuals # Check for white noise # Forecast future values Note the use of Resid with a capital R to compute residuals. ITSM-R uses Resid instead of resid to avoid a name conflict warning when the library is loaded. 1.1 Time series analysis in a nutshell It turns out that you do most of the work. You have to analyze the data and determine a data model M and ARMA model a that yield white noise for residuals. Time series data M a White noise What the software does is invert M and a to transform zero into a forecast. (Recall that zero is the best predictor of noise.) 0 a 1 M 1 Forecast Model M should yield residuals that are a stationary time series. Basically this means that any trend in the data is eliminated. (Seasonality in the data can be removed by either M or a.) The test function is used to determine if the output of M is stationary. The following is the result of test(e) in the above example. ACF PACF Lag Lag Residuals Normal Q-Q Plot Sample Quantiles Index Theoretical Quantiles 3

4 Null hypothesis: Residuals are iid noise. Test Distribution Statistic p-value Ljung-Box Q Q ~ chisq(20) * McLeod-Li Q Q ~ chisq(20) Turning points T (T-93.3)/5 ~ N(0,1) Diff signs S (S-70.5)/3.5 ~ N(0,1) Rank P (P )/283.5 ~ N(0,1) As seen above, the ACF and PACF plots decay rapidly indicating stationarity. After M is determined, the residuals of M are modeled with an ARMA model a. In some circumstances the following table can be useful for choosing p and q from the plots of test(e). ACF PACF Model Decays Zero for h > p AR(p) Zero for h > q Decays MA(q) Decays Decays ARMA(p, q) The ARMA model a should yield residuals that resemble white noise. To check for white noise, the test function is used a second time. The following is the result of test(ee) in the above example. ACF PACF Lag Lag Residuals Normal Q-Q Plot Sample Quantiles Index Theoretical Quantiles Null hypothesis: Residuals are iid noise. Test Distribution Statistic p-value Ljung-Box Q Q ~ chisq(20) McLeod-Li Q Q ~ chisq(20) Turning points T (T-93.3)/5 ~ N(0,1) Diff signs S (S-70.5)/3.5 ~ N(0,1) Rank P (P )/283.5 ~ N(0,1) The vertical lines in the ACF and PACF plots are below the noise threshold (the dashed horizontal lines) for lags greater than zero which is good. In addition, the p-values in the table all fail to reject the null hypothesis of iid noise. Recall that a p-value is the probability that the null hypothesis is true. 1.2 White Noise Variance ITSM-R includes five methods for estimating ARMA parameters. They are Yule-Walker, Burg, Hannan-Rissanen, maximum likelihood, and the innovations method. For all estimation methods, ITSM-R uses the following formula to estimate white noise variance (Brockwell and Davis, p. 164). ˆσ 2 = 1 n (X t ˆX t ) 2 n t=1 4 r t 1

5 The X t ˆX t are innovations (Brockwell and Davis, p. 71). Residuals are defined as follows (Brockwell and Davis, p. 164). Thus ˆσ 2 is the average of the squared residuals. Ŵ t = X t ˆX t rt 1 The innovations algorithm (Brockwell and Davis, p. 73) is used to compute ˆX t and r t 1. Note that the algorithm produces mean squared errors v t 1 = E(X t ˆX t ) 2 for κ(i, j) = E(X i X j ) given in equation (2.5.24). However, ITSM-R uses κ(i, j) = E(W i W j ) given in equation (3.3.3). For the covariance in (3.3.3) the innovations algorithm produces r t 1 = E(W t Ŵt) 2 instead of v t 1. The relationship between v t 1 and r t 1 is given in equation (3.3.8) as where σ 2 is white noise variance. v t 1 = E(X t ˆX t ) 2 = σ 2 E(W t Ŵt) 2 = σ 2 r t 1 It should be noted that γ X in (3.3.3) is the autocovariance of the ARMA model, not of the data. Then by equation (3.2.5) it can be seen that σ 2 in (3.3.3) cancels with σ 2 in γ X. Hence the innovations algorithm does not depend on white noise variance at all. After the innovations are computed, white noise variance is estimated using the above formula for ˆσ 2. Because all estimation methods use the above formula for ˆσ 2, variance estimates computed by ITSM-R are different from what is normally expected. For example, the Yule-Walker estimation function yw returns a white noise variance estimate that differs from the traditional Yule-Walker algorithm. Since variance estimates are computed uniformly, model AICCs can always be compared directly, even when different methods are used to estimate model parameters. For example, it is perfectly valid to compare the AICC of a Yule-Walker model to that of a maximum likelihood model. 1.3 ARMA Coefficients ARMA coefficient vectors are ordered such that the vector index corresponds to the lag of the coefficient. For example, the model with corresponds to the following R vectors. phi = c(1/2,1/3) theta = c(1/4,1/5) X t φ 1 X t 1 φ 2 X t 2 = Z t + θ 1 Z t 1 + θ 2 Z t 2 φ 1 = 1/2 φ 2 = 1/3 θ 1 = 1/4 θ 2 = 1/5 The equivalent model X t = φ 1 X t 1 + φ 2 X t 2 + Z t + θ 1 Z t 1 + θ 2 Z t 2 makes plain the sign convention of the AR coefficients. 5

6 1.4 ARIMA Models ARIMA(p,d,q) models are specified by differencing d times with a lag of one each time. For example, the following R code specifies an ARIMA(1,2,3) model for data set quant. M = c("diff",1,"diff",1) e = Resid(quant,M) a = arma(e,1,3) 1.5 Data Sets ITSM-R includes the following data sets that are featured in Introduction to Time Series and Forecasting. Each data set is an ordinary vector (not a time series object). Name Obs. Description airpass 144 Number of international airline passengers, 1949 to 1960 deaths 72 USA accidental deaths, 1973 to 1978 dowj 78 Dow Jones utilities index, August 28 to December 18, 1972 lake 98 Level of Lake Huron, 1875 to 1972 strikes 30 USA union strikes, 1951 to 1980 Sunspots 100 Number of sunspots, 1770 to 1869 wine 142 Australian red wine sales, January 1980 to October

7 2 Functions 2.1 aacvf Computes the autocovariance of an ARMA model. aacvf(a,h) { a ARMA model h Maximum lag The ARMA model is a list with the following components. \$phi AR coefficients [1:p] = φ 1,..., φ p \$theta MA coefficients [1:q] = θ 1,..., θ q \$sigma2 White noise variance σ 2 Returns a vector of length h+1 to accomodate lag 0 at index 1. The following example is from p. 103 of Introduction to Time Series and Forecasting. R> a = specify(ar=c(1,-0.24),ma=c(0.4,0.2,0.1)) R> aacvf(a,3) [1]

8 2.2 acvf Computes the autocovariance of time series data. acvf(x,h=40) { x Data h Maximum lag Returns a vector of length h+1 to accommodate lag 0 at index 1. R> gamma = acvf(sunspots) R> plot(0:40,gamma,type="h") gamma :40 8

9 2.3 ar.inf Returns the AR( ) coefficients π 0, π 1,..., π n where π 0 = 1. ar.inf(a,n) { a ARMA model n Order A vector of length n+1 is returned to accommodate π 0 at index 1. R> a = yw(sunspots,2) R> ar.inf(a,10) [1] [7] For invertible ARMA processes, AR( ) is the polynomial π(z) such that The corresponding autoregression is π(z) = φ(z) θ(z) = 1 + π 1z + π 2 z 2 + Z t = π(b)x t = X t + π 1 X t 1 + π 2 X t 2 + The coefficients π j are calculated recursively using the following formula. (See p. 86 of Introduction to Time Series and Forecasting.) π j = φ j q θ k π j k j = 1, 2,... k=1 9

10 2.4 arar Predict future values of a time series using the ARAR algorithm. arar(x,h=10,opt=2) x h opt Observed data Steps ahead Display option The display options are 0 for silent, 1 for tabulate, 2 for plot and tabulate. Returns the following list invisibly. \$pred Predicted values \$se Standard errors \$l Lower bounds \$u Upper bounds R> arar(airpass) Optimal lags Optimal coeffs WN Variance Filter Step Prediction sqrt(mse) Lower Bound Upper Bound

11 2.5 arma Returns an ARMA model using maximum likelihood to estimate the AR and MA coefficients. arma(x,p=0,q=0) x p q Data AR order MA order The R function arima is called to estimate φ and θ. The innovations algorithm is used to estimate the white noise variance σ 2. The resulting ARMA model is a list with the following components. \$phi AR coefficients [1:p] = φ 1,..., φ p \$theta MA coefficients [1:q] = θ 1,..., θ q \$sigma2 White noise variance σ 2 \$aicc Akaike information criterion corrected \$se.phi Standard errors for the AR coefficients \$se.theta Standard errors for the MA coefficients The signs of the coefficients correspond to the following model. X t = p φ j X t j + Z t + j=1 q θ k Z t k The following example estimates ARMA(1,0) parameters for a stationary transformation of the Dow Jones data. R> xv = c("diff",1) R> e = Resid(dowj,xv) R> a = arma(e,1,0) R> a \$phi [1] \$theta [1] 0 \$sigma2 [1] \$aicc [1] \$se.phi [1] \$se.theta [1] 0 k=1 11

12 2.6 autofit Uses maximum likelihood to determine the best ARMA model given a range of models. The autofit function tries all combinations of argument sequences and returns the model with the lowest AICC. This is a wrapper function, the R function arima does the actual estimation. autofit(x,p=0:5,q=0:5) x p q Data AR order MA order Returns a list with the following components. \$phi AR coefficients [1:p] = φ 1,..., φ p \$theta MA coefficients [1:q] = θ 1,..., θ q \$sigma2 White noise variance σ 2 \$aicc Akaike information criterion corrected \$se.phi Standard errors for the AR coefficients \$se.theta Standard errors for the MA coefficients The signs of the coefficients correspond to the following model. X t = p φ j X t j + Z t + j=1 q θ k Z t k The following example shows that an ARMA(1,1) model has the lowest AICC for the Lake Huron data. R> autofit(lake) \$phi [1] \$theta [1] \$sigma2 [1] \$aicc [1] \$se.phi [1] \$se.theta [1] k=1 12

13 2.7 burg Estimates AR coefficients using the Burg method. burg(x,p) { x Data p AR order Returns an ARMA model with the following components. R> burg(lake,1) \$phi [1] \$theta [1] 0 \$sigma2 [1] \$aicc [1] \$se.phi [1] \$se.theta [1] 0 \$phi AR coefficients [1:p] = φ 1,..., φ p \$theta 0 \$sigma2 White noise variance σ 2 \$aicc Akaike information criterion corrected \$se.phi Standard errors for AR coefficients \$se.theta 0 13

14 2.8 check Check for causality and invertibility of an ARMA model. check(a) { a ARMA model The ARMA model is a list with the following components. \$phi \$theta R> a = specify(ar=c(0,0,0.99)) R> check(a) Causal Invertible AR coefficients [1:p] = φ 1,..., φ p MA coefficients [1:q] = θ 1,..., θ q 14

15 2.9 forecast Predict future values of a time series. forecast(x,xv,a,h=10,opt=2) x xv a h opt Observed data Transform vector ARMA model Steps ahead Display option The transform vector xv can be NULL for none. The display options are 0 for none, 1 for tabulate, 2 for plot and tabulate. See below for details about the transform vector. R> xv = c("log","season",12,"trend",1) R> e = Resid(wine,xv) R> a = arma(e,1,1) R> forecast(wine,xv,a) Step Prediction Lower Bound Upper Bound The transform vector xv is a vector of strings that specify a sequence of transform functions. The functions are applied to the data in left to right order. There are five functions from which to choose. diff hr log season trend Difference the data Subtract harmonic components Take the log of the data Subtract seasonal component Subtract trend component 15

16 A function name may be followed by one or more arguments. diff has a single argument, the lag. hr has one or more arguments, each specifying the number of observations per harmonic period. log has no arguments. season has one argument, the number of observations per season. trend has one argument, the polynomial order of the trend, (1 for linear, 2 for quadratic, etc.) A transform vector is built up by concatenating the function names and arguments. For example, the following vector takes the log of the data, then subtracts a seasonal component of period twelve then subtracts a linear trend component. R> xv = c("log","season",12,"trend",1) At the end of the transform vector there is an implied subtraction of the mean operation. Hence the resulting time series always has zero mean. 16

17 2.10 hannan Estimates ARMA coefficients using the Hannan-Rissanen algorithm. It is required that q > 0. hannan(x,p,q) x p q Data AR order MA order Returns a list with the following components. R> hannan(lake,1,1) \$phi [1] \$theta [1] \$sigma2 [1] \$aicc [1] \$se.phi [1] \$se.theta [1] \$phi AR coefficients [1:p] = φ 1,..., φ p \$theta MA coefficients [1:q] = θ 1,..., θ q \$sigma2 White noise variance σ 2 \$aicc Akaike information criterion corrected \$se.phi Standard errors for AR coefficients \$se.theta Standard errors for MA coefficients 17

18 2.11 hr Returns the sum of harmonic components of time series data. hr(x,d) { x Data d Vector of harmonic periods R> y = hr(deaths,c(12,6)) R> plotc(deaths,y)

19 2.12 ia Calculates MA coefficients using the innovations algorithm. ia(x,q,m=17) x q m Data MA order Recursion level Returns a list with the following components. \$phi 0 \$theta MA coefficients [1:q] = θ 1,..., θ q \$sigma2 White noise variance σ 2 \$aicc Akaike information criterion corrected \$se.phi 0 \$se.theta Standard errors for MA coefficients Normally m should be set to the default 17 even when fewer MA coefficients are required. The following example generates results that match Introduction to Time Series and Forecasting p R> y = diff(dowj) R> a = ia(y,17) R> round(a\$theta,4) [1] [9] [17] R> round(a\$theta/a\$se/1.96,4) [1] [9] [17] The formula for the standard error of the jth coefficient is given on p. 152 of Introduction to Time Series and Forecasting as [ j 1 σ j = n 1/2 i=0 ˆθ 2 mi ] 1/2 where ˆθ m0 = 1. Hence the standard error for ˆθ 1 is σ 1 = n 1/2. 19

20 2.13 ma.inf Returns the MA( ) coefficients ψ 0, ψ 1,..., ψ n where ψ 0 = 1. ma.inf(m,n) { a ARMA model n Order A vector of length n+1 is returned to accommodate ψ 0 at index 1. R> a = yw(sunspots,2) R> ma.inf(a,10) [1] [6] [11] For causal ARMA processes, MA( ) is the polynomial ψ(z) such that The corresponding moving average is ψ(z) = θ(z) φ(z) = 1 + ψ 1z + ψ 2 z 2 + X t = ψ(b)z t = Z t + ψ 1 Z t 1 + ψ 2 Z t 2 + The coefficients ψ j are calculated recursively using the following formula. (See p. 85 of Introduction to Time Series and Forecasting.) ψ j = θ j + p φ k ψ j k j = 1, 2,... k=1 20

21 2.14 periodogram Plots a periodogram. periodogram(x,q=0,opt=2) x q opt Data MA filter order Plot option The periodogram vector divided by 2π is returned invisibly. The plot options are 0 for no plot, 1 to plot only the periodogram, and 2 to plot both the periodogram and the filter coefficients. The filter q can be a vector in which case the overall filter is the composition of MA filters of the designated orders. R> periodogram(sunspots,c(1,1,1,1)) Filter (Smoothed Periodogram)/2pi Smoothing Filter

22 2.15 plota Plots data and/or model ACF and PACF side by side similar to ITSM plota(u,v=null,h=40) { u, v Data and/or ARMA model, in either order h Maximum lag R> plota(sunspots) ACF PACF Data Data Lag Lag R> a = yw(sunspots,2) R> plota(sunspots,a) ACF PACF Data Model Data Model Lag Lag The following example demonstrates the utility of the ±1.96/ n bounds as a test for noise. R> noise = rnorm(200) R> plota(noise) 22

23 ACF PACF Data Data Lag Lag 23

24 2.16 plotc Plots one or two time series in color similar to ITSM plotc(y1,y2=null) { y1 Blue line with knots y2 Red line without knots R> plotc(uspop) R> y = trend(uspop,2) R> plotc(uspop,y)

25 2.17 plots Plots the spectrum of data or an ARMA model. plots(u) { u Data or an ARMA model R> a = specify(ar=c(0,0,0.99)) R> plots(a) Model Spectrum

26 2.18 Resid Returns the residuals of a time series model. Resid(x,xv=NULL,a=NULL) x xv a Observed data Transform vector ARMA model Either xv or the model can be NULL for none. See below for details about the transform vector. The returned residuals always have zero mean, even when xv is NULL. In the following example, Resid and test are used to check for stationarity of the transformed data. Then they are used again to check that the overall model reduces the data to white noise. R> xv = c("log","season",12,"trend",1) R> e = Resid(airpass,xv) R> test(e) R> a = arma(e,1,0) R> ee = Resid(airpass,xv,a) R> test(ee) The transform vector xv is a vector of strings that specify a sequence of transform functions. The functions are applied to the data in left to right order. There are five functions from which to choose. diff hr log season trend Difference the data Subtract harmonic components Take the log of the data Subtract seasonal component Subtract trend component A function name may be followed by one or more arguments. diff has a single argument, the lag. hr has one or more arguments, each specifying the number of observations per harmonic period. log has no arguments. season has one argument, the number of observations per season. trend has one argument, the polynomial order of the trend, (1 for linear, 2 for quadratic, etc.) A transform vector is built up by concatenating the function names and arguments. For example, the following vector takes the log of the data, then subtracts a seasonal component of period twelve then subtracts a linear trend component. > xv = c("log","season",12,"trend",1) At the end of the transform vector there is an implied subtraction of the mean operation. Hence the resulting time series always has zero mean. 26

27 2.19 season Returns the seasonal component of time series data. season(x,d) { x Data d Number of observations per season R> s = season(deaths,12) R> plotc(deaths,s)

28 2.20 sim Generate synthetic observations for an ARMA model. sim(a,n) { a ARMA model n Number of synthetic observations required The ARMA model is a list with the following components. R> a = specify(ar=c(0,0,0.99)) R> x = sim(a,60) R> plotc(x) \$phi AR coefficients φ 1,..., φ p \$theta MA coefficients θ 1,..., θ q \$sigma2 White noise variance σ

29 2.21 smooth.exp Applies an exponential smoothing filter to data and returns the result. smooth.exp(x,a) { x Data a 0 to 1, zero is maximum smoothness. R> y = smooth.exp(strikes,0.4) R> plotc(strikes,y)

30 2.22 smooth.fft Applies a low pass filter to data and returns the result. smooth.fft(x,c) { x Data c Cut-off freq. 0 1 The cut-off frequency is specified as a fraction. For example, c = 0.25 passes the lowest 25% of the frequency spectrum. R> y = smooth.fft(signal,0.035) R> plotc(signal,y)

31 2.23 smooth.ma Applies a moving average filter to data and returns the result. smooth.ma(x,q) { x Data q Filter order R> y = smooth.ma(strikes,2) R> plotc(strikes,y) From p. 25 of Introduction to Time Series and Forecasting, Hence for q = 2 the moving average filter is Y t = 1 2q + 1 q j= q X t j Y t = 1 5 (X t 2 + X t 1 + X t + X t+1 + X t+2 ) 31

32 2.24 smooth.rank Passes the DC offset (the mean) and the k frequencies with the highest amplitude. The remainder of the spectrum is filtered out. smooth.rank(x,k) { x Data k Rank R> y = smooth.rank(deaths,1) R> plot(deaths,y) R> y = smooth.rank(deaths,2) R> plot(deaths,y)

33 2.25 specify Returns an ARMA model with the specified parameters. specify(ar=0,ma=0,sigma2=1) ar AR coefficients [1:p] = φ 1,..., φ p ma MA coefficients [1:q] = θ 1,..., θ q sigma2 White noise variance σ 2 The signs of the coefficients correspond to the following model. X t = φ 1 X t 1 + φ 2 X t Z t + θ 1 Z t 1 + θ 2 Z t 2 + R> specify(ar=c(0,0,0.99)) \$phi [1] \$theta [1] 0 \$sigma2 [1] 1 33

34 2.26 test Test residuals for randomness. test(e) { e Residuals R> xv = c("log","season",12,"trend",1) R> e = Resid(airpass,xv) R> test(e) Null hypothesis: Residuals are iid noise. Test Distribution Statistic p-value Ljung-Box Q Q ~ chisq(20) * McLeod-Li Q Q ~ chisq(20) * Turning points T (T-94.7)/5 ~ N(0,1) Diff signs S (S-71.5)/3.5 ~ N(0,1) Rank P (P-5148)/289.5 ~ N(0,1) ACF PACF Data Data Lag Lag Residuals Normal Q-Q Plot Sample Quantiles Index Theoretical Quantiles 34

35 2.27 trend Returns the trend component of time series data. trend(x,p) { x Data p Polynomial order R> y = trend(uspop,2) R> plotc(uspop,y)

36 2.28 yw Estimates AR coefficients using the Yule-Walker method. yw(x,p) { x Data p AR order Returns an ARMA model with the following components. R> yw(lake,1) \$phi [1] \$theta [1] 0 \$sigma2 [1] \$aicc [1] \$se.phi [1] \$se.theta [1] 0 \$phi AR coefficients [1:p] = φ 1,..., φ p \$theta 0 \$sigma2 White noise variance σ 2 \$aicc Akaike information criterion corrected \$se.phi Standard errors for AR coefficients \$se.theta 0 36

### Time Series Graphs. Model ACF PACF. White Noise All zeros All zeros. AR(p) Exponential Decay P significant lags before dropping to zero

Time Series Graphs Model ACF PACF White Noise All zeros All zeros AR(p) Exponential Decay P significant lags before dropping to zero MA(q) q significant lags before dropping to zero Exponential Decay ARMA(p,q)

### Software Review: ITSM 2000 Professional Version 6.0.

Lee, J. & Strazicich, M.C. (2002). Software Review: ITSM 2000 Professional Version 6.0. International Journal of Forecasting, 18(3): 455-459 (June 2002). Published by Elsevier (ISSN: 0169-2070). http://0-

### Traffic Safety Facts. Research Note. Time Series Analysis and Forecast of Crash Fatalities during Six Holiday Periods Cejun Liu* and Chou-Lin Chen

Traffic Safety Facts Research Note March 2004 DOT HS 809 718 Time Series Analysis and Forecast of Crash Fatalities during Six Holiday Periods Cejun Liu* and Chou-Lin Chen Summary This research note uses

### Sales forecasting # 2

Sales forecasting # 2 Arthur Charpentier arthur.charpentier@univ-rennes1.fr 1 Agenda Qualitative and quantitative methods, a very general introduction Series decomposition Short versus long term forecasting

### Analysis and Computation for Finance Time Series - An Introduction

ECMM703 Analysis and Computation for Finance Time Series - An Introduction Alejandra González Harrison 161 Email: mag208@exeter.ac.uk Time Series - An Introduction A time series is a sequence of observations

### Time Series - ARIMA Models. Instructor: G. William Schwert

APS 425 Fall 25 Time Series : ARIMA Models Instructor: G. William Schwert 585-275-247 schwert@schwert.ssb.rochester.edu Topics Typical time series plot Pattern recognition in auto and partial autocorrelations

### Lecture 2: ARMA(p,q) models (part 3)

Lecture 2: ARMA(p,q) models (part 3) Florian Pelgrin University of Lausanne, École des HEC Department of mathematics (IMEA-Nice) Sept. 2011 - Jan. 2012 Florian Pelgrin (HEC) Univariate time series Sept.

### Time Series Analysis

Time Series Analysis hm@imm.dtu.dk Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby 1 Outline of the lecture Identification of univariate time series models, cont.:

### Univariate and Multivariate Methods PEARSON. Addison Wesley

Time Series Analysis Univariate and Multivariate Methods SECOND EDITION William W. S. Wei Department of Statistics The Fox School of Business and Management Temple University PEARSON Addison Wesley Boston

### Time Series Analysis

Time Series Analysis Identifying possible ARIMA models Andrés M. Alonso Carolina García-Martos Universidad Carlos III de Madrid Universidad Politécnica de Madrid June July, 2012 Alonso and García-Martos

### Time Series Analysis and Forecasting

Time Series Analysis and Forecasting Math 667 Al Nosedal Department of Mathematics Indiana University of Pennsylvania Time Series Analysis and Forecasting p. 1/11 Introduction Many decision-making applications

### Time Series Analysis

Time Series Analysis Forecasting with ARIMA models Andrés M. Alonso Carolina García-Martos Universidad Carlos III de Madrid Universidad Politécnica de Madrid June July, 2012 Alonso and García-Martos (UC3M-UPM)

### Rob J Hyndman. Forecasting using. 11. Dynamic regression OTexts.com/fpp/9/1/ Forecasting using R 1

Rob J Hyndman Forecasting using 11. Dynamic regression OTexts.com/fpp/9/1/ Forecasting using R 1 Outline 1 Regression with ARIMA errors 2 Example: Japanese cars 3 Using Fourier terms for seasonality 4

### A Multiplicative Seasonal Box-Jenkins Model to Nigerian Stock Prices

A Multiplicative Seasonal Box-Jenkins Model to Nigerian Stock Prices Ette Harrison Etuk Department of Mathematics/Computer Science, Rivers State University of Science and Technology, Nigeria Email: ettetuk@yahoo.com

### Introduction to Time Series Analysis. Lecture 6.

Introduction to Time Series Analysis. Lecture 6. Peter Bartlett www.stat.berkeley.edu/ bartlett/courses/153-fall2010 Last lecture: 1. Causality 2. Invertibility 3. AR(p) models 4. ARMA(p,q) models 1 Introduction

### 9th Russian Summer School in Information Retrieval Big Data Analytics with R

9th Russian Summer School in Information Retrieval Big Data Analytics with R Introduction to Time Series with R A. Karakitsiou A. Migdalas Industrial Logistics, ETS Institute Luleå University of Technology

### Discrete Time Series Analysis with ARMA Models

Discrete Time Series Analysis with ARMA Models Veronica Sitsofe Ahiati (veronica@aims.ac.za) African Institute for Mathematical Sciences (AIMS) Supervised by Tina Marquardt Munich University of Technology,

### Univariate Time Series Analysis; ARIMA Models

Econometrics 2 Fall 25 Univariate Time Series Analysis; ARIMA Models Heino Bohn Nielsen of4 Univariate Time Series Analysis We consider a single time series, y,y 2,..., y T. We want to construct simple

### TIME SERIES ANALYSIS

TIME SERIES ANALYSIS L.M. BHAR AND V.K.SHARMA Indian Agricultural Statistics Research Institute Library Avenue, New Delhi-0 02 lmb@iasri.res.in. Introduction Time series (TS) data refers to observations

### Introduction to Time Series and Forecasting, Second Edition

Introduction to Time Series and Forecasting, Second Edition Peter J. Brockwell Richard A. Davis Springer Springer Texts in Statistics Advisors: George Casella Stephen Fienberg Ingram Olkin Springer New

### Time Series Analysis

Time Series Analysis Autoregressive, MA and ARMA processes Andrés M. Alonso Carolina García-Martos Universidad Carlos III de Madrid Universidad Politécnica de Madrid June July, 212 Alonso and García-Martos

### Graphical Tools for Exploring and Analyzing Data From ARIMA Time Series Models

Graphical Tools for Exploring and Analyzing Data From ARIMA Time Series Models William Q. Meeker Department of Statistics Iowa State University Ames, IA 50011 January 13, 2001 Abstract S-plus is a highly

### Forecasting the US Dollar / Euro Exchange rate Using ARMA Models

Forecasting the US Dollar / Euro Exchange rate Using ARMA Models LIUWEI (9906360) - 1 - ABSTRACT...3 1. INTRODUCTION...4 2. DATA ANALYSIS...5 2.1 Stationary estimation...5 2.2 Dickey-Fuller Test...6 3.

### Time Series Analysis

Time Series 1 April 9, 2013 Time Series Analysis This chapter presents an introduction to the branch of statistics known as time series analysis. Often the data we collect in environmental studies is collected

### TIME SERIES ANALYSIS

TIME SERIES ANALYSIS Ramasubramanian V. I.A.S.R.I., Library Avenue, New Delhi- 110 012 ram_stat@yahoo.co.in 1. Introduction A Time Series (TS) is a sequence of observations ordered in time. Mostly these

### Time Series Laboratory

Time Series Laboratory Computing in Weber Classrooms 205-206: To log in, make sure that the DOMAIN NAME is set to MATHSTAT. Use the workshop username: primesw The password will be distributed during the

### Univariate Time Series Analysis; ARIMA Models

Econometrics 2 Spring 25 Univariate Time Series Analysis; ARIMA Models Heino Bohn Nielsen of4 Outline of the Lecture () Introduction to univariate time series analysis. (2) Stationarity. (3) Characterizing

Chapter 7 Chapter Table of Contents OVERVIEW...193 GETTING STARTED...194 TheThreeStagesofARIMAModeling...194 IdentificationStage...194 Estimation and Diagnostic Checking Stage...... 200 Forecasting Stage...205

### Luciano Rispoli Department of Economics, Mathematics and Statistics Birkbeck College (University of London)

Luciano Rispoli Department of Economics, Mathematics and Statistics Birkbeck College (University of London) 1 Forecasting: definition Forecasting is the process of making statements about events whose

### Exam Solutions. X t = µ + βt + A t,

Exam Solutions Please put your answers on these pages. Write very carefully and legibly. HIT Shenzhen Graduate School James E. Gentle, 2015 1. 3 points. There was a transcription error on the registrar

### 4.3 Moving Average Process MA(q)

66 CHAPTER 4. STATIONARY TS MODELS 4.3 Moving Average Process MA(q) Definition 4.5. {X t } is a moving-average process of order q if X t = Z t + θ 1 Z t 1 +... + θ q Z t q, (4.9) where and θ 1,...,θ q

### AR(p) + MA(q) = ARMA(p, q)

AR(p) + MA(q) = ARMA(p, q) Outline 1 3.4: ARMA(p, q) Model 2 Homework 3a Arthur Berg AR(p) + MA(q) = ARMA(p, q) 2/ 12 ARMA(p, q) Model Definition (ARMA(p, q) Model) A time series is ARMA(p, q) if it is

### Time Series in Mathematical Finance

Instituto Superior Técnico (IST, Portugal) and CEMAT cnunes@math.ist.utl.pt European Summer School in Industrial Mathematics Universidad Carlos III de Madrid July 2013 Outline The objective of this short

### Threshold Autoregressive Models in Finance: A Comparative Approach

University of Wollongong Research Online Applied Statistics Education and Research Collaboration (ASEARC) - Conference Papers Faculty of Informatics 2011 Threshold Autoregressive Models in Finance: A Comparative

### Time Series Analysis: Basic Forecasting.

Time Series Analysis: Basic Forecasting. As published in Benchmarks RSS Matters, April 2015 http://web3.unt.edu/benchmarks/issues/2015/04/rss-matters Jon Starkweather, PhD 1 Jon Starkweather, PhD jonathan.starkweather@unt.edu

### Analysis of algorithms of time series analysis for forecasting sales

SAINT-PETERSBURG STATE UNIVERSITY Mathematics & Mechanics Faculty Chair of Analytical Information Systems Garipov Emil Analysis of algorithms of time series analysis for forecasting sales Course Work Scientific

### Financial TIme Series Analysis: Part II

Department of Mathematics and Statistics, University of Vaasa, Finland January 29 February 13, 2015 Feb 14, 2015 1 Univariate linear stochastic models: further topics Unobserved component model Signal

### Performing Unit Root Tests in EViews. Unit Root Testing

Página 1 de 12 Unit Root Testing The theory behind ARMA estimation is based on stationary time series. A series is said to be (weakly or covariance) stationary if the mean and autocovariances of the series

### COMP6053 lecture: Time series analysis, autocorrelation. jn2@ecs.soton.ac.uk

COMP6053 lecture: Time series analysis, autocorrelation jn2@ecs.soton.ac.uk Time series analysis The basic idea of time series analysis is simple: given an observed sequence, how can we build a model that

### Lecture 4: Seasonal Time Series, Trend Analysis & Component Model Bus 41910, Time Series Analysis, Mr. R. Tsay

Lecture 4: Seasonal Time Series, Trend Analysis & Component Model Bus 41910, Time Series Analysis, Mr. R. Tsay Business cycle plays an important role in economics. In time series analysis, business cycle

### Some useful concepts in univariate time series analysis

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

### Modeling and Forecasting of Gold Prices on Financial Markets

Modeling and Forecasting of Gold Prices on Financial Markets Rebecca Davis Department of Mathematical Sciences Pentecost University College Accra-Ghana. Vincent Kofi Dedu Department of Mathematics Kwame

### Introduction to ARMA Models

Statistics 910, #8 1 Overview Introduction to ARMA Models 1. Modeling paradigm 2. Review stationary linear processes 3. ARMA processes 4. Stationarity of ARMA processes 5. Identifiability of ARMA processes

### Time Series Analysis of Aviation Data

Time Series Analysis of Aviation Data Dr. Richard Xie February, 2012 What is a Time Series A time series is a sequence of observations in chorological order, such as Daily closing price of stock MSFT in

### Is the Basis of the Stock Index Futures Markets Nonlinear?

University of Wollongong Research Online Applied Statistics Education and Research Collaboration (ASEARC) - Conference Papers Faculty of Engineering and Information Sciences 2011 Is the Basis of the Stock

### Vector Time Series Model Representations and Analysis with XploRe

0-1 Vector Time Series Model Representations and Analysis with plore Julius Mungo CASE - Center for Applied Statistics and Economics Humboldt-Universität zu Berlin mungo@wiwi.hu-berlin.de plore MulTi Motivation

### IBM SPSS Forecasting 22

IBM SPSS Forecasting 22 Note Before using this information and the product it supports, read the information in Notices on page 33. Product Information This edition applies to version 22, release 0, modification

### Time Series Analysis of Price Indices

, October 2010 Time Series Analysis of Price Indices MoonJung Cho John L. Eltinge Patrick A. Bobbitt Stuart Scott Abstract The International Price Program of the Bureau of Labor Statistics estimates monthly

### Estimating an ARMA Process

Statistics 910, #12 1 Overview Estimating an ARMA Process 1. Main ideas 2. Fitting autoregressions 3. Fitting with moving average components 4. Standard errors 5. Examples 6. Appendix: Simple estimators

### Using JMP Version 4 for Time Series Analysis Bill Gjertsen, SAS, Cary, NC

Using JMP Version 4 for Time Series Analysis Bill Gjertsen, SAS, Cary, NC Abstract Three examples of time series will be illustrated. One is the classical airline passenger demand data with definite seasonal

### MGT 267 PROJECT. Forecasting the United States Retail Sales of the Pharmacies and Drug Stores. Done by: Shunwei Wang & Mohammad Zainal

MGT 267 PROJECT Forecasting the United States Retail Sales of the Pharmacies and Drug Stores Done by: Shunwei Wang & Mohammad Zainal Dec. 2002 The retail sale (Million) ABSTRACT The present study aims

### 3.1 Stationary Processes and Mean Reversion

3. Univariate Time Series Models 3.1 Stationary Processes and Mean Reversion Definition 3.1: A time series y t, t = 1,..., T is called (covariance) stationary if (1) E[y t ] = µ, for all t Cov[y t, y t

### Booth School of Business, University of Chicago Business 41202, Spring Quarter 2015, Mr. Ruey S. Tsay. Solutions to Midterm

Booth School of Business, University of Chicago Business 41202, Spring Quarter 2015, Mr. Ruey S. Tsay Solutions to Midterm Problem A: (30 pts) Answer briefly the following questions. Each question has

### 2.2 Elimination of Trend and Seasonality

26 CHAPTER 2. TREND AND SEASONAL COMPONENTS 2.2 Elimination of Trend and Seasonality Here we assume that the TS model is additive and there exist both trend and seasonal components, that is X t = m t +

### Time Series HILARY TERM 2010 PROF. GESINE REINERT http://www.stats.ox.ac.uk/~reinert

Time Series HILARY TERM 2010 PROF. GESINE REINERT http://www.stats.ox.ac.uk/~reinert Overview Chapter 1: What are time series? Types of data, examples, objectives. Definitions, stationarity and autocovariances.

UCL DEPARTMENT OF SECURITY AND CRIME SCIENCE Advanced time-series analysis Lisa Tompson Research Associate UCL Jill Dando Institute of Crime Science l.tompson@ucl.ac.uk Overview Fundamental principles

### Prediction of Stock Price usingautoregressiveintegrated Moving AverageFilter Arima P,D,Q

Global Journal of Science Frontier Research Mathematics and Decision Sciences Volume 13 Issue 8 Version 1.0 Year Type : Double Blind Peer Reviewed International Research Journal Publisher: Global Journals

### Introduction to Time Series Analysis. Lecture 1.

Introduction to Time Series Analysis. Lecture 1. Peter Bartlett 1. Organizational issues. 2. Objectives of time series analysis. Examples. 3. Overview of the course. 4. Time series models. 5. Time series

### THE UNIVERSITY OF CHICAGO, Booth School of Business Business 41202, Spring Quarter 2014, Mr. Ruey S. Tsay. Solutions to Homework Assignment #2

THE UNIVERSITY OF CHICAGO, Booth School of Business Business 41202, Spring Quarter 2014, Mr. Ruey S. Tsay Solutions to Homework Assignment #2 Assignment: 1. Consumer Sentiment of the University of Michigan.

### Forecasting of Paddy Production in Sri Lanka: A Time Series Analysis using ARIMA Model

Tropical Agricultural Research Vol. 24 (): 2-3 (22) Forecasting of Paddy Production in Sri Lanka: A Time Series Analysis using ARIMA Model V. Sivapathasundaram * and C. Bogahawatte Postgraduate Institute

### Time Series Analysis 1. Lecture 8: Time Series Analysis. Time Series Analysis MIT 18.S096. Dr. Kempthorne. Fall 2013 MIT 18.S096

Lecture 8: Time Series Analysis MIT 18.S096 Dr. Kempthorne Fall 2013 MIT 18.S096 Time Series Analysis 1 Outline Time Series Analysis 1 Time Series Analysis MIT 18.S096 Time Series Analysis 2 A stochastic

### Week TSX Index 1 8480 2 8470 3 8475 4 8510 5 8500 6 8480

1) The S & P/TSX Composite Index is based on common stock prices of a group of Canadian stocks. The weekly close level of the TSX for 6 weeks are shown: Week TSX Index 1 8480 2 8470 3 8475 4 8510 5 8500

### The SAS Time Series Forecasting System

The SAS Time Series Forecasting System An Overview for Public Health Researchers Charles DiMaggio, PhD College of Physicians and Surgeons Departments of Anesthesiology and Epidemiology Columbia University

: Table of Contents... 1 Overview of Model... 1 Dispersion... 2 Parameterization... 3 Sigma-Restricted Model... 3 Overparameterized Model... 4 Reference Coding... 4 Model Summary (Summary Tab)... 5 Summary

### Time Series Analysis in Economics. Klaus Neusser

Time Series Analysis in Economics Klaus Neusser May 26, 2015 Contents I Univariate Time Series Analysis 3 1 Introduction 1 1.1 Some examples.......................... 2 1.2 Formal definitions.........................

### Forecasting Using Eviews 2.0: An Overview

Forecasting Using Eviews 2.0: An Overview Some Preliminaries In what follows it will be useful to distinguish between ex post and ex ante forecasting. In terms of time series modeling, both predict values

### Time Series Analysis

JUNE 2012 Time Series Analysis CONTENT A time series is a chronological sequence of observations on a particular variable. Usually the observations are taken at regular intervals (days, months, years),

### THE SVM APPROACH FOR BOX JENKINS MODELS

REVSTAT Statistical Journal Volume 7, Number 1, April 2009, 23 36 THE SVM APPROACH FOR BOX JENKINS MODELS Authors: Saeid Amiri Dep. of Energy and Technology, Swedish Univ. of Agriculture Sciences, P.O.Box

### Simple Linear Regression Inference

Simple Linear Regression Inference 1 Inference requirements The Normality assumption of the stochastic term e is needed for inference even if it is not a OLS requirement. Therefore we have: Interpretation

### A FULLY INTEGRATED ENVIRONMENT FOR TIME-DEPENDENT DATA ANALYSIS

A FULLY INTEGRATED ENVIRONMENT FOR TIME-DEPENDENT DATA ANALYSIS Version 1.4 July 2007 First edition Intended for use with Mathematica 6 or higher Software and manual: Yu He, John Novak, Darren Glosemeyer

### Promotional Forecast Demonstration

Exhibit 2: Promotional Forecast Demonstration Consider the problem of forecasting for a proposed promotion that will start in December 1997 and continues beyond the forecast horizon. Assume that the promotion

### NTC Project: S01-PH10 (formerly I01-P10) 1 Forecasting Women s Apparel Sales Using Mathematical Modeling

1 Forecasting Women s Apparel Sales Using Mathematical Modeling Celia Frank* 1, Balaji Vemulapalli 1, Les M. Sztandera 2, Amar Raheja 3 1 School of Textiles and Materials Technology 2 Computer Information

### Energy Load Mining Using Univariate Time Series Analysis

Energy Load Mining Using Univariate Time Series Analysis By: Taghreed Alghamdi & Ali Almadan 03/02/2015 Caruth Hall 0184 Energy Forecasting Energy Saving Energy consumption Introduction: Energy consumption.

### IBM SPSS Forecasting 21

IBM SPSS Forecasting 21 Note: Before using this information and the product it supports, read the general information under Notices on p. 107. This edition applies to IBM SPSS Statistics 21 and to all

Ronald Christensen Advanced Linear Modeling Multivariate, Time Series, and Spatial Data; Nonparametric Regression and Response Surface Maximization Second Edition Springer Preface to the Second Edition

### Appendix 1: Time series analysis of peak-rate years and synchrony testing.

Appendix 1: Time series analysis of peak-rate years and synchrony testing. Overview The raw data are accessible at Figshare ( Time series of global resources, DOI 10.6084/m9.figshare.929619), sources are

### Studying Achievement

Journal of Business and Economics, ISSN 2155-7950, USA November 2014, Volume 5, No. 11, pp. 2052-2056 DOI: 10.15341/jbe(2155-7950)/11.05.2014/009 Academic Star Publishing Company, 2014 http://www.academicstar.us

### TIME-SERIES ANALYSIS, MODELLING AND FORECASTING USING SAS SOFTWARE

TIME-SERIES ANALYSIS, MODELLING AND FORECASTING USING SAS SOFTWARE Ramasubramanian V. IA.S.R.I., Library Avenue, Pusa, New Delhi 110 012 ramsub@iasri.res.in 1. Introduction Time series (TS) data refers

### Forecasting methods applied to engineering management

Forecasting methods applied to engineering management Áron Szász-Gábor Abstract. This paper presents arguments for the usefulness of a simple forecasting application package for sustaining operational

### AR(1) TIME SERIES PROCESS Econometrics 7590

AR(1) TIME SERIES PROCESS Econometrics 7590 Zsuzsanna HORVÁTH and Ryan JOHNSTON Abstract: We define the AR(1) process and its properties and applications. We demonstrate the applicability of our method

### Time Series Analysis with R - Part I. Walter Zucchini, Oleg Nenadić

Time Series Analysis with R - Part I Walter Zucchini, Oleg Nenadić Contents 1 Getting started 2 1.1 Downloading and Installing R.................... 2 1.2 Data Preparation and Import in R.................

### Forecasting in supply chains

1 Forecasting in supply chains Role of demand forecasting Effective transportation system or supply chain design is predicated on the availability of accurate inputs to the modeling process. One of the

### Maximum Likelihood Estimation of an ARMA(p,q) Model

Maximum Likelihood Estimation of an ARMA(p,q) Model Constantino Hevia The World Bank. DECRG. October 8 This note describes the Matlab function arma_mle.m that computes the maximum likelihood estimates

### ARMA, GARCH and Related Option Pricing Method

ARMA, GARCH and Related Option Pricing Method Author: Yiyang Yang Advisor: Pr. Xiaolin Li, Pr. Zari Rachev Department of Applied Mathematics and Statistics State University of New York at Stony Brook September

### 3. Regression & Exponential Smoothing

3. Regression & Exponential Smoothing 3.1 Forecasting a Single Time Series Two main approaches are traditionally used to model a single time series z 1, z 2,..., z n 1. Models the observation z t as a

### Chapter 12: Time Series Models

Chapter 12: Time Series Models In this chapter: 1. Estimating ad hoc distributed lag & Koyck distributed lag models (UE 12.1.3) 2. Testing for serial correlation in Koyck distributed lag models (UE 12.2.2)

### USE OF ARIMA TIME SERIES AND REGRESSORS TO FORECAST THE SALE OF ELECTRICITY

Paper PO10 USE OF ARIMA TIME SERIES AND REGRESSORS TO FORECAST THE SALE OF ELECTRICITY Beatrice Ugiliweneza, University of Louisville, Louisville, KY ABSTRACT Objectives: To forecast the sales made by

### Introduction to Regression and Data Analysis

Statlab Workshop Introduction to Regression and Data Analysis with Dan Campbell and Sherlock Campbell October 28, 2008 I. The basics A. Types of variables Your variables may take several forms, and it

### Predicting Indian GDP. And its relation with FMCG Sales

Predicting Indian GDP And its relation with FMCG Sales GDP A Broad Measure of Economic Activity Definition The monetary value of all the finished goods and services produced within a country's borders

### 11. Time series and dynamic linear models

11. Time series and dynamic linear models Objective To introduce the Bayesian approach to the modeling and forecasting of time series. Recommended reading West, M. and Harrison, J. (1997). models, (2 nd

### Do Electricity Prices Reflect Economic Fundamentals?: Evidence from the California ISO

Do Electricity Prices Reflect Economic Fundamentals?: Evidence from the California ISO Kevin F. Forbes and Ernest M. Zampelli Department of Business and Economics The Center for the Study of Energy and

### Java Modules for Time Series Analysis

Java Modules for Time Series Analysis Agenda Clustering Non-normal distributions Multifactor modeling Implied ratings Time series prediction 1. Clustering + Cluster 1 Synthetic Clustering + Time series

### Time-Series Analysis CHAPTER. 18.1 General Purpose and Description 18-1

CHAPTER 8 Time-Series Analysis 8. General Purpose and Description Time-series analysis is used when observations are made repeatedly over 5 or more time periods. Sometimes the observations are from a single

### Time Series Analysis

Time Series Analysis Lecture Notes for 475.726 Ross Ihaka Statistics Department University of Auckland April 14, 2005 ii Contents 1 Introduction 1 1.1 Time Series.............................. 1 1.2 Stationarity

### Gamma Distribution Fitting

Chapter 552 Gamma Distribution Fitting Introduction This module fits the gamma probability distributions to a complete or censored set of individual or grouped data values. It outputs various statistics

### Chapter 6: Multivariate Cointegration Analysis

Chapter 6: Multivariate Cointegration Analysis 1 Contents: Lehrstuhl für Department Empirische of Wirtschaftsforschung Empirical Research and und Econometrics Ökonometrie VI. Multivariate Cointegration

### Econometria dei mercati finanziari c.a. A.A. 2011-2012. 4. AR, MA and ARMA Time Series Models. Luca Fanelli. University of Bologna

Econometria dei mercati finanziari c.a. A.A. 2011-2012 4. AR, MA and ARMA Time Series Models Luca Fanelli University of Bologna luca.fanelli@unibo.it For each class of models considered in these slides

### State Space Time Series Analysis

State Space Time Series Analysis p. 1 State Space Time Series Analysis Siem Jan Koopman http://staff.feweb.vu.nl/koopman Department of Econometrics VU University Amsterdam Tinbergen Institute 2011 State