fourier_kpss

Purpose

KPSS stationarity test with flexible Fourier form structural breaks.

Format

{ KPSSk, k, cv } = fourier_kpss(y, model[, fmax, bwl, varm])
Parameters
  • y (Nx1 matrix) – Dependent variable.

  • model (Scalar) –

    Model to be implemented.

    1

    Constant

    2

    Constant and trend

  • fmax (Scalar) – Optional, maximum number of single Fourier frequency (upper bound is 5). Default = 5.

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

  • varm – 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

Returns
  • KPSSk (Scalar) – KPSS(k) statistic.

  • p (Scalar) – number of lags selected by chosen information criterion

  • cv (Vector) – 1%, 5%, 10% critical values for the chosen model

Examples

new;
cls;
library tspdlib;

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

// With constant
model = 1;

// Call test
{ KPSS, k, cv } = Fourier_KPSS(y, model);

Source

fourier_kpss.src