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.
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(__FILE_DIR $+ "ts_examples.csv", "Y + date($Date, '%b-%y')");

// With constant
model = 1;

"Fourier KPSS test (Becker, Enders & Lee, 2006)";
{ KPSS, k, cv } = Fourier_KPSS(y, model);

Source

fourier_kpss.src

See also

Functions fourier_adf, :func:`fourier_gls(), fourier_lm()