VECM in R: how to add differenced lags? Good afternoon!
I want to estimate VECM in R and I have 2 questions:
For instance, I want to estimate a model (in vector form):
$$
\bigtriangleup y_t = \pi_1 y_{t-1} + \pi_2 y_{t-2} + A_1 \bigtriangleup y_{t-1} + A_2 \bigtriangleup y_{t-2} + A_3 \bigtriangleup y_{t-3} + \varepsilon_t
$$
How can I specify in R exact number of lags for cointegrating relationship (2 lags in the example) and exact number of lags for differenced variables (3 lags here)?
Update.

*

*The proof that only one lag in cointegrating relationship is sufficient: Proof

*R packages provide opportunity to add any number of lags for differenced variables in the system. For instance, ca.jo from vars has argument K.


You have two distinct questions in your post. I suggest splitting it into two posts. I will answer the first one here.

*

*Having more than one lag of the error correction term is an unusual representation of a VECM. You can express this by an equivalent representation that contains a single lag of the error correction term. Do that, and you will not have to worry about coding it up in R. (Also, you have forgotten to include the error term at the end of the equation for $\Delta y_t$.)

