coint_ghansen¶
Purpose¶
Computes the tests for the null of no cointegration against the alternative of cointegration with a structural break in the mean.
Format¶
-
{ ADF_min, TBadf, Zt_min, TBzt, Za_min, TBza, cvADFZt, cvZa } =
coint_ghansen(y, x, model[, bwl, ic, pmax, varm, trimm])¶ Parameters: - y (Nx1 matrix) – Dependent variable.
- x (NxK matrix) – Independent variable.
- model (Scalar) –
Model to be implemented.
1 Level shift (C) 2 Level shift with trend (C/T) 3 Regime shift (C/S) 4 Regime and trend shift - bwl (Scalar) – Optional, bandwidth length for long-run variance computation. Default = round(4 * (T/100)^(2/9)).
- ic (Scalar) –
Optional, the information criterion used for choosing lags. Default = 3.
1 Akaike. 2 Schwarz. 3 t-stat significance - pmax (Scalar) – Optional, maximum number of lags for \(\Delta y\) in ADF test. Default = 8.
- varm (Scalar) –
Optional, long-run consistent variance estimation method. Default = 1.
1 iid. 2 Bartlett. 3 Quadratic Spectral (QS). 4 SPC with Bartlett (Sul, Phillips & Choi, 2005) 5 SPC with QS 6 Kurozumi with Bartlett 7 Kurozumi with QS - trimm (Scalar) – Optional, trimming rate. Default = 0.10.
Returns: - ADFmin (Scalar) – ADF test statistic
- TBadf (Scalar) – Break point using OLS.
- Zamin (Scalar) – Za test statistic
- TBza (Scalar) – Break point for using Za statistic.
- Ztmin (Scalar) – Zt test statistic
- TB_zt (Scalar) – Break point using Zt statistic.
- cvADFZt (Scalar) – 1%, 5%, 10% critical values for ADF and Zt test statistics.
- cvZa (Scalar) – 1%, 5%, 10% critical values for Za test statistics.
Examples¶
new;
cls;
library tspdlib;
// Load dataset
data = loadd(getGAUSSHome() $+ "pkgs/tspdlib/examples/ts_coint.csv",
". + date($Date, '%b-%y')");
// Define y and x matrix
y = data[., 1];
x = data[., 2:cols(data)];
// Level shift
model = 1;
// Call test
{ ADF_min, TBadf, Zt_min, TBzt, Za_min, TBza, cvADFZt, cvZa } = coint_ghansen(y, x, model);
Source¶
coint_ghansen.src
See also
Functions coint_cissanso(), coint_egranger(), coint_hatemij(), coint_maki()