Some time series respond to predictors such as holidays, prices, or weather, and still show serial dependence after accounting for those predictors. Regression with ARIMA errors combines a regression for the predictor effects with a time-series model for the remaining variation. It is useful when both affect the forecast.
Here \(\mathbf x_t\) is the vector of predictors, \(\beta_0\) is the intercept, and \(\boldsymbol\beta\) contains the predictor coefficients. The regression error \(u_t\) follows an ARIMA process. The backshift operator \(B\) sends \(u_t\) to \(u_{t-1}\). The polynomials \(\phi\) and \(\theta\) contain the autoregressive and moving average coefficients, \(d\) is the differencing order, and \(Z_t\) is the model’s white-noise innovation.
Suppose a promotion raises weekly sales, and sales last week were also higher than the regression predicted. The new forecast can include the effect of the upcoming promotion and part of last week’s unexplained increase. The regression handles the promotion, while the ARIMA error model handles how the unexplained part carries forward.
2.1 Estimation and forecasting
Serially correlated regression errors change the uncertainty of coefficient estimates. Fit the regression and error model jointly, and check the resulting innovations for residual serial correlation with tools such as the Ljung-Box test.
Forecasts require values of the predictors over the forecast horizon. Calendar indicators are known ahead of time. Weather or prices may require separate forecasts or explicit scenarios. Standard intervals conditional on one predictor path leave out uncertainty in that path. In evaluation, use predictor values or forecasts that would have been available at each origin.
3 Python Application
Simulate weekly sales with a scheduled promotion that adds two units and an AR(1) regression error. Fit the model on the first 160 weeks. Compare a forecast using the known promotion schedule with a scenario that cancels all promotions over the 20-week horizon.
The two forecasts share the same predicted error component. They differ on promotion weeks by the estimated regression coefficient. With observational data, a difference between fitted scenarios is a model prediction. Interpreting it as a causal effect requires additional assumptions about how promotions were assigned.