GREGORYHANSEN Procedure |
@GregoryHansen performs the test for cointegration allowing for a break in the cointegrating vector from Gregory and Hansen(1996a) and (1996b).
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.
It is important to note that this is a test for cointegration—it is not a method for estimating a break in the cointegrating vector. The break point is chosen not as the best "fitting" value, but as the one that produces the most extreme evidence against the null (which is that there is no cointegration). If there is, in fact, cointegration but with a break in the cointegrating vector, the residuals from a fixed coefficient Engle-Granger test will look like they have a unit root, so the EG test would lead us to conclude that the series aren't cointegrated (technically, we would accept the absence of cointegration). In the example below, despite allowing for a possible break in the cointegrating vector, we still conclude that there is no cointegration, so the breakpoint really hasn't identified anything of real meaning.
Note well: Gregory and Hansen only provide critical values for up to five endogenous variables (one "dependent" variable and four right-hand side variables). The estimation is done on the basis that there is (hypothetically) a single cointegrating vector linking the series. If the cointegrating space is rank two or greater (which is very likely with more than four or five variables), then the whole analysis makes no real sense since there are an infinite number of possible cointegrating vectors formed by taking linear combinations.
@GregoryHansen( options ) start end
# list of endogenous variables(with dependent variable first)
Wizards
This is included as one of the tests in the Time Series—Cointegration Test Wizard.
Parameters
start, end |
range for regression. By default, the maximum range permitted by all variables involved in the regression allowing for lags. |
Options
DET=[CONSTANT]/TREND
BREAK=[INTERCEPT]/ALL
MODEL=CONSTANT/TREND/NOTREND/REGIMETREND/FULLBREAK
DET chooses the deterministic components in the cointegrating regression. BREAK chooses what components are allowed to a break at the unknown change point. BREAK=ALL has the intercept and slope coefficients and the trend if present all breaking.
MODEL is an alternative way of specifying the model, however, it makes more sense to use the other options as the choice is clearer (the terminology in the naming of the "MODEL" values is a bit odd). For MODEL, CONSTANT and TREND have those deterministic components but only the intercept breaks. NOTREND has CONSTANT only but with all regressors breaking while REGIMETREND has CONSTANT and TREND and has all regressors breaking.
METHOD=[INPUT]/AIC/BIC/HQ/TTEST/GTOS
Selects the method for deciding the number of additional lags. If INPUT, the number of lags given by the LAGS option is used. If AIC, the AIC-minimizing value between 0 and LAGS is used; if BIC, it's the BIC-minimizing value, if HQ, it's the Hannan-Quinn minimizer, and if TTEST or GTOS (those are synonyms) the number of lags for which the last included lag has a marginal significance level less than the cutoff given by the SIGNIF option.
LAGS=number of additional lags (METHOD=INPUT) or the maximum number of lags to consider (other METHOD's) [number of observations**.25]
SIGNIF=cutoff significance level for METHOD=TTEST [.10]
GRAPH/[NOGRAPH]
GRAPH requests a graph of the unit-root statistics with the different break points
PI=fraction of data range to skip at either end when examining possible break points [.15]
[PRINT]/NOPRINT
TITLE=title for report ["Gregory-Hansen Cointegration Test"]
Variables Defined
%CDSTAT |
unit root test statistic (REAL) |
%%BREAKPOINT |
entry at which %CDSTAT is achieved (REAL) |
%%AUTOP |
number of augmenting lags used (INTEGER) |
Notes
Gregory and Hansen only provide critical values for up to five endogenous variables (one "dependent" variable and four right-hand side variables).
Example
This is the example from Bruce Hansen's web site. It does a non-trending model allowing for breaks in both the intercept and the coefficients of the cointegrating vector. The number of lags in the derived ADF regression are chosen from a maximum of six using general-to-specific pruning (METHOD=TTEST).
*
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
Sample Output
This is the output from the example above. Because the minimum t-statistic isn't as negative as the critical values, we would conclude that there the series are not cointegrated even if you allow for a possible break in the cointegrating vector.
Gregory-Hansen Cointegration Test
Null is no cointegration (residual has unit root)
Regression Run From 1960:04 to 1990:04
Observations 121
Full Structural Break. No Trend.
With 6 lags chosen from 6 by GTOS/t-tests(0.100)
Variables
LOGM1
LOGINC
TBILLS
Minimum T-Statistic -4.592
Achieved At 1976:02
1% Critical Value -5.970
5% Critical Value -5.500
10% Critical Value -5.230
The graph (generated if you use the GRAPH option) shows the ADF statistics with the different breakpoints. The minimum value is highlighted with the grid value.
Copyright © 2025 Thomas A. Doan