Professional Documents
Culture Documents
ARIMA MODELS IN R
David Sto er
Professor of Statistics at the University
of Pi sburgh
About Me
Professor of Statistics
ARIMA MODELS IN R
About Me
Professor of Statistics
astsa package
ARIMA MODELS IN R
Time Series Data - I
library(astsa)
plot(jj, main = "Johnson & Johnson Quarterly Earnings per Share", type = "c")
text(jj, labels = 1:4, col = 1:4)
ARIMA MODELS IN R
Time Series Data - II
library(astsa)
plot(globtemp, main = "Global Temperature Deviations", type= "o")
ARIMA MODELS IN R
Time Series Data - III
library(xts)
plot(sp500w, main = "S&P 500 Weekly Returns")
ARIMA MODELS IN R
Time Series Regression Models
Regression: Yi = βXi + ϵi , where ϵi is white noise
White Noise:
ARIMA MODELS IN R
Let's practice!
ARIMA MODELS IN R
Stationarity and
nonstationarity
ARIMA MODELS IN R
David Sto er
Professor of Statistics at the University
of Pi sburgh
Stationarity
A time series is stationary when it is "stable", meaning:
ARIMA MODELS IN R
Stationarity
Given data, x1 , ..., xn we can estimate by averaging
ARIMA MODELS IN R
Southern Oscillation Index
Reasonable to assume stationary, but perhaps some slight
trend.
ARIMA MODELS IN R
Southern Oscillation Index
To estimate autocorrelation, compute the correlation coe cient
between the time series and itself at various lags.
Here you see how to get the correlation at lag 1 and lag 6.
ARIMA MODELS IN R
Random Walk Trend
Not stationary, but di erenced data are stationary.
ARIMA MODELS IN R
Trend Stationarity
Stationarity around a trend, di erencing still works!
ARIMA MODELS IN R
Nonstationarity in trend and variability
First log, then di erence
ARIMA MODELS IN R
Let's practice!
ARIMA MODELS IN R
Stationary time
series: ARMA
ARIMA MODELS IN R
David Sto er
Professor of Statistics at the University
of Pi sburgh
Wold Decomposition
Any ARMA model has this form, which means they are suited to
modeling time series.
ARIMA MODELS IN R
Generating ARMA using arima.sim()
Basic syntax:
arima.sim(model, n, ...)
ARIMA MODELS IN R
Generating and plotting MA(1)
ARIMA MODELS IN R
Generating and plotting MA(1)
ARIMA MODELS IN R
Generating and plotting AR(2)
ARIMA MODELS IN R
Generating and plotting AR(2)
ARIMA MODELS IN R
Let's practice!
ARIMA MODELS IN R