Output Options Example Reference
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 (BOUNDS=<sign. level of confidence intervals>,NBOOT=<num of bootstrap replications>,NHORIZ=<length of impulse response>, NLAGS=<number of lags in VAR>, SHOCK=ALL or CHOL or GEN 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.
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 command PLOTS (PREVIEW) IR; can be used in TSP/Oxmetrics to automatically display color plots of the impulse responses for all subsequent VAR commands, even when running in batch mode. For NEND endogenous variables, there are NEND such plots per window - responses of a given endogenous variable to shocks in all variables. There will also be NEND VAR plot windows created, labelled VAR, VAR2, etc.
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 |
matrix |
#obs*#eqs |
Residuals |
|
@FIT |
matrix |
#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.
BOUNDS= specifies the significance level of the confidence intervals. The default is .95, for 95%.
NBOOT= specifies the number of bootstrap replications used in computing confidence intervals for the impulse response functions. The default is 200. A nonparametric bootstrap is used - NBOOT resamples are taken from the rows of the original data matrix. The regression coefficients, residual covariance matrix, shock matrix, and impulse response functions are computed for each resample.
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 GEN 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.
SHOCK= GEN specifies that a Generalized Impulse Response should be computed, which is invariant to the ordering of the equations. See the Pesaran and Shin (1998) reference. For each dependent variable, the impulse responses and confidence intervals are printed in a table. Labels are of the form Y_X. That is, if the column is labelled GNP_M1, then it is the impulse response of GNP to a shock in M1. The printing of the table can be suppressed by using SUPRES @IMPRES; or the option SILENT in the VAR command.
The columns are stored as series of length NHORIZ, starting in the first observation of the estimation sample. In the example above, the series names would be @IRGNP_M1, @IRGNP_M1LB95%, and @IRGNP_M1UB95% .
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.
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;
E Example of VAR with generalized impulse response functions, showing how to plot the results by hand (TSP/Oxmetrics will do this automatically - see above).
VAR (NLAG=MAXLAG,SHOCK=GEN,NHORIZ=HORIZ) Y CONS IN | C T ;
SELECT .NOT.MISS(@IRGNP_M1) ;
PLOT @IRGNP_M1 @IRGNP_M1LB95% @IRGNP_M1UB95% ;
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.
Pesaran, H. Hashem and Shin, Yongcheol, "Generalized Impulse Response Analysis in Linear Multivariate Regression", Economics Letters 58 (1998), pp. 17-29.