How to estimate VAR models in Stata

Vector Autoregressive (VAR) models in Stata

Are you interested in learning more about VAR models and how to estimate them using the software Stata? If so, this article is a comprehensive guide that can provide you with the information necessary to understand VAR models and to replicate the results. Step-by-step explanations are included for those who want an in-depth understanding of this topic. At the same time, there is also an option to purchase the material if you would like to replicate the results yourself.

Vector autoregression (VAR) is a powerful statistical model used to measure and analyze the relationships between multiple variables over time. It is a stochastic process model, meaning it models randomness in the form of data points that can be observed at different moments in time. VAR has been widely used in economics, finance, marketing, and other disciplines where there are multiple variables to consider when making decisions or predictions.

Formal representation of VAR models

Assumptions

Engle and Granger Test

The engle and granger test will show the relationship between variables. If one variable causes the other one, it means that it helps to predict future values of the other variable. For example, the inflation rate can help us predict the future values of the interest rate (if inflation goes up, interest rates will eventually go up).

Lag Length criteria

Once you have estimated your VAR model, you should check for the lag length criteria. The lag length defines the number of lags that will be included as explanatory variables in the model, and has a substantial impact on its performance. The choice of an appropriate lag length is not always straightforward and requires careful consideration by the user.

Impulse Response Functions

An impulse response function will show how each endogenous variable evolves over time after it has been hit by an exogenous shock. For example, if there is a sudden surge in oil prices, this would be considered as an exogenous shock. The impulse response function would allow economists to observe the effect of this shock on various endogenous variables like inflation, interest rates and GDP over time. This information can then be used to make informed economic policy decisions that address short-term fluctuations while also considering long-term effects.

Impulse Response Functions in Stata

In this example, we can see that a shock in unemployment will decrease the Fed. Rate. The Fed will have to loosen monetary policy to try to activate the economy and recover from unemployment.

Variance Decomposition

Variance decomposition is an important tool for data analysis. It helps to measure the proportion of variation in a dependent variable explained by each of the independent variables. The variance decomposition is obtained after fitting the VAR model.

The VAR model estimates parameters in an equation system which describes the variation in the dependent variable as a function of its own lagged values and independent variables. By estimating and comparing these parameters, one can determine how much variation in the dependent variable is explained by each of its covariates. This technique is useful for identifying influential factors when conducting forecasting or regression analysis.

Consequently, variance decomposition provides an efficient way to measure the relative importance of different independent variables on dependent variables. Furthermore, it helps to identify relationships between two or more time series that may not be immediately apparent from visual inspection alone.

Variance Decomposition in Stata

We can see the effect of an unemployment shock in Unemployment and the Fed. Rate.

Also, we can see the effect of the fed rate on unemployment and the fed rate.

Watch the step by step Video Tutorial

VAR Models - Recommended Literature

๐Ÿ“š Christopher Sims' "Macroeconomics and Reality" (1980) offers insightful perspectives on macroeconomic theories and their practical application.

๐Ÿ“š "Vector Autoregressions" (2001) by Stock and Watson provides a comprehensive guide to VAR models, which are commonly used in econometrics and time series analysis.

๐Ÿ“š "Inference in Linear Time Series Models with Some Unit Roots" (1990) by Sims, Stock, and Watson is a foundational paper on unit root testing and estimation in time series models.

๐Ÿ“š Granger's "Investigating Causal Relations by Econometric Models and Cross-spectral Methods" (1969) presents a pioneering approach to studying causality and the relationship between variables in econometric models.

Purchase the Material - Download the Dataset

Upgrade your learning experience and gain a deeper understanding of the concepts and techniques presented in the video by purchasing the material. With comprehensive slides, datasets, and detailed DO files, you can work through the material at your own pace and apply what you learn to your own projects. Buying the material also shows appreciation for the instructor's efforts and supports further content creation. Take advantage of this opportunity to enhance your learning and support educational resources for all learners.ย