coint_hatemij#
Purpose#
Computes the test of the null hypothesis of no cointegration against the alternative of cointegration with two regime shifts.
Format#
- { ADF_min, TB1adf, TB2adf, Zt_min, TB1zt, TB2zt, Za_min, TB1za, TB2za, cvADFZt, cvZa } = coint_hatemiJ(y, x[, model, bwl, ic, pmax, varm, trimm])#
- Parameters:
y (Nx1 matrix) – Dependent variable.
x (NxK matrix) – Independent variable.
model (Scalar) –
Optional, model to be implemented. Default = 3.
3
Regime shift (C/S)
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
TB1adf (Scalar) – First break point using ADF statistic.
TB2adf (Scalar) – Second break point using ADF statistic.
Ztmin (Scalar) – Zt test statistic
TB1zt (Scalar) – Break point using Zt statistic.
TB2zt (Scalar) – Break point using Zt statistic.
Zamin (Scalar) – Za test statistic
TB1za (Scalar) – First break point for using Za statistic.
TB2adf – Second break point using Za 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#
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)];
T = rows(data);
// Call test
{ADF_min, TB1adf, TB2adf, Zt_min, TB1zt, TB2zt, Za_min, TB1za, TB2za, cvADFZt, cvZa } =
coint_hatemiJ(y, x);
Source#
coint_hatemij.src
See also
Functions coint_cissanso()
, coint_egranger()
, coint_ghansen()
, coint_maki()