dfgls#

Purpose#

Test for unit root in univariate time series.

Format#

{ t_stat, z_crit } = dfgls(y[, max_lags, trend])#
Parameters:
  • y (Tx1 vector) – data.

  • max_lags (scalar) – Optional input, maximum number of lags to be tested. Default = 0.

  • trend (scalar) – Optional input, 0 = no trend, 1 = trend. Default = 0.

Returns:
  • tstat (matrix) – AR(1) t-statistic.

  • zcrit (matrix) – Elliot, Rothenberg and Stock (1996) critical values for the GLS detrended unit root test at the 1%, 2.5%, 5%, and 10% significance level.

Example#

new;
cls;
library tsmt;

// Load Enders data
yt = loadd( getGAUSSHome() $+ "pkgs/tsmt/examples/erstest.fmt";
yt = trimr(yt, 1, 0);

// Now run full test
{ adf_stat, crit_mat } = dfgls(yt[., 2], 0, 1);

print "The GAUSS DFGLS stats:";
adf_stat;

print "The ERS critical values:";
crit_mat;

The results printed are:

The GAUSS DFGLS stats:
-2.97

The ERS critical values:
-3.46 -3.18 -2.93 -2.64

Library#

tsmt

Source#

dfgls.src

See also

Functions kpss(), zandrews(), vmadfmt()