9 Adding external variables to our model

 

This chapter covers

  • Examining the SARIMAX model
  • Exploring the use of external variables for forecasting
  • Forecasting using the SARIMAX model

In chapters 4 through 8, we have increasingly built a general model that allows us to consider more complex patterns in time series. We started our journey with the autoregressive and moving average processes before combining them into the ARMA model. Then we added a layer of complexity to model non-stationary time series, leading us to the ARIMA model. Finally, in chapter 8 we added yet another layer to ARIMA that allows us to consider seasonal patterns in our forecasts, which resulted in the SARIMA model.

So far, each model that we have explored and used to produce forecasts has considered only the time series itself. In other words, past values of the time series were used as predictors of future values. However, it is possible that external variables also have an impact on our time series and can therefore be good predictors of future values.

This brings us to the SARIMAX model. You’ll notice the addition of the X term, which denotes exogenous variables. In statistics the term exogenous is used to describe predictors or input variables, while endogenous is used to define the target variable—what we are trying to predict. With the SARIMAX model, we can now consider external variables, or exogenous variables, when forecasting a time series.

9.1 Examining the SARIMAX model

9.1.1 Exploring the exogenous variables of the US macroeconomics dataset

9.1.2 Caveat for using SARIMAX

9.2 Forecasting the real GDP using the SARIMAX model

9.3 Next steps

9.4 Exercises

9.4.1 Use all exogenous variables in a SARIMAX model to predict the real GDP

Summary

sitemap