Stata Var - Intro Introduction To Vector Auto Regression Models
Stata Var - Intro Introduction To Vector Auto Regression Models
Description
Stata has a suite of commands for fitting, forecasting, interpreting, and performing inference
on vector autoregressions (VARs) and structural vector autoregressions (SVARs). The suite includes
several commands for estimating and interpreting impulse–response functions (IRFs) and forecast-error
variance decompositions (FEVDs). The table below describes the available commands.
This manual entry provides an overview of vector autoregressions and structural vector autoregres-
sions. More rigorous treatments can be found in Hamilton (1994), Lütkepohl (1993), and Amisano
and Giannini (1997). Stock and Watson (2001) provide an excellent nonmathematical treatment of
vector autoregressions and their role in macroeconomics.
246
var intro — Introduction to vector autoregression models 247
Remarks
Remarks are presented under the headings
Introduction to VARs
Introduction to SVARs
Short-run SVAR models
Long-run restrictions
IRFs and FEVDs
Introduction to VARs
A vector autoregression (VAR) is a model in which K variables are specified as linear functions of
p of their own lags, p lags of the other K − 1 variables, and possibly additional exogenous variables.
Algebraically, a p-order vector autoregressive model, written VAR(p), with exogenous variables xt is
given by
yt = v + A1 yt−1 + · · · + Ap yt−p + Bxt + ut t ∈ {−∞, ∞} (1)
where
yt = (y1t , . . . , yKt ) is a K × 1 random vector,
A1 through Ap are K × K matrices of parameters,
xt is an M × 1 vector of exogenous variables,
B is a K × M matrix of coefficients,
v is a K × 1 vector of parameters, and
ut is assumed to be white noise; that is,
E(ut ) = 0,
E(ut ut ) = Σ, and
E(ut us ) = 0 for t = s
There are K 2 ×p+K ×(M + 1) parameters in the equation for yt , and there are {K × (K + 1)}/2
parameters in the covariance matrix Σ. One way to reduce the number of parameters is to specify an
incomplete VAR, in which some of the A matrices are set to zero. Another way is to specify linear
constraints on some of the coefficients in the VAR.
A VAR can be viewed as the reduced form of a system of dynamic simultaneous equations. Consider
the system
v = W0−1 a
Ai = W0−1 Wi
B = W0−1 Wx
ut = W0−1 et
248 var intro — Introduction to vector autoregression models
The cross-equation error variance–covariance matrix Σ contains all the information about contem-
poraneous correlations in a VAR and may be the VAR’s greatest strength and its greatest weakness.
Since no questionable a priori assumptions are imposed, fitting a VAR allows the dataset to speak for
itself. However, without imposing some restrictions on the structure of Σ, we cannot make a causal
interpretation of the results.
If we make additional technical assumptions, we can derive another representation of the VAR in
(1). To simplify the notation, consider the case without exogenous variables. If the VAR is stable (see
[TS] varstable), we can rewrite yt as
∞
yt = µ + Φi ut−i (4)
i=0
where µ is the K × 1 time-invariant mean of the process and the Φi are K ×K matrices of parameters.
Equation (4) states that the process by which the variables in yt fluctuate about their time-invariant
means, µ, is completely determined by the parameters in Φi and the (infinite) past history of
independent and identically distributed (i.i.d.) shocks or innovations, ut−1 , ut−2 , . . . . Equation (4)
is known as the vector moving-average representation of the VAR. The moving-average coefficients
Φi are also known as the simple impulse–response functions at horizon i. The precise relationship
between the Ai and the Φi is derived in Methods and Formulas of [TS] irf create.
The joint distribution of yt is determined by the distributions of xt and ut and the parameters
v, B, and Ai . Estimating the parameters in a VAR requires that the variables in yt and xt be
covariance stationary, meaning that their first two moments exist and are time invariant. If the yt are
not covariance stationary, but their first-differences are, a vector error-correction model (VECM) can
be used. See [TS] vec intro and [TS] vec for more information about those models.
If the ut form a zero mean, i.i.d. vector process, and yt and xt are covariance stationary and
are not correlated with the ut , consistent and efficient estimates of B, the Ai , and v are obtained
via seemingly unrelated regression, yielding estimators that are asymptotically normally distributed.
When the equations for the variables yt have the same set of regressors, equation-by-equation OLS
estimates are the conditional maximum likelihood estimates.
Much of the interest in VAR models is focused on the forecasts, impulse–response functions, and
the forecast-error variance decompositions, all of which are functions of the estimated parameters.
Estimating these functions is straightforward, but their asymptotic standard errors are usually obtained
by assuming that ut forms a zero mean, i.i.d. Gaussian (normal) vector process. Also, some of the
specification tests for VARs have been derived using the likelihood-ratio principle and the stronger
Gaussian assumption.
In the absence of contemporaneous exogenous variables, the disturbance variance–covariance
matrix contains all the information about contemporaneous correlations among the variables. VARs
are sometimes classified into three types by how they account for this contemporaneous correlation.
(See Stock and Watson [2001] for one derivation of this taxonomy.) A reduced-form VAR, aside
from estimating the variance–covariance matrix of the disturbance, does not try to account for
contemporaneous correlations. In a recursive VAR, the K variables are assumed to form a recursive
dynamic structural equation model in which the first variable is a function of lagged variables, the
second a function of contemporaneous values of the first variable and lagged values, and so on.
In a structural VAR, the theory you are working with places restrictions on the contemporaneous
correlations that are not necessarily recursive.
Stata has two commands for fitting reduced-form VARs: var and varbasic. var allows for
constraints to be imposed on the coefficients. varbasic allows you to fit a simple VAR quickly
without constraints and graph the impulse–response functions.
var intro — Introduction to vector autoregression models 249
Because it can be important to fit a VAR of the correct order, varsoc offers several methods for
choosing the lag order p of the VAR to fit. After fitting a VAR, and before proceeding with inference,
interpretation, or forecasting, it is important to check that the VAR fits the data. varlmar can be
used to check for autocorrelation in the disturbances. varwle performs Wald tests to determine if
certain lags can be excluded. varnorm tests the null hypothesis that the disturbances are normally
distributed. varstable checks the eigenvalue condition for stability, which is needed to interpret the
impulse–response functions and forecast-error variance decompositions.
Introduction to SVARs
As discussed in [TS] irf create, a problem with VAR analysis is that, since Σ is not restricted
to be a diagonal matrix, an increase in an innovation to one variable provides information about
the innovations to other variables. This implies that no causal interpretation of the simple impulse–
response functions is possible: there is no way to determine whether the shock to the first variable
caused the shock in the second variable or vice versa.
However, suppose that we had a matrix P such that Σ = PP . It can then be shown that the
variables in P−1 ut have zero mean and that E{P−1 ut (P−1 ut ) } = IK . We could rewrite (4) as
∞
yt = µ + Φs PP−1 ut−s
s=0
∞
=µ+ Θs P−1 ut−s
s=0
∞
=µ+ Θs wt−s (5)
s=0
Equation (6) implies that Psr = A−1 B, where Psr is the P matrix identified by a particular
short-run SVAR model. Note that the latter equality in (6) implies that
Σ = Psr Psr
Assuming that the underlying VAR is stable (see [TS] varstable for a discussion of stability), we
can invert the autoregressive representation of the model in (6) to an infinite-order, moving-average
representation of the form
∞
yt = µ + Θsr
s et−s (7)
s=0
Long-run restrictions
Recall that a general short-run SVAR has the form
yt = Ā−1 Bet
which implies that Σ = BB . Thus, C = Ā−1 B is the matrix of long-run responses to the
orthogonalized shocks, and
yt = Cet
var intro — Introduction to vector autoregression models 251
In long-run models, the constraints are placed on the elements of C, and the free parameters are
estimated. These constraints are frequently exclusion restrictions. For instance, constraining C[1, 2]
to be zero can be interpreted as setting the long-run response of variable 1 to the structural shocks
driving variable 2 to be zero.
Stata’s svar command estimates the parameters of structural vector autoregressions. See [TS] var
svar for more information and examples.
References
Amisano, G. and C. Giannini. 1997. Topics in Structural VAR Econometrics . 2d ed. Heidelberg: Springer.
Hamilton, J. D. 1994. Time Series Analysis. Princeton: Princeton University Press.
Lütkepohl, H. 1993. Introduction to Multiple Time Series Analysis. 2d ed. New York: Springer.
Stock, J. H. and M. W. Watson. 2001. Vector autoregressions. Journal of Economic Perspectives. 15(4): 101–115.
Watson, M. W. 1994. Vector autoregressions and cointegration. Handbook of Econometrics, Vol IV, Engle, R. F. and
McFadden, D. L. eds, Amsterdam: Elsevier Science.
252 var intro — Introduction to vector autoregression models
Also See
Complementary: [TS] fcast compute, [TS] fcast graph, [TS] irf add, [TS] irf cgraph,
[TS] irf create, [TS] irf ctable, [TS] irf describe, [TS] irf drop,
[TS] irf graph, [TS] irf ograph, [TS] irf rename, [TS] irf set,
[TS] irf table, [TS] var, [TS] var svar, [TS] vargranger, [TS] varlmar,
[TS] varnorm, [TS] varsoc, [TS] varstable, [TS] varwle
Related: [TS] arima, [TS] vec intro, [TS] vec,
[R] regress, [R] sureg
Background: [U] 14.4.3 Time-series varlists,
[TS] irf