all VAR(p) models with lag lengths p less than or equal to the value given
to max.ar, and the lag length is determined as the one which minimizes
the information criterion specified by the criterion option. The default
criterion is BIC but other valid choices are logL, AIC and HQ. In the computation
of the information criteria, a common sample based on max.ar
is used. Once the lag length is determined, the VAR is re-estimated using
the appropriate sample. In the above example, the BIC values were
computed using the sample based on max.ar=4 and p = 1 minimizes BIC.
The VAR(1) model was automatically re-estimated using the sample size
appropriate for p = 1.