fourier_kpss¶
Purpose¶
Computes the KPSS stationarity test with flexible Fourier form structural breaks.
Format¶
-
{ KPSSk, f, 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 (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
Returns: - KPSSk (Scalar) – KPSS(k) statistic.
- f (Scalar) – Number of single frequency.
- cv (Vector) – 1%, 5%, 10% critical values for the chosen model
Examples¶
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
{ KPSSk, f, cv } = Fourier_KPSS(y, model);