Vector error correction models (ECMs)
vececm [if exp] [in range] , cir(#) sm(case) [ lags(#) wn corr testlag(#) large noheader notable matrices level(#) ]
vececm is for use after johans. You must run johans prior to using vececm; see help johans.
vececm is for use with time-series data. You must tsset your data before using this commands; see help tsset.
vececm shares the features of all estimation commands; see help est. The only non-standard feature is that, since vececm does not allow a varlist, the display of previously estimated results only occurs when the user omits options cir() and sm(), normally required.
The syntax of predict following vececm is
predict [[type] newvarname] [if exp] [in range] [, statistic {suffix(string)|prefix(string)} dynamic(time_constant) equation(eqno) type(byte|int|long|float|double) set(setvarlist) ]
where statistic is
xb predicted values for the model, the default y predicted values in y -- the fitted values in terms of levels of the dependent variable, that is, stripped of any time-series operator residuals residuals or predicted innovations yresiduals residuals or predicted innovations in y -- where the dependent variable is converted to levels stdp standard error of the prediction
and time_constant is a # or a time literal such as d(1jan1995) or q(1995q1), etc.; see help tfcn.
These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only for the estimation sample.
Description
vececm estimates a vector error correction model (ECM) after one or more cointegrating vectors have been identified using Johansen's maximum-likelihood cointegration rank test (see help johans). vececm uses the estimates of the cointegrating vectors as calculated by johans (the beta' matrix) to compute the value of each vector. Each vector then appears in the system estimates constrained by the value of its corresponding weight (given by the alpha matrix) in each equation. vececm doesn't allow a varlist as it simply uses the one specified at johans.
The user must specify the appropriate statistical model for the form of the deterministic components (the polynomial in time) based on the Decision Table in Osterwald-Lenum (1992); see References and option sm(). Caution should be exercised when specifying the form of this polynomial in time since the selection of a specific model amounts to imposing certain restrictions on the system of equations. If the true model is different from the one specified, estimation may yield implausible results such as negative R-squared statistics.
Options
cir(#) indicates the number of cointegrating relationships or vectors as inferred after the cointegration rank test (see help johans).
sm(case) refers to the statistical model and specifies the assumption regarding the form of the deterministic component in the ECM. The possible cases are outlined in Osterwald-Lenum (1992) (see References). Specifically, case is an integer (possibly with an asterisk) corresponding to the number of terms comprised in the polynomial in time _cons + b*trend (where trend is a linear trend) within the reduced-form VAR representation of the ECM -- that is, where the vector of dependent variables on the left-hand side is represented in differenced-form. case must be one of 0, 1, 1*, 2, or 2* where
If no trend in data 0 --> no deterministic component 1* --> constant within CE only If linear trend in data 1 --> constant in VAR 2* --> constant in VAR, trend within CE only If quadratic trend in data 2 --> constant and trend in VAR
where CE stands for cointegrating equation(s) and VAR refers to the vector autoregression portion of the ECM, i.e. that part of the system which lies outside any CE.
sm(0) is rarely used. Novice users should probably limit themselves to sm(1).
lags(#) specifies the number of lags of the endogenous variable to include in the original VAR (representation in levels); there is one fewer lag in the reduced-form difference representation.
restricted(numlist) imposes restrictions on one or more of the cointegrating vectors. (lrjtest with option restrict must have been previously conducted.) numlist refers to those specific vectors which are to be restricted, that is, type restricted(2 4) to use restricted vectors 2 and 4 as computed by lrjtest.
wn requests the calculation of the multivariate Ljung-Box portmanteau (or Q) test for white noise residuals.
testlag(#) is relevant only with wn and specifies the largest lag length to consider for the multivariate portmanteau statistic. The default is min([N/2]-2,40).
corr displays the correlation matrix of the residuals between equations and performs a Breusch-Pagan test for independent equations, i.e., that the disturbance covariance matrix is diagonal.
large specifies that large sample statistics are to be computed, rather than small. It shifts the test statistics from F statistics and t-statistics to chi-squared and Z statistics and uses the number of sample observations, T, as a divisor in computing the covariance matrix for the equation errors rather than alternate divisor, T-K. As an asymptotically justified estimator, vececm may use large sample statistics.
matrices requests the display of the Alpha and Beta' factorisation of the cointegrating matrix.
notable suppresses display of the coefficient table.
noheader suppresses display of the header reporting the estimation method and the table of equation summary statistics.
level(#) specifies the confidence level, in percent, for confidence intervals of the coefficients; see help level.
Options for predict
xb the default, calculates the predictions from the estimated model. If D.depvar is the dependent variable for a given equation, these predictions are of D.depvar and not depvar.
y specifies that predictions of depvar are to be made in terms of the dependent variable once stripped of any time-series operator. For instance, if the dependent variable were D.depvar, L.depvar, or even L2D2S3.depvar, predictions would be of depvar itself and not of D.depvar, L.depvar, or L2D2S3.depvar.
residuals calculates the residuals.
yresiduals calculates the residuals in terms of depvar, even if the model was specified in terms of, say, D.depvar (see option y).
stdp calculates the standard error of the prediction (may not be combined with dynamic().
equation(eqno) specifies to which equation you are referring and is relevant only with newvarname. equation(#1) would mean the calculation is to be made for the first equation, equation(#2) would mean the second, and so on. Alternatively, you could refer to the equations by their names. equation(income) would refer to the equation named income and equation(hours) to the equation named hours.
If you do not specify equation(), it is as if you specified equation(#1).
suffix(string) will cause predict to generate statistic for all equations in the system at once. The base name (i.e. the name without time-series operators) of each dependent variable in the system will be used as a stub name and string will be apposed as a suffix in generating a name for each predicted series. newvarname should not be specified if suffix is invoked.
prefix(string) is identical to suffix() but apposes a prefix to each stub name rather than a suffix.
dynamic(time_constant) specifies how lags of y in the model are to be handled. If dynamic() is not specified, actual values are used everywhere lagged values of y appear in the model to produce one-step ahead forecasts.
dynamic(time_constant) produces dynamic (also known as recursive) forecasts. time_constant specifies when the forecast is to switch from one-step ahead to dynamic. In dynamic forecasts, references to y evaluate to the prediction of y for all periods at or after time_constant; they evaluate to the actual value of y for all prior periods.
set(setvarlist) is only allowed with dynamic() and may be used to generate scenarios such as pre-determining, either arbitrarily or from some other forecast/estimator, the predicted values of one or more of the endogenous variables in the VAR or ECM. For instance, one may want to forecast the system vector conditional on certain a priori assumptions, e.g., such that GDP will grow 2% in year t+1, 3% in t+2, etc. Predicted values of the conditioning variables must already be defined for the length of the forecast horizon. Variables in setvarlist must be a subset of those in johans's varlist and must contain time-series operators if corresponding variables in varlist contained operators. Predictions will only be generated for variables that do not figure in setvarlist since predictions on the latter are already defined, by construct.
type(byte|int|long|float|double) specifies the storage type of the predicted values and is useful when generating predictions for all equations (since type newvarname cannot be specified in this case). Otherwise, the default storage type is used, see help generate and datatypes. type() overrides any other storage type specification.
Examples
. * 1 - General . use http://fmwww.bc.edu/ec-p/data/macro/wgmacro.dta, clear . johans investment income consumption, lags(4) . vececm, cir(1) sm(1) lags(3) . predict, suffix(hat) y . predict fit, eq(#2) y
. * 2 - Zero-mean (centered) seasonal dummies . use http://fmwww.bc.edu/ec-p/data/macro/wgmacro.dta, clear . forvalues i = 1/4 { gen byte q`i' = 0 } . forvalues i = 1/4 { replace q`i' = 1 if quarter(dofq(qtr))==`i' } . forvalues i = 1/4 { replace q`i' = q4-q`i' } . johans investment income consumption, lags(4) exog(q1 q2 q3) . vececm, cir(1) sm(1) lags(4)
. * 3 - Dynamic forecasts . use http://fmwww.bc.edu/ec-p/data/macro/wgmacro.dta, clear . set obs 112 . replace qtr = qtr[_n-1]+1 if qtr==. . johans investment income consumption, lags(4) . vececm, cir(1) sm(1) lags(4) . predict, suffix(hat) dyn(q(1983q1)) y
. * 4 - Dynamic forecasts, conditional . use http://fmwww.bc.edu/ec-p/data/macro/wgmacro.dta, clear . set obs 112 . replace qtr = qtr[_n-1]+1 if qtr==. . tsset . arima income, arima(2,1,1) . predict incarima, dyn(q(1983q1)) y . johans investment income consumption, lags(4) . vececm, cir(1) sm(1) lags(4) . replace income = incarima if tin(1983q1,) . predict, suffix(hat) dyn(q(1983q1)) set(income) y
. * 5 - Time-series operators . use http://fmwww.bc.edu/ec-p/data/macro/wgmacro.dta, clear . johans l2d.investment l.income consumption, lags(4) . vececm, cir(1) sm(1) lags(3) . predict, suffix(hat) y
References
Johansen, S. (1988). "Statistical Analysis of Cointegration Vectors". Journal of Economic Dynamics and Control. 12. 231-254.
Johansen, S. and K. Juselius. (1990). "Maximum Likelihood Estimation and Inference on Cointegration - With Applications to the Demand for Money". Oxford Bulletin of Economics and Statistics. 52. 169-210.
Osterwald-Lenum, M. (1992). "A Note with Quantiles of the Asymptotic Distribution of the Maximum Likelihood Cointegration Rank Test Statistics". Oxford Bulletin of Economics and Statistics. 54. 461-472.
Author
Patrick Joly, Industry Canada pat.joly@utoronto.ca
The author welcomes comments/suggestions regarding this package. Please send via email.
Also see
On-line: help for est, postest, johans, vecar, (if installed), reg3, mvreg, wntstmvq (if installed), omninorm (if installed)