The cointegrating regression is allowed to have a trend or not, and can have either a break in the intercept only or a break in all coefficients. The break point t0 is unknown and determined by finding the minimum value for the ADF statistic on the residuals from the broken cointegration regression. The number of lags of the change in the residual used in computing the ADF statistic can either be input, or can be selected automatically using AIC, BIC or general-to-specific pruning by t-tests.
gregoryhansen.src
Detailed description
Example
Code: Select all
*
* Replication file for Gregory, Allan W. & Hansen, Bruce E., 1996.
* "Residual-based tests for cointegration in models with regime shifts,"
* Journal of Econometrics, vol. 70, no 1, 99-126.
*
* Example from Bruce Hansen's web site.
*
open data gregoryhansen.rat
calendar(q) 1959:1
*
* M1 and TBILLS are monthly data. M1 is compacted by quarterly averages,
* while TBILLS select the 3rd month of the quarter.
*
data(format=rats,compact=average) 1959:01 1990:04 nomnnp realnnp m1
data(format=rats,select=3) 1959:01 1990:04 tbills
*
set deflator = nomnnp/realnnp
set realm1 = m1/deflator
*
set logm1 = log(realm1)
set loginc = log(realnnp)
*
@GregoryHansen(lag=6,method=ttest,det=constant,break=all,graph)
# logm1 loginc tbills