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.
1
Schwarz.
2
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¶
new;
cls;
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);
// With constant and trend
model = 2;
{ GLStau, GLSp, cvGLS } = DFGLS(y, model);