Become a YouTube member, get access to special content and support the channel!
Autoregressive models are among the most widely used tools in time series econometrics and forecasting. Their central idea is simple: the past behavior of a variable may contain useful information about its future values.
In this tutorial, we study how to produce an AR model forecast in Stata, with particular emphasis on out-of-sample forecasting. As an empirical application, we use Brent crude oil prices and construct an autoregressive model for the annual growth rate of oil prices.
The objective is not only to estimate an autoregressive model, but to move from estimation to an actual forecasting exercise. This includes checking the time-series properties of the data, transforming the variable when appropriate, specifying an AR model, generating multi-period forecasts, incorporating parameter uncertainty, and constructing confidence bands around the forecast.
The complete Stata implementation used in the tutorial is available separately as part of the premium material. This article focuses on the econometric intuition and methodology behind the exercise.
An autoregressive model, commonly abbreviated as an AR model, explains the current value of a time series using its own previous values.
A general autoregressive model of order p, or AR(P), can be written as:
The crude oil prices are expected to experience a slight increase in 2024 but will stay below the average price growth of 8%. In 2025 and 2026, the prices are projected to surpass the red average line, and by 2027, they are anticipated to fall below the average.