Autoregression
Learn how to use autoregression to forecast with time series data.
We'll cover the following
Understanding autoregression
Autoregression, as the name suggests, is a regression of a value over itself at some other moment. It means we look at the model like this:
Where:
is the variable we want to predict at a time, , is that same variable at time , and so on. is a constant. is the coefficient used for , is the coefficient used for , and so on. is the error term.
Intuitively, that model works almost as a weighted average between past observations, and the
How far does
Forecasting with autoregression
Fortunately, we don't have to do that regression on our own. We can use the same Python function, ARIMA, which we used to calculate the MA(n) model. To implement AR(2), let us set the MA parameter to zero and the AR parameter to two, in the ARIMA function.
Get hands-on with 1400+ tech skills courses.