coint_maki¶
Purpose¶
Computes the test of the null hypothesis of no cointegration against the alternative of cointegration with an unknown number of breaks.
Format¶
-
tst =
coint_maki(y, m, model[, trimm, lagoption])¶ Parameters: - y (Nxk matrix) – Data to be tested.
- m (Scalar) – Maximum number of breaks.
- model (Scalar) –
Model to be implemented.
0 Level shift 1 Level shift with trend 2 Regime shift 3 Regime shift with trend - trimm (Scalar) – Optional, trimming rate. Default = 0.10.
- lagoption (Scalar.) –
Optional, lag selection criteria. Default = 1.
0 No lags 1 T-stat criterion
Returns: tst (Scalar) – Test statistic
Examples¶
/*
** This example program tests for cointegration
** with alternatives hypothesis up to m structural breaks
*/
library tspdlib;
// Load dataset
data = loadd(getGAUSSHome() $+ "pkgs/tspdlib/examples/ts_coint.csv",
". + date($Date, '%b-%y')");
// Set the maximum number of breaks
m = 3;
/*
** Set the model
** 0: level shift
** 1: level shift with trend
** 2: regime shifts
** 3: Trend and Regime shifts
*/
model = 2;
// Perform test
call coint_maki(datap, m, model);