VAR performs vector autoregressions, which are a set of unrestricted "reduced form" linear regressions with lags of the dependent variables on the right hand side. Impulse response functions (dynamic simulations based on the estimated coefficients), forecast error decompositions, and block exogeneity tests are also performed.
VAR (NHORIZ=<length of impulse response>, NLAGS=<number of lags in VAR>,
SHOCK=ALL or CHOL or STDDEV or UNIT or <matrix name>, SILENT, TERSE)
<list of dependent variables> [ | <list of exogenous variables> ] ;
Usage
First list the dependent variables, and specify the number of lags desired in the options list. If there are any exogenous variables, give their names after a |. If you want to have intercept terms in the regressions (usually recommended), include the special variable C or CONSTANT in the list of exogenous variables. You may have as many independent variables as you like subject to the overall limits on the number of arguments per statement and the amount of working space; obviously, the number is limited by the number of data observations available. The observations over which the regression is computed are determined by the current sample. If any observations have missing values within the current sample, VAR drops the missing observations and prints an error message.
Output
VAR output begins with an equation title and the names of the dependent variables, followed by the log likelihood value and a table of the regression coefficients. Various statistics on goodness-of-fit are printed for each equation: the sum of squared residuals, the standard error of the regression, the R-squared, and the Durbin-Watson statistic for autocorrelation of the residuals (biased unless NLAGS=0 because of the presence of lagged dependent variables). Block exogeneity tests (Granger causality tests) are computed as F tests to see if lagged values of other dependent variables are significant in each equation. Next are the impulse response functions (see Method) and variance decompositions. The variance decomposition is for residual variances only (it does not include sampling error in the regression coefficients). VAR stores most of these results in data storage for later use. Here are the results available after a VAR command:
variable |
type |
length |
description |
@LHV |
list |
#eqs |
Name of the dependent variable |
@RNMS |
list |
#eqs*#vars |
list of names of right hand side variables |
@LOGL |
scalar |
|
Log of likelihood function |
@SBIC |
scalar |
|
Schwarz Bayesian Information Criterion |
@AIC |
scalar |
|
Akaike Information Criterion |
@SSR |
vector |
#eqs |
Sum of squared residuals |
@S |
vector |
#eqs |
Standard error of the regression |
@YMEAN |
vector |
#eqs |
Mean of the dependent variable |
@SDEV |
vector |
#eqs |
Standard deviation of the dependent variables |
@DW |
vector |
#eqs |
Durbin-Watson statistic |
@RSQ |
vector |
#eqs |
R-squared |
@ARSQ |
vector |
#eqs |
Adjusted R-squared |
@FBEX |
vector |
#eqs |
F-statistics for block exogeneity |
@COEF |
vector |
#eqs*#vars |
Coefficient estimates |
@SES |
vector |
#eqs*#vars |
Standard Errors |
@VCOV |
matrix |
(#eqs*#vars)**2 |
Variance-covariance of estimated coefficients. |
@COVU |
matrix |
#eqs*#eqs |
Residual covariance matrix = E'E/(T-K). |
@IMPRES |
matrix |
nhoriz*#eqs**2 |
Impulse Response function. |
@FEVD |
matrix |
nhoriz*(1+#eqs)*#eqs |
Forecast error variance decomposition |
@RES |
series |
#obs*#eqs |
Residuals |
@FIT |
series |
#obs*#eqs |
Fitted values of the dependent variable |
Method
OLS is performed, equation by equation. This is efficient because the right hand side variables are identical for every equation. The impulse response function is just a dynamic simulation with shocks in the first period for some variables and zeros for the other variables.
NHORIZ= number of time periods for the impulse response function (default 10). Specify NHORIZ=0 or SILENT to suppress the impulse response output.
NLAGS= number of lags of the dependent variables to include on the right hand side of the equations (default zero). @SBIC or @AIC can be used to choose the number of lags (minimize @SBIC -- see the REGOPT command).
SHOCK= ALL or CHOL or STDDEV or UNIT or matrix name specifies the type of shock for the impulse response function. CHOL, the default, is a Choleski factorization (matrix square root) using the current ordering of the dependent variables. A shock to the first factor affects the first variable initially, while a shock to the second factor affects the first two variables, etc. ALL computes Choleski factorizations for all (n!) orderings of the variables; since different orderings can produce markedly different results, this option is useful for making sure the results are robust to ordering. You can also supply your own (square) matrix factorization. STDDEV and UNIT specify (residual) standard deviation or unit shocks to single variables; variance decompositions are not computed for these shocks.
SILENT/NOSILENT suppresses all printed output. This is useful for running regressions for which you only want selected output (which can be obtained from the @ variables, which will be stored).
TERSE/NOTERSE causes minimal output (results only) to be printed.
REGOPT (PVPRINT) FBEX; ? print P-values for block exogeneity
VAR(NLAGS=5) Y1 Y2 Y3 Y4 | C X1 X2 X3;
is equivalent to the following regressions:
OLSQ Y1 Y1(-1)-Y1(-5) Y2(-1)-Y2(-5) Y3(-1)-Y3(-5) Y4(-1)-Y4(-5) C X1-X3;
OLSQ Y2 Y1(-1)-Y1(-5) Y2(-1)-Y2(-5) Y3(-1)-Y3(-5) Y4(-1)-Y4(-5) C X1-X3;
OLSQ Y3 Y1(-1)-Y1(-5) Y2(-1)-Y2(-5) Y3(-1)-Y3(-5) Y4(-1)-Y4(-5) C X1-X3;
OLSQ Y4 Y1(-1)-Y1(-5) Y2(-1)-Y2(-5) Y3(-1)-Y3(-5) Y4(-1)-Y4(-5) C X1-X3;
See the TSP User's Guide for more examples.
Judge, George G., Helmut Lutkepohl, et al, Introduction to the Theory and Practice of Econometrics (Second Edition), Wiley, 1988, Chapter 18, pp.751-781.