@JOHMLE does basic tests for cointegration using the Johansen ML technique. This is a very small subset of what the CATS package of procedures can do.

@JohMLE( options)   start end

# list of endogenous variables

Wizards

This is included as one of the tests in the Cointegration Test Wizard and one of the estimators in the Cointegration Estimation Wizard on the Time Series menu.

Parameters

 start , end estimation range. By default, the maximum common range of the endogenous variables allowing for lags.

Options

LAGS=# of lags in the VAR(which means LAGS-1 on the differences)

DET=NONE/[CONSTANT]/TREND/RC

Selects the deterministic variables in the VAR. CONSTANT and TREND are in the model but not the CV. RC restricts a constant to the CV so there are no trends in the model.

SEASONAL/[NOSEASONAL]

SEASONAL includes seasonal dummies as deterministics.

RANK=assumed rank of the cointegration space [number of variables]

If you are using @JOHMLE to estimate the cointegrating space, you can use this to set the rank. This affects the dimensions of the VECTORS, DUALVECTORS and LOADINGS matrices.

ECT=VECT[EQUATION] of equations describing the cointegrating vectors

You can use this to define a VECT[EQUATION] with the cointegrating relations. This can be used directly in the ECT subcommand used in defining and estimating a VECM.

CV=(output) ML estimator for a single cointegrating vector [not used]

VECTORS=(output) matrix of (column) eigenvectors

EIGENVALUES=(output) VECTOR of eigenvalues

DUALVECTORS=(output) RECTANGULAR matrix of eigenvectors of the dual problem

TRACETESTS=(output) VECTOR of trace test statistics

Examples

This tests cointegration for a set of three Treasury yields. This uses DET=RC (restricted constant), since the yields have no trend. It saves the eigenvectors and extracts the first two (which is the choice for the cointegrating rank;see the output below) and normalizes them to have the identity in the top corner.

@johmle(det=rc,lags=1,vectors=evectors)

# tb10yr tb5yr tb1yr

*

* Extract the first two eigenvectors

*

compute spantwo=%xsubmat(evectors,1,4,1,2)

*

* Normalize by post-multiplying by the inverse of the top 2x2 corner

*

compute normtwo=spantwo*inv(%xsubmat(spantwo,1,2,1,2))

*

disp "r10 = " -normtwo(4,1) "+" -normtwo(3,1) "r1"

disp "r5  = " -normtwo(4,2) "+" -normtwo(3,2) "r1"

This estimates an unrestricted VAR, then uses @JOHMLE to estimate one cointegrating vector and uses that to estimate a VECM.

system(model=usdata)

variables logm1 logy rd rb

lags 1 2

det constant

end(system)

estimate

compute sigmaols=%sigma

*

@johmle(lags=2,det=constant,cv=beta)

# logm1 logy rd rb

*

equation(coeffs=beta) ecteq *

# logm1 logy rd rb

*

system(model=vecm)

variables logm1 logy rd rb

lags 1 2

det constant

ect ecteq

end(system)

Sample Output

This is the output from the first example. The "LogL" column has the log likelihood for the model with the rank of the cointegrating space restricted to the corresponding "Rank" column. The 0 row would thus be for a model estimated in first differences, the 3 row for the unrestricted model. rank=2 proves to be just barely significant at the .05 level, so that is what is used above.

Likelihood Based Analysis of Cointegration

Variables:  TB10YR TB5YR TB1YR

Estimated from 1962:02 to 2010:03

Data Points 195 Lags 1 with Constant restricted to Cointegrating Vector

Unrestricted eigenvalues and -T log(1-lambda)

Rank     EigVal  Lambda-max  Trace   Trace-95%   LogL

0                                        -161.1242

1   0.1386    29.0856  49.5133   35.0700 -146.5815

2   0.0853    17.3796  20.4277   20.1600 -137.8917

3   0.0155     3.0481   3.0481    9.1400 -136.3676

Cointegrating Vector for Largest Eigenvalue

TB10YR    TB5YR    TB1YR      Constant

-3.807583 5.752102  -2.054666 0.399942