Object Reference : Object View and Procedure Reference : Var
  
 
ec
Estimate a vector error correction model (VEC).
Syntax
var_name.ec(trend, n) lag_pairs endog_list [@ exog_list]
Specify the order of the VEC by entering one or more pairs of lag intervals, then list the series or groups to be used as endogenous variables. Note that the lag orders are those of the first differences, not the levels. If you are comparing results to another software program, you should be certain that the specifications for the lag orders are comparable.
You may include exogenous variables, such as seasonal dummies, in the VEC by including an “@”-sign followed by the list of series or groups. Do not include an intercept or trend in the VEC specification, these terms should be specified using options, as described below.
You should specify the trend option and the number of cointegrating equations n to use in parentheses, separated by a comma (the default is n=1). You must choose the trend from the following five alternatives:
 
a
No deterministic trend in the data, and no intercept or trend in the cointegrating equation.
b
No deterministic trend in the data, and an intercept but no trend in the cointegrating equation.
c (default)
Linear trend in the data, and an intercept but no trend in the cointegrating equation.
d
Linear trend in the data, and both an intercept and a trend in the cointegrating equation.
e
Quadratic trend in the data, and both an intercept and a trend in the cointegrating equation.
restrict
Impose restrictions. See Var::append and Var::coint.
m=integer
Maximum number of iterations for restricted estimation (only valid if you choose the restrict option).
c=scalar
Convergence criterion for restricted estimation. (only valid if you choose the restrict option).
Options
 
prompt
Force the dialog to appear from within a program.
p
Print the results view.
Examples
var macro1.ec 1 4 m1 gdp tb3
declares a var object MACRO1 and estimates a VEC with four lagged first differences, three endogenous variables and one cointegrating equation using the default trend option “c”.
var term.ec(b,2) 1 2 4 4 tb1 tb3 tb6 @ d2 d3 d4
declares a var object TERM and estimates a VEC with lagged first differences of order 1, 2, 4, three endogenous variables, three exogenous variables, and two cointegrating equations using trend option “b”.
Cross-references
See “Vector Error Correction (VEC) Models” for a discussion of VECs.
See Var::ls and Var::bvar for estimation of ordinary VARs and Bayesian VAR models. See also, Var::coint and Var::append.