Last Update: June 21, 2022
My online video tutorials are hosted at YouTube channel.
For learning this concept, you can view my online video tutorial: ARIMA Models Identification: Correlograms in R.
Video Code
1. Packages
library(forecast)
library(ggplot2)
2. Data
mdata <- AirPassengers
head(mdata)
Ranges Delimiting
tdata <- window(x = mdata, end = c(1958, 12))
fdata <- window(x = mdata, start = c(1959, 1))
Chart
autoplot(object = tdata) + labs(y = "Air Passengers", x = "Year")
3. ARIMA Models Identification
Correlograms
ggAcf(x = tdata, ci = 0.95, lag.max = 24)
ggPacf(x = tdata, ci = 0.95, lag.max = 24)