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 test.
  • 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.
Returns:
  • GLStau (Scalar) – Dickey Fuller GLS test statistic.
  • lags (Scalar) – Number of lags selected by chosen information criterion.
  • cv (Vector) – 1, 5, and 10 percent critical values for GLS tau statistic.

Examples

new;
cls;
library tspdlib;

// Load date file
y = loadd(__FILE_DIR $+ "ts_examples.csv", "Y");

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

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

Source

gls.src

See also

Functions adf(), lmkpss()