Skip to content
ML Academy

Time series and forecasting · insight-1234

Difference the response and every predictor together in a dynamic regression

Evidence type
documented fact
Difficulty
medium
Roles
Data scientist, Data analyst
Industries
retail, finance, telecom

Summary: situation, action, reason, boundary

  1. Situation

    Weekly ticket sales are regressed on a price index, search volume and a trend; the response needs one difference to be stationary, but the predictors are left in levels.

  2. Action

    If any variable needs differencing, difference all of them, fit a regression with ARIMA errors by estimating on the innovations, and read each coefficient as an effect on changes rather than levels.

  3. Reason

    Differencing everything preserves the form of the relationship, and a regression with ARIMA errors is equivalent to a regression in differences with ARMA errors. Fitting on innovations avoids the spurious-regression problem.

  4. Boundary

    Demand models with trending drivers such as price indices, search volumes or macro series.

Symptom or risk

Mixing levels and differences changes what the coefficients mean, and fitting by ordinary least squares while ignoring error autocorrelation makes p-values too small, so unrelated predictors look important.

Exceptions

If predictor and response are cointegrated, a levels model can be valid; test that explicitly rather than assume it.

Trade-offs

Coefficients on changes are less intuitive for stakeholders who think in levels.

Pitfalls

Reporting a high R-squared and small p-values from a levels regression on trending series as evidence of a relationship.

Lessons and concepts

Claims and their sources

  • FPP3 recommends differencing all variables when any needs differencing, notes that a regression with ARIMA errors is equivalent to a regression in differences with ARMA errors, and warns that ignoring error autocorrelation makes p-values too small, a case it calls spurious regression.

    Forecasting: Principles and Practice (3rd edition)