fourier_gls

Purpose

Local generalized lease squares unit root test with Flexible Fourier form structural breaks.

Format

{ GLSk, k, p, cv } = fourier_gls(y, model, pmax, fmax, ic)
Parameters:
  • y (Nx1 matrix) – Dependent variable.
  • model (Scalar) –

    Model to be implemented.

    1 Constant
    2 Constant and trend
  • pmax (Scalar) – Maximum number of lags for \(\delta y\); 0=no lag.
  • fmax (Scalar) – Maximum number of single Fourier frequency (upper bound is 5).
  • ic – Optional, the information criterion used for choosing lags. Default = 3.
Returns:
  • GLSk (Scalar) – GLS(k) statistic.
  • k (Scalar) – Number of single frequency.
  • 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 GLS test (Rodrigues & Taylor, 2012)";
{ GLSstat, f, p, cv } = Fourier_GLS(y, model);

Source

fourier_gls.src