help bayerhanck


bayerhanck -- Test for Non-Cointegration


bayerhanck LHSvar [if] [in] , rhs(RHSvarlist) [options]

options Description ------------------------------------------------------------------------- Model lags(#) use # for the maximum number of augmentation lags (>=0), default is 1 trend(constant) include an unrestricted constant in model; the default trend(trend) include a linear trend in the cointegrating equations and a quadratic trend in the undifferenced data trend(none) do not include a trend or a constant

Reporting crit(1 | 5 | 10) Level-alpha in % for the critical value of the test to be reported



bayerhanck produces a joint test-statistic for the null of no-cointegration based on Engle-Granger, Johansen maximum eigenvalue, Boswijk, and Banerjee tests (see Bayer and Hanck, 2009, for details).

Saved results

bayerhanck saves the following in e():

Scalars e(EJ) test statistics based on Engle-Granger and Johansen tests e(BECREJ) test statistics based on all four tests e(CRIT_EJ) critical value for the test statistics based on Engle-Granger and Johansen tests e(CRIT_BECREJ) critical value for the test statistics based on all four tests

Matrices e(STAT) test statistics of all four underlying tests e(PV) corresponding p-values


Example 1: (underlying tests produce conflicting results)

Setup . webuse lutkepohl

Test for non-cointegration . bayerhanck linvestment, rhs(lincome lconsumption)

Same as above, but use 4 lags in the underlying VECM model . bayerhanck linvestment, rhs(lincome lconsumption) lags(4)

Same as above, but report 10% critical values instead of 5% . bayerhanck y, rhs(i c) lags(4) crit(10)

Example 2: Monte Carlo Study

clear all set more off set matsize 100 local rep=100 mat def testPower=J(`rep',2,999) mat def testSize=J(`rep',2,999) forv z=1/`rep' { clear qui { set obs 400 gen dx=rnormal() gen x=sum(dx)+50 forv j=1/5 { gen dz`j'=rnormal() gen z`j'=sum(dz`j') } gen T=_n tsset T gen u=rnormal() replace u=u+0.95*l.u if T>1 gen y=x+u drop if T<200 replace x=x+T di "Power Example" bayerhanck x, rhs(y) trend(trend) lags(1) mat testPower[`z',1]=`e(EJ)' mat testPower[`z',2]=`e(BECREJ)' di "Size Example" bayerhanck x, rhs(z*) trend(trend) lags(1) crit(10) mat testSize[`z',1]=`e(EJ)' mat testSize[`z',2]=`e(BECREJ)' } } ereturn list svmat testPower svmat testSize keep test* drop if testPower1==. count if testSize1>e(CRIT_EJ) count if testSize2>e(CRIT_BECREJ) count if testPower1>e(CRIT_EJ) count if testPower2>e(CRIT_BECREJ)

Also see

Bayer, Christian and Christoph Hanck: "Combining Non-Cointegration tests", METEOR RM/09/012, University of Maastricht.

Installation Files bayerhanck.ado NullDistr.dta bayerhanck.sthlp