So, what do you understand by vector error correction model (VECM)?
You may say any of the following: that it is a system having a vector of two or more variables;
that all the variables in a VECM are endogenous; there are no exogenous variables;
VECM is constructed only if the variables are cointegrated;
cointegration implies evidence of a long-run relationship among the variables;
it is a restricted VAR model with cointegrating restrictions built into the specification;
constructed to examine long- and short-run dynamics of the cointegrated series;
restricts the long-run behaviour of endogenous variables to converge to their cointegrating relationships;
that the cointegrating term is known as the error correction term;
it is a representation of cointegrated VAR (courtesy of Granger’s representation theorem) and that the resulting VAR from VECM representation has more efficient coefficient estimates.
Also, note that VAR specified in differences is a mis-specification while VECM is obtained by differencing a VAR, hence losing a lag.
So, you construct a VECM with a (p-1) lag lengths for all the variables in the system.
These are the basic steps required to estimating a VECM. (1) series must be stationary (integrated of same order); (2) determine optimal lag length for the model; (3) perform Johansen cointegration test; (4) if there is no cointegration, estimate the unrestricted VAR model; (5) but if there is cointegration, then specify the restricted VAR model (i.e. VECM). In this video using Stata13, I show you the rudiments of the VECM specification.