Lec12 – Time Series Analysis - ARIMA

5758 se 00244 sigma2 estimated as 2687 log likelihood

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: eries_volspd.csv",sep=',',header = T) ts_vol <- ts(m_data[1:1200,3]) plot.ts(ts_vol) CIE/IE 500 Transportation Analytics - Fall 2012 44 check its residual's acf and pacf Check First Differencing Just for kicks, lets look at the acf acf(ts_vol,50) Simple differencing looks stationary plot.ts(diff(ts_vol)) CIE/IE 500 Transportation Analytics - Fall 2012 45 Check ACF and PACF of Differenced Series acf(diff(ts_vol),20) ARIMA(0,1,1) pacf(diff(ts_vol),20) ARIMA(4,1,0) CIE/IE 500 Transportation Analytics - Fall 2012 46 Fit as ARIMA(0,1,1) > vol_011<-arima(ts_vol, order=c(0,1,1)) > vol_011 Call: arima(x = ts_vol, order = c(0, 1, 1)) Coefficients: ma1 -0.5758 s.e. 0.0244 sigma^2 estimated as 268.7: log likelihood = -5054.89, aic = 10113.78 xt − xt −1 = −0.5785wt −1 + wt CIE/IE 500 Transportation Analytics - Fall 2012 47 Diagnostic Checking of ARIMA(0,1,1) tsdiag(vol_011,gof.lag=20) H0: residuals have no autocorrelation CIE/IE 500 Transportation Analytics - Fall 2012 48 Predicted VS Actual by ARIMA(0,1,1) library(hydroGOF) rmse_010 <- rmse(ts_vol-vol_011$residuals,ts_vol) plot(ts_vol-vol_011$residuals,ts_vol,xlab='Predicted by ARIMA(0,1,1)',ylab='Actual',main=paste('RMSE=',rmse_010,sep='')) abline(coef=c(0,1)) CIE/IE 500 Transportation Analytics - Fall 2012 49 Fit as ARIMA(4,1,0) > vol_410<-arima(ts_vol, order=c(4,1,0)) > vol_410 Call: arima(x = ts_vol, order = c(4, 1, 0)) Coefficients: ar1 ar2 ar3 ar4 -0.5578 -0.3019 -0.1891 -0.0870 s.e. 0.0288 0.0325 0.0325 0.0287 sigma^2 estimated as 269.6: log likelihood = -5056.89, aic = 10123.78 xt − xt −1 = −0.5578( xt −1 − xt − 2 ) − 0.3019( xt − 2 − xt −3 ) − 0.1891( xt −3 − xt − 4 ) − 0.087( xt − 4 − xt −5 ) + wt CIE/IE 500 Transportation Analytics - Fall 2012 50 Diagnostic Checking of ARIMA(4,1,0) tsdiag(vol_410,gof.lag=20) CIE/IE 500 Transportation Analytics - Fall 2012 51 Predicted VS Actual by ARIMA(4,1,0) library(hydroGOF) rmse_410 <- rmse(ts_vol-vol_410$residuals,ts_vol) plot(ts_vol-vol_410$residuals,ts_vol,xlab='Predicted by ARIMA(4,1,0)',ylab='Actual',main=paste('RMSE=',rmse_410,sep='')) abline(coef=c(0,1)) CIE/IE 500 Transportation Analytics - Fall 2012 52 Fit as ARIMA(?,1,1) ARIMA model AIC(-2loglik + p) ARIMA(0,1,1) 10113.78 ARIMA(4,1,0) 10123.78 ARIMA(4,1,1) 10120.02 ARIMA(3,1,1) 10118.02 ARIMA(2,1,1) 10116.22 ARIMA(1,1,1) 10115.35 CIE/IE 500 Transportation Analytics - Fall 2012 Best 53 SARIMA The multiplicative seasonal autoregressive integrated moving average model, or SARIMA model, of Box and Jenkins (1970) is given by D Φ P ( B s )φ ( B)∇ s ∇ d xt = ΘQ ( B s )θ ( B) wt where wt is the usual Gaussian white noise process. The general model is denoted as ARIMA(p,d,q)×(P,D,Q)s.P-SAR term, Q-SMA term,D-SD term, sseason period Recall: ∇ d = (1 − B ) d φ ( B) = 1 − φ1 B − φ2 B 2 − ... − φ p B p θ ( B) = 1 + θ1 B + θ 2 B 2 + ... + θ q B q What’s new: ∇ D = (1 − B s ) D s Φ P ( B s ) = 1 − Φ1 B s − Φ 2 B 2 s − ... − Φ P B Ps ΘQ ( B s ) = 1 + Θ1 B s + Θ 2...
View Full Document

Ask a homework question - tutors are online