Grocer Function
NAME
var1 - estimates a VAR model (low level)
CALLING SEQUENCE
rvar=var1(y,nlag,x)
PARAMETERS
Input
-
y = an (nobs x neqs) matrix of y-vectors
-
nlag = the lag length
-
x = optional matrix of variables (nobs x nx)
(NOTE: constant vector automatically included)
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('nlag') = # lags
. 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('ftest') = matrix of causality tests of each variable (in column) in each equation (in row)
. rvar('fvalues') = the corresponding p-values
. 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('xpxi') = inv(X'X)
. rvar('prescte') = boolean indicating the presence or absence of a constant in the regression
DESCRIPTION
Estimates a VAR of order p on endogenous variables, with the eventual presence of exogenous variables. Contrary to var, do not display on screen the estimation results. Endogenous and exogenous variables must already be in a matrix form.
EXAMPLE
1) rvar=var1(grocer_y,grocer_p,x)
2) recm=var1(dy,grocer_nlag,x)
These examples are taken from functions var and ecm; endogenous variables are in matrices grocer_y
and dy respectively; the number of lags are grocer_p and grocer_nlag respectively; and exogenous variables
are in matrix x.
AUTHOR
Eric Dubois 2002