kpss_2break#

Purpose#

Computes the KPSS stationary test with two structural breaks.

Format#

{ kpss_stat, tb1, tb2, cv } = KPSS_2breaks(y, model[, bwl, varm, trimm])#
Parameters:
  • y (Nx1 matrix) – Time series data to be tested.

  • model (Scalar) –

    Model to be implemented.

    1

    Level shift without trend.

    2

    Level shift with trend.

    3

    Trend shift.

    4

    Level and trend shift.

  • bwl (Scalar) – Optional, bandwidth for the spectral window. Default = round(4 * (T/100)^(2/9)).

  • 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:
  • kpss_stat (Scalar) – The KPSS test statistic with two breaks.

  • tb1 (Scalar) – Location of the first break.

  • tb2 (Scalar) – Location of the second break.

  • cv (Vector) – 1%, 5%, and 10% critical values for kpss_2break() statistic.

Examples#

library tspdlib;

// Load date file
y = loadd(getGAUSSHome() $+ "pkgs/tspdlib/examples/ts_examples.csv", "Y + date($Date, '%b-%y')");

// Break in level
model = 1;
{ KPSS, tb1, tb2, cv } = KPSS_2breaks(y, model);

Source#

kpss_1br.src

See also

Functions lmkpss(), kpss_1break()