Maximum-likelihood test of the cointegrating rank.
1 2 3 4 5 6 7 8
‘VECM’ object computed with the function
Type of test, either 'trace' or 'eigenvalue'. See details below.
Rank to test specifically.
Critical value level for the automatic test.
The output from
The output from
The number of digits to use in
This function computes the two maximum-likelihood 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
Unrestricted constant and trend:
Unrestricted constant and restricted
Unrestricted constant and no trend: use
Restricted constant and no trend: use
No constant nor trend: use
Two testing procedures can be used:
By specifying a value for ‘r_null’. The ‘pval’ value returned gives the speciifc p-value.
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 p-values is given in the summary method.
P-values 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’.
ca.jo in package
rank.test both implement Johansen tests, there are a
rank.test gives p-values, while
only critical values.
rank.test allows for five different
specifications of deterministic terms (see above),
ca.jo for only
ca.jo allows for seasonal and exogenous regressors,
which is not available in
The lag is specified
ca.jo corresponds to
- Doornik, J. A. (1998) Approximations to the Asymptotic Distributions of Cointegration Tests, Journal of Economic Surveys, 12, 573-93
- 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, 533-72
- Johansen, S. (1996) Likelihood-based inference in cointegrated Vector Autoregresive Models, Oxford University Press
ca.jo in package urca for another implementation of
Johansen cointegration test (see section ‘Comparison with urca’ for
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.