dfgls

Purpose

Computes the DF-GLS unit root test.

Format

{ GLStau, lags, cvGLS } = dfgls(y, model[, pmax, ic])
Parameters:
  • y (Nx1 matrix) – Time series data to be tested.

  • model (Scalar) –

    Model to be implemented.

    1

    Constant.

    2

    Constant and trend.

  • pmax (Scalar) – Optional, the maximum number of lags for Dy. Default = 8.

  • ic (Scalar) –

    Optional, the information criterion used for choosing lags. Default = 3.

    1

    Akaike.

    2

    Schwarz.

    3

    t-stat significance.

Returns:
  • GLStau (Scalar) – Dickey-Fuller GLS test statistic.

  • lags (Scalar) – Number of lags selected by chosen information criterion.

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

Examples

library tspdlib;

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

// With constant
model = 1;
{ GLStau, GLSp, cvGLS } = DFGLS(y, model);

Source

gls.src

See also

Functions adf(), lmkpss()