Modeling U.S. Inflation Dynamics: A Time Series Application
This analysis investigates U.S. inflation dynamics using quarterly CPI, unemployment, and GDP data from FRED. Inflation is defined as the quarterly percentage change in CPI: \[\text{inflation}_t = 100 \times \left(\frac{CPI_t}{CPI_{t-1}} - 1\right)\]
The modeling strategy integrates traditional time series approaches (AR and ARIMA) with structural diagnostics and modern multivariate frameworks to evaluate the influence of macroeconomic variables on inflation. Let’s get the data first:
STL decomposition of the inflation series reveals clear seasonal and cyclical behavior. This reinforces the use of seasonal components in ARIMA models and motivates further refinement using explicitly seasonal structures.
We begin with an autoregressive model including lagged inflation, unemployment, and GDP growth. Residual diagnostics reveal no significant autocorrelation, implying the AR(1) structure is sufficient to capture temporal dependencies.
arima_model %>%residuals() %>%features(.resid, ~ljung_box(.x, lag =10)) %>% knitr::kable()
.model
lb_stat
lb_pvalue
ARIMA(inflation ~ GDP_growth + Unemployment)
8.922994
0.5394271
The Ljung-Box diagnostics show no strong autocorrelation, indicating the AR(1) structure with regressors reasonably captures short-term dynamics.
Step 2: ARIMA-X Model
We improve upon this by fitting an ARIMA model with exogenous regressors using forecast::auto.arima(), which also allows for seasonal ARMA components. The best-fit specification is an ARIMA(3,0,3)(2,0,2)[4], indicating both short- and medium-term seasonal effects.
\(\beta_1 = 0.0398\) (GDP growth has a positive effect)
\(\beta_2 = -0.0335\) (unemployment has a negative effect)
\(\phi_1, \phi_2, \phi_3\) are AR terms
\(\theta_1\) is the MA(1) term
\(\sigma^2 = 0.04254\) is the estimated variance of white noise
The intercept (\(0.411\)) represents baseline inflation when GDP growth and unemployment are zero—an extrapolation. The AR(3) coefficients collectively dampen long-term deviations from this baseline, while the MA(1) term absorbs shocks.
Activity 2: Residual Diagnostics
Examine ACF/PACF plots and Ljung-Box test results for the ARIMA model. Interpret residual autocorrelation and explain why traditional AR(1) structures may fail in macroeconomic contexts.
Ljung-Box test
data: Residuals from Regression with ARIMA(3,0,3)(2,0,2)[4] errors
Q* = 6.1871, df = 3, p-value = 0.1029
Model df: 10. Total lags used: 13
Both models exhibit residual independence (p > 0.05), but the higher p-value for the seasonal ARIMA model (0.819) indicates superior white noise.
Activity 3: Variable Transformation
To address potential nonstationarity and heteroskedasticity, GDP is log-transformed and unemployment is differenced. An ARIMA(4,0,0) model with these transformed covariates yields a competitive AIC and improved interpretability. What do the results suggests? Why are the transformations needed?
Log(GDP) is positively associated with inflation.
Changes in unemployment are negatively associated with inflation.
These transformations help stabilize variance and center the series around a constant mean.
Series: ts(economic_data$inflation, frequency = 4, start = c(1948, 2))
Regression with ARIMA(4,0,0) errors
Coefficients:
ar1 ar2 ar3 ar4 intercept log_GDP delta_Unemployment
0.3512 0.1753 0.2749 -0.0209 0.1994 0.0092 -0.0340
s.e. 0.0579 0.0596 0.0594 0.0584 0.2932 0.0354 0.0154
sigma^2 = 0.04305: log likelihood = 50.18
AIC=-84.36 AICc=-83.87 BIC=-54.57
Training set error measures:
ME RMSE MAE MPE MAPE MASE
Training set 0.001433048 0.2050985 0.1427111 -4527.97 4608.29 0.7022001
ACF1
Training set 0.008634326
checkresiduals(arima_transformed)
Ljung-Box test
data: Residuals from Regression with ARIMA(4,0,0) errors
Q* = 6.4755, df = 4, p-value = 0.1663
Model df: 4. Total lags used: 8
Differencing unemployment stabilizes its variance by removing a unit root, transforming a non-stationary series into a stationary one. This allows the coefficient on \(\Delta\text{Unemployment}\) (-0.034) to represent the change in labor market conditions. Similarly, log-transforming GDP linearizes its exponential growth trend, reducing changing variance.
Activity 4: VAR model
Write the model equation for inflation in terms of the following VAR model output and interpret it.
library(vars)var_data <- economic_data %>%as_tibble() %>% tidyr::drop_na() %>% dplyr::select(inflation, GDP_growth, delta_Unemployment)lag_order <-VARselect(var_data, type ="const")$selection["AIC(n)"]var_model <-VAR(var_data, p = lag_order)summary(var_model$varresult$inflation)
where \(\varepsilon_t \sim \text{WN}(0, \sigma^2)\), and lag order \(p=3\) was selected by AIC.
Inflation’s strongest predictor is its first lag (\(\hat{\alpha}_1 = 0.287\)), indicating momentum from recent price changes. The delayed GDP growth effects (significant at lags 1 and 3) suggest that economic expansions influence inflation through staggered channels—e.g., initial demand surges (lag 1) followed by capacity constraints (lag 3). Unemployment changes exhibit mixed significance, with lag 3’s positive coefficient (\(0.045\)) implying that sustained labor market improvements may eventually fuel inflationary expectations.