Transcript PPTX

plot(forecast(fit, h=10), include=80)
If c=0
If c≠0
If d=0
Long-term forecasts -> zero
Long-term forecasts will -> mean of the data
If d=1
Long-term forecasts -> non-zero constant
Long-term forecasts will follow a straight line
If d=2
Long-term forecasts will follow a straight line
Long-term forecasts will follow a quadratic trend
2



arccos  1 1  2
42 

T
2
e
t
t 1
auto.arima
1. Plot the data. Identify
unusual observations.
Understand patterns.
Select model order
yourself.
2. If necessary, use a BoxCox transformation to
stabilize the variance.
Use automated
algorithm.
3. If necessary, difference the data
until it appears stationary. Use
unit-root tests if you are unsure.
Use auto.arima() to find
the best ARIMA model for
your time series.
4. Plot the ACF/PACF of
the differenced data and
try to determine possible
candidate models.
5. Try your chosen model(s)
and use the AICc to search for
a better model.
6. Check the residuals from your
chosen model by plotting the ACF
of the residuals, and doing a
portmanteau test of the residuals.
Do the
residuals
look like
white
noise?
No
Yes
7. Calculate forecasts.
3. auto.arima
plot.ts(eeadj)
fit <- auto.arima(eeadj)
Series: eeadj
ARIMA(3,1,1)
Coefficients:
ar1
0.0519
s.e.
0.1840
ar2
0.1191
0.0888
ar3
0.3730
0.0679
ma1
-0.4542
0.1993
sigma^2 estimated as 9.532: log likelihood=-484.08
AIC=978.17 AICc=978.49 BIC=994.4
plot(Acf(residuals(fit)))
Box.test(residuals(fit), lag=10, fitdf=6, type=c("Ljung"))
p-value = 0.159; higher is better in this case
plot(forecast(fit))