- Stands for AutoRegressive Integrated Moving Average.
- It is a forecasting technique that projects the future values of a series based entirely on its own inertia.
- The model’s parameters are usually estimated using maximum likelihood estimation.
2024-04-08
library(readxl) library(forecast) library(ggplot2) library(zoo) # for as.yearmon() library(lubridate) # for year() and month() library(broom)
An ARIMA model is defined by three parameters: \(p\), \(d\), and \(q\): - \(p\): Number of autoregressive terms. - \(d\): Number of nonseasonal differences for stationarity. - \(q\): Number of lagged forecast errors in the prediction equation.
The general form of an ARIMA(\(p\), \(d\), \(q\)) model is:
\[ (1 - \sum_{i=1}^{p} \phi_i L^i)(1 - L)^d X_t = (1 + \sum_{i=1}^{q} \theta_i L^i) \varepsilon_t \]
auto.arima() function from the forecast R package.| term | estimate | std.error |
|---|---|---|
| ar1 | 0.5441 | 0.04607 |
| ar2 | -0.1754 | 0.04521 |
| ma1 | -0.9545 | 0.02052 |
| sma1 | 0.183 | 0.04688 |
| sma2 | 0.1293 | 0.04118 |
The ARIMA model coefficients provide insights into the relationship between past values of the series (auto-regressive terms) and past errors (moving average terms):
ar1 and ar2 are the coefficients for the first and second autoregressive terms, respectively. An ar1 coefficient of 0.5441 suggests that there is a significant positive relationship between the current value and the value at the previous time step. The ar2 coefficient of -0.1754 indicates a smaller, negative relationship with the value two time steps ago.ma1 represents the coefficient for the first moving average term. A coefficient of -0.9545 suggests that the model significantly incorporates the error (the difference between the predicted and observed values) from the previous time step into the current prediction.
sma1 and sma2 are the seasonal moving average terms. The coefficients 0.183 and 0.1293 indicate the effects of past seasonal errors on the current season’s predictions.
Standard errors associated with these coefficients (std.error) quantify the uncertainty of each estimate. Smaller standard errors indicate more reliable estimates of the coefficients. For instance, the ma1 term has a relatively small standard error of 0.02052, highlighting a high degree of confidence in this particular estimate.
The fitted ARIMA model suggests that both recent values and errors, along with some seasonal error patterns, play a significant role in predicting future CPI values. The confidence in these estimates varies, as indicated by the standard errors, with some terms showing more predictive reliability than others.
30-Year CPI Inflation Forecast
Key elements to interpret on the chart:
Forecast Line: This is the main line on the plot and represents the model’s best guess for future values of CPI. Observing the slope of this line can give insights into the expected increase or decrease in inflation rates over time.
Confidence Intervals: The shaded areas around the forecast line represent confidence intervals, often set at 80% and 95%. These intervals reflect the uncertainty of the forecast; the wider they are, the less certain the forecast. Points within the interval are considered plausible future values given the model and the data.