Grocer Function
NAME
var - estimates a VAR model
CALLING SEQUENCE
rvar=var(p,arg1,...argn)
PARAMETERS
Input
-
p = the lag length of the VAR
-
argi = an argument which can be:
- 'endo=[var1;var2; ... ;varn]' or 'endo=var1;var2; ... ;varn' with vari the name of an admissible variable for explox
(a real vector, a ts, a real matrix or a list of such variables)
- 'exo=[var1;var2; ... ;varn]' or 'exo=var1;var2; ... ;varn' with vari the name of an admissible variable for explox
(a real vector, a ts, a real matrix or a list of such variables)
- the string 'noprint' if the user doesn't want to print the results of the regression
Output
-
rvar = a results tlist with:
. rvar('meth') = 'var'
. rvar('y') = y data vector
. rvar('x') = x data matrix
. rvar('nobs') = # observations
. rvar('nvar') = # exogenous variables
. rvar('neqs') = # endogenous variables
. rvar('resid') = residuals, with rvar('resid')(:,i): residuals for equation # i
. rvar('beta') = bhat, with rvar('beta')(:,i): coefficients for equation # i
. rvar('rsqr') = rsquared, with rvar('rsqr')(i) : rsquared for equation # i
. rvar('overallf') = F-stat for the nullity of coefficients other than the constant
with: rvar('overallf')(i): F-stat for equation # i
. rvar('pvaluef') = their significance level with: rvar('pvaluef')(i): significance level
for equation # i
. rvar('rbar') = rbar-squared
. rvar('sigu') = sums of squared residuals with rvar('sigu')(:,i): sum of squared residuals for equation # i
. rvar('ser') = standard errors of the regression with rvar('ser')(i): standard error for equation # i
. rvar('tstat') = t-stats, with rvar('tstat')(:,i): t-stat for equation # i
. rvar('pvalue')= pvalue of the betas, with rvar('pvalue')(:,i): p-value for equation # i
. rvar('dw') = Durbin-Watson Statistic, with: rvar('dw')(i): DW for equation # i
. rvar('condindex') = multicolinearity cond index, with rvar('condindex')(i): cond index for equation # i
. rvar('boxq') = Box Q-stat, with rvar('boxq')(i): Box Q-stat for equation # i
. rvar('sigma') = (neqs x neqs) var-covar matrix of the regression
. rvar('aic') = Akaïke information criterion
. rvar('bic') = Schwartz information criterion
. rvar('hq') = Hannan-Quinn information criterion
. rvar('prests') = boolean indicating the presence or absence of a time series in the regression
. rvar('namey') = name of the y variable
. rvar('nx') = # of x variables
. rvar('namex') = name of the x variables (if any)
. rvar('bounds') = if there is a timeseries in the regression, the bounds of the regression
DESCRIPTION
Estimates a VAR of order p on endogenous variables, with the eventual presence of exogenous variables and, by default, displays on screen the estimation results.
EXAMPLE
results=var(2,'endo=del(log(rfa_inv)),del(log(rfa_inc)),del(log(rfa_cons))')
Example taken from function var_d1() estimate a var model, taken from Lütkepohl's book
"Introduction to multiple time series analysis", with three endogenous variables (the differentiated
logarithm of investment, GDP and consumption) with 2 lags and no exogenous variables.
AUTHOR
Eric Dubois 2002