Selection of the cointegrating rank and the lags with Information criterion (AIC, BIC).
1 2 3 4 5 6 7 8 9 
data 
multivariate time series. 
lag.max 
Maximum number of lags to investigate. 
r.max 
Maximum rank to investigate. 
include 
Type of deterministic regressors to innclude. See

fitMeasure 
Whether the AIC/BIC should be based on the full likelihood,
or just the SSR. See explanations in 
sameSample 
Logical. Whether the data should be shortened so that the AIC/BIC are estimated on the same sample. Default to TRUE. 
returnModels 
Logical, default to FALSE. Whether the output should also contain the list of each model computed. 
x 
The output from 
... 
Unused. 
object 
The output from 
This function estimates the AIC, BIC and HannanQuinn for each rank (up to
lags.max
) and lags (up to lags.max
). This method has been shown
to be useful to select simultaneously the rank and the lags, see references.
An object of class ‘rank.select’, with ‘print’ and ‘summary methods’, containing among other the matrices of AIC/BIC/HQ, the Likelihood, and best ranks according to each criterion.
Matthieu Stigler
 Aznar A and Salvador M (2002). Selecting The Rank Of The Cointegration Space And The Form Of The Intercept Using An Information Criterion. Econometric Theory, *18*(04), pp. 926947. <URL: http://ideas.repec.org/a/cup/etheor/v18y2002i04p926947_18.html>.
Cheng X and Phillips PCB (2009). Semiparametric cointegrating rank selection. Econometrics Journal , *12*(s1), pp. S83S104. <URL: http://ideas.repec.org/a/ect/emjrnl/v12y2009is1ps83s104.html>.
 Gonzalo J and Pitarakis J (1998). Specification via model selection in vector error correction models. Economics Letters, *60*(3), pp. 321  328. ISSN 01651765, <URL: http://dx.doi.org/DOI: 10.1016/S01651765(98)001293>.
 Kapetanios G (2004). The Asymptotic Distribution Of The Cointegration Rank Estimator Under The Akaike Information Criterion. Econometric Theory, *20*(04), pp. 735742. <URL: http://ideas.repec.org/a/cup/etheor/v20y2004i04p735742_20.html>.
 Wang Z and Bessler DA (2005). A Monte Carlo Study On The Selection Of Cointegrating Rank Using Information Criteria. Econometric Theory, *21*(03), pp. 593620. <URL: http://ideas.repec.org/a/cup/etheor/v21y2005i03p593620_05.html>.
VECM
for estimating a VECM. rank.test
(or ca.jo
in package urca) for the classical
Johansen cointegration test.
1 2 3 4 5 6  data(barry)
#
rk_sel < rank.select(barry)
rk_sel
summary(rk_sel)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.