help ghansen-------------------------------------------------------------------------------

Title

ghansen-- Gregory-Hansen test for cointegration with regime shifts

Syntax

ghansendepvarindepvars[if] [in],break(string)lagmethod(string)[maxlags(integer)trim(real)level(real)]

optionsDescription ------------------------------------------------------------------------- Mainbreaktype of structural break of cointegration vectorlagmethodMethod for lag selection in adf testmaxlagsMaximum lags to search in adf testtrimfraction of data range to skip at either end when examining possible break pointslevelconfidence level for downward t statistic lag selection in adf test -------------------------------------------------------------------------byis allowed; see[D] by. You musttssetyour data before usingghansen; see[TS] tsset.depvarandindepvarsmay contain time-series operators; see tsvarlist.

Description

ghansenperforms the Gregory-Hansen test for cointegration with regime shifts proposed in Gregory and Hansen (1996) on a dependent variabledepvarand up to four independent variables inindepvars. The test's null hypothesis is no cointegration against the alternative of cointegration with a single shift at an unknown point in time.ghansendoes not allow gaps within the observations of the time series.

Options+------+ ----+ Main +-------------------------------------------------------------

break(string)is required and specifies the type of break in the cointegration vector. Details are provided in Gregory and Hansen (1996) and Gregory and Hansen (1996a).

break(level)specifies a break in the constant term.

break(trend)specifies a break in the constant and the trend.

break(regime)specifies a break in the constant and the slope.

break(regimetrend)specifies a break in the constant, the slope and the trend (Gregory and Hansen 1996a)

lagmethod(string)is required and specifies the algorithm to choose the number of lags in the Augmented Dickey Fuller tests.

lagmethod(fixed)sets the number of lags equal to the maximum lags specified inmaxlag(integer)

lagmethod(aic)chooses the number of lags that minimize the Akaike information criterion.

lagmethod(bic)chooses the number of lags that minimize the Bayesian information criterion.

lagmethod(downt)chooses the number of lags such that the last lag is significant according to its t-statistic, starting from a maximum number of lags.

maxlags(integer)is optional and specifies the maximum number of lags to include in the Augmented Dickey Fuller test, or the number of lags to include iflagmethodis fixed.maxlagsis required iflagmethodis fixed. Default is T^0.25, where T is the sample size.

trim(real)is optional and specifies the fraction of the data range to skip at either end when examining possible break points. Default is 0.15.trimmust be a positive real number between 0 and 0.25.

level(real)is optional and specifies the cutoff confidence level for the downt lag selection method. Default is 0.95.

Examples. webuse balance2 ,clear

Break in level, lags chosen by Akaike criterion, maximum of 5 lags.

. ghansen y i c, break(level) lagmethod(aic) maxlags(5)

Change in regime , 5 lags chosen by user.

. ghansen y i c, break(regime) lagmethod(fixed) maxlags(5)

Change in regime and trend , downward t lag selection at the 99% confidence level, trim 10% of sample.

. ghansen y i c, break(regimetrend) lagmethod(downt) level(0.99) trim(0.1)

Saved results

ghansensaves the following inr():Scalars

r(tstat)t-statistic for adf testr(lag)lags for adf testr(breakptadf)estimated breakpoint for adf testr(za)za statisticr(breakptza)estimated breakpoint for za testr(zt)zt statisticr(breakptzt)estimated breakpoint for zt testMacros

r(break)Type of breakr(badfdate)estimated break date for adf testr(bzadate)estimated break date for za testr(bztdate)estimated break date for zt test

AuthorJorge Pérez, Inter-American Development Bank jperezperez@iadb.org

ReferencesGregory, Allan W. and Bruce E. Hansen (1996). "Residual-Based Tests for Cointegration in Models with Regime Shifts",

Journal of Econometrics70(1), pp. 99-126.Gregory, Allan W. and Bruce E. Hansen (1996a). "Tests for Cointegration in Models with Regime and Trend Shifts",

Oxford Bulletin of Economics andStatistics58 (3), pp. 555-60.Hansen, Bruce E. (n.d.) Residual-based tests for cointegration in models with regime shifts.

Programs -- Cointegration. Retrieved August 1, 2011 from http://www.ssc.wisc.edu/~bhansen/progs/joe_96.html

AcknowledgementsThis command is based on R code provided in Hansen (n.d.) I am grateful to Muhammad Anees and Nicholas Cox for help in identifying a bug in a previous version of the program.

DisclaimerThis program is provided without warranty of any kind. The author is not responsible for any cost derived by the usage of this program.

Also seeHelp:

[TS] vec,[TS] vecrank, zandrews (if installed),