Grocer Function
NAME
bvar - performs bayesian VAR estimation
CALLING SEQUENCE
rbvar=bvar(nlag,tight,weight,decay,arg1,...,argn)
PARAMETERS
Input
-
nlag = the lag length of the VAR
-
tight = Litterman's tightness hyperparameter
-
weight = Litterman's weight (matrix or scalar)
- decay = Litterman's lag decay = lag^(-decay)
-
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.TP
Output
-
rbvar = a results tlist with:
. rbvar('meth') = 'bvar'
. rbvar('y') = y data vector
. rbvar('x') = x data matrix
. rbvar('nvar') = # exogenous variables
. rbvar('nobs') = # observations
. rbvar('neqs') = # endogenous variables
. rbvar('nlag') = # lags
. rbvar('tight') = Litterman's tightness hyperparameter
. rbvar('weight') = Litterman's weight (matrix or scalar)
. rbvar('decay') = Litterman's lag decay = lag^(-decay)
. rbvar('beta') = bhat, with rbvar('beta')(:,i): coefficients for equation # i
. rbvar('tstat') = t-stats, with rbvar('tstat')(:,i): t-stat for equation # i
. rbvar('pvalue')= pvalue of the betas, with rbvar('pvalue')(:,i): p-value for equation # i
. rbvar('resid') = residuals, with rbvar('resid')(:,i): residuals for equation # i
. rbvar('yhat') = yhat, with rbvar('yhat')(:,i): residuals for equation # i
. rbvar('sige') = estimated variances rbvar('sige')(i): variance for equation # i
. rbvar('ser') = standard errors of the regression with rbvar('ser')(i): standard error for equation # i
. rbvar('dw') = Durbin-Watson Statistic, with: rbvar('dw')(i): DW for equation # i
. rbvar('rsqr') = rsquared, with rbvar('rsqr')(i) : rsquared for equation # i
. rbvar('rbar') = rbar-squared
. rbvar('sigma') = (neqs x neqs) var-covar matrix of the regression
. rbvar('nx') = # exogenous variables
. rbvar('namey') = name of the y variable
. rbvar('namex') = name of the x variables (if any)
. rbvar('prests') = boolean indicating the presence or absence of a time series in the regression
. rbvar('bounds') = if there is a timeseries in the regression, the bounds of the regression
DESCRIPTION
Performs error bayesian VAR estimation. The lags of the var models are estimated with bayesian prior given by the parameters tight, weight and decay.
EXAMPLE
results = bvar(2,0.1,1,0.5,'illinos','indiana','kentucky','michigan'...
,'ohio','pennsyvlania','tennesse','westvirginia');
Example taken from function bvar_d(); endogenous variables are 'illinos','indiana','kentucky','michigan',
'ohio','pennsyvlania','tennesse','westvirginia'; # of lags set to 2; tight, weight and decay are set to 0.1,1 and 0.5.
AUTHOR
Eric Dubois 2002