Selecting lag order for VAR and VECM [duplicate]

I want to estimate two models, Vector Autoregression (VAR) and Vector Error Correction Model (VECM).

What is the correct way to choose lag length / lag order?

For the VAR model, I have selected the lag ($p=4$) using:

1. variables at first difference
2. statistical criterion AIC
3. no evidence of autocorrelation or heteroscedasticity in the residuals.

For the VECM model, I have selected the lag ($p=1$) using:

1. VAR with variables at level,
2. statistical criterion of AIC,
3. no evidence of autocorrelation or heteroscedasticity in the residuals of VAR,
4. lag of VECM equal lag of VAR in level minus 1, VECM(0).

Is this methodology correct or in error?

marked as duplicate by Richard Hardy, mdewey, gung♦, Peter Flom♦Nov 20 '16 at 14:19

• – Richard Hardy Nov 20 '16 at 9:39