Description Usage Arguments Details Value Comparison with urca Author(s) References See Also Examples
Maximumlikelihood test of the cointegrating rank.
1 2 3 4 5 6 7 8 
vecm 
‘VECM’ object computed with the function

type 
Type of test, either 'trace' or 'eigenvalue'. See details below. 
r_null 
Rank to test specifically. 
cval 
Critical value level for the automatic test. 
x 
The output from 
... 
Unused. 
object 
The output from 
digits 
The number of digits to use in 
This function computes the two maximumlikelihood tests for the cointegration rank from Johansen (1996). Tests are:
Test the hypothesis of rank ‘h’ against rank ‘K’, i.e. against the alternative that the system is stationary.
Test the hypothesis of rank ‘h’ against rank ‘h+1’.
The test works for five specifications of the deterministic terms as in
Doornik et al (1998), to be specified in the previous call to
VECM
:
Unrestricted constant and trend:
use include="both"
Unrestricted constant and restricted
trend: use include="const"
and LRinclude="trend"
Unrestricted constant and no trend: use include="const"
Restricted constant and no trend: use LRinclude="const"
No constant nor trend: use include="none"
Two testing procedures can be used:
By specifying a value for ‘r_null’. The ‘pval’ value returned gives the speciifc pvalue.
If not value is specified for ‘r_null’, the function makes a simple automatic test: returns the rank (slot ‘r’) of the first test not rejected (level specified by arg ‘cval’) as recommend i.a. in Doornik et al (1998, p. 544).
A full table with both test statistics ad their respective pvalues is given in the summary method.
Pvalues are obtained from the gamma aproximation from Doornik (1998, 1999). Small sample values adjusted for the sample site are also available in the summary method. Note that the ‘effective sample size’ for the these values is different from output in gretl for example.
An object of class ‘rank.test’, with ‘print’ and ‘summary methods’.
While ca.jo
in package
urca and rank.test
both implement Johansen tests, there are a
few differences:
rank.test
gives pvalues, while ca.jo
gives
only critical values.
rank.test
allows for five different
specifications of deterministic terms (see above), ca.jo
for only
three.
ca.jo
allows for seasonal and exogenous regressors,
which is not available in rank.test
.
The lag is specified
differently: K
from ca.jo
corresponds to lag
+1 in
rank.test
.
Matthieu Stigler
 Doornik, J. A. (1998) Approximations to the Asymptotic Distributions of Cointegration Tests, Journal of Economic Surveys, 12, 57393
 Doornik, J. A. (1999) Erratum [Approximations to the Asymptotic Distribution of Cointegration Tests], Journal of Economic Surveys, 13, i
 Doornik, Hendry and Nielsen (1998) Inference in Cointegrating Models: UK M1 Revisited, Journal of Economic Surveys, 12, 53372
 Johansen, S. (1996) Likelihoodbased inference in cointegrated Vector Autoregresive Models, Oxford University Press
VECM
for estimating a VECM. rank.select
to estimate the rank based on information criteria.
ca.jo
in package urca for another implementation of
Johansen cointegration test (see section ‘Comparison with urca’ for
more infos).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30  data(barry)
## estimate the VECM with Johansen!
ve < VECM(barry, lag=1, estim="ML")
## specific test:
ve_test_spec < rank.test(ve, r_null=1)
ve_test_spec_tr < rank.test(ve, r_null=1, type="trace")
ve_test_spec
ve_test_spec_tr
## No specific test: automatic method
ve_test_unspec < rank.test(ve)
ve_test_unspec_tr < rank.test(ve, type="trace")
ve_test_unspec
ve_test_unspec_tr
## summary method: output will be same for all types/test procedure:
summary(ve_test_unspec_tr)
## The function works for many specification of the VECM(), try:
rank.test(VECM(barry, lag=3, estim="ML"))
rank.test(VECM(barry, lag=3, include="both",estim="ML"))
rank.test(VECM(barry, lag=3, LRinclude="const",estim="ML"))
## Note that the tests are simple likelihood ratio, and hence can be obtained also manually:
2*(logLik(ve, r=1)logLik(ve, r=2)) # eigen test, 1 against 2
2*(logLik(ve, r=1)logLik(ve, r=3)) # eigen test, 1 against 3

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.