We propose a new method to determine the cointegration rank in the error correction model (ECM). The cointegration rank, together with the lag order, is determined by a penalized goodness-of-fit measure. We show that the estimated cointegration vectors are consistent with a convergence rate T, and our estimation for the cointegration rank is consistent. Our approach is more robust than the conventional likelihood based methods, as we do not impose any assumption on the form of the error distribution in the model. Furthermore we allow the serial dependence in the error sequence. The proposed methodology is illustrated with both simulated and real data examples. The advantage of the new method is particularly pronounced in the simulation with...