Grocer Function
NAME
ecm - performs error correction model estimation
CALLING SEQUENCE
recm=ecm(p,arg1,...,argn)
PARAMETERS
Input
-
p = # of lags
-
argi = an argument which can be:
- 'jres=xx' where xx is the name of a johansen results tlist (optional: if not given, is estimated by the function)
- 'nbr=xx' where xx is the # of cointegration vectors to keep from the johansen estimation (optional: if not
given, is calculated by the function with a level equal to plevel)
- 'plevel=xx' where xx=0.01, 0.05 or 0.1 is the significance level for the cointegrating vectors
(optional: if not given, is set to 0.05; useless if the option 'nbr=xx' is used)
- '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)
Output
-
recm = a results tlist with:
. recm('meth') = 'var'
. recm('y') = y data vector
. recm('x') = x data matrix
. recm('nobs') = # observations
. recm('nvar') = # exogenous variables
. recm('neqs') = # endogenous variables
. recm('resid') = residuals, with recm('resid')(:,i): residuals for equation # i
. recm('beta') = bhat, with recm('beta')(:,i): coefficients for equation # i
. recm('rsqr') = rsquared, with recm('rsqr')(i) : rsquared for equation # i
. recm('overallf') = F-stat for the nullity of coefficients other than the constant
with: recm('overallf')(i): F-stat for equation # i
. recm('pvaluef') = their significance level with: recm('pvaluef')(i): significance level for equation # i
. recm('rbar') = rbar-squared
. recm('sigu') = sums of squared residuals with recm('sigu')(:,i): sum of squared residuals for equation # i
. recm('ser') = standard errors of the regression with recm('ser')(i): standard error for equation # i
. recm('tstat') = t-stats, with recm('tstat')(:,i): t-stat for equation # i
. recm('pvalue')= pvalue of the betas, with recm('pvalue')(:,i): p-value for equation # i
. recm('dw') = Durbin-Watson Statistic, with: recm('dw')(i): DW for equation # i
. recm('condindex') = multicolinearity cond index, with recm('condindex')(i): cond index for equation # i
. recm('boxq') = Box Q-stat, with recm('boxq')(i): Box Q-stat for equation # i
. recm('aic') = Akaïke information criterion
. recm('bic') = Schwartz information criterion
. recm('hq') = Hannan-Quinn information criterion
. recm('namey') = name of the y variable
. recm('nx') = # of x variables
. recm('namex') = name of the cointegration relations (if any)
. recm('prests') = boolean indicating the presence or absence of a time series in the regression
. recm('nb_coint_relat') = # of cointegration relations
. recm('jres') = results of johansen estimation
. recm('bounds') = if there is a timeseries in the regression, the bounds of the regression
DESCRIPTION
Performs error correction model estimation. The user can specify the names of the tlist resulting from johansen estimation, the number of cointegration relations to take into account or the significance level to use to select the number of cointegration relations, but if these parameters are not provided, the function takes default values and, if necessary, performs johansen estimation.
EXAMPLE
1) result = ecm(2,'illinos','indiana','kentucky','michigan','ohio','pennsyvlania','tennesse','westvirginia')
2) result = ecm(2,'illinos','indiana','kentucky','michigan','ohio','pennsyvlania','tennesse','westvirginia','plevel=0.
05')
3) result = ecm(2,'illinos','indiana','kentucky','michigan','ohio','pennsyvlania','tennesse','westvirginia','nbr=2)
First example is taken from function ecm_d(); endogenous variables are 'illinos','indiana','kentucky','michigan',
'ohio','pennsyvlania','tennesse','westvirginia'; example 1 let the function set the number of cointegration
relations to the one chosen by a Johansen estimation at a 5% level; since there are 2 cointegration relations at a 5% level,
all 3 examples give the same result.
AUTHOR
Eric Dubois 2002