Learn R Programming

tsDyn (version 0.9-1)

rank.test: Test of the cointegrating rank

Description

Maximum-likelihood test of the cointegrating rank.

Usage

rank.test(vecm, type=c("eigen", "trace"), r_null, cval=0.05)
## S3 method for class 'rank.test':
print(x,...)
## S3 method for class 'rank.test':
summary(object,...)

Arguments

vecm
VECM object computed with the function VECM.
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 rank.test for the print method.
object
The output from rank.test for the summary method.
...
Unused.

Value

  • An object of class rank.test, with print and summary methods.

Comparison with urca

While ca.jo in package urca and rank.test both implement Johansen tests, there are a few differences:

  • rank.testgives p-values, whileca.jogives only critical values.
  • rank.testallows for five different specifications of deterministic terms (see above),ca.jofor only three.
  • ca.joallows for seasonal and exogenous regressors, which is not available inrank.test.
  • The lag is specified differently:Kfromca.jocorresponds tolag+1 inrank.test.

concept

  • VECM
  • cointegration
  • Rank test

Details

This function computes the two maximum-likelihood tests for the cointegration rank from Johansen (1996). Tests are: [object Object],[object Object]

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: [object Object],[object Object],and LRinclude="trend",[object Object],[object Object],[object Object]

Two testing procedures can be used: [object Object],[object Object]

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.

References

- 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

See Also

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).

Examples

Run this code
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

Run the code above in your browser using DataLab