adf

Purpose

Computes the Augmented Dickey Fuller unit root test.

Format

{ tstat, lags, cv } = adf(y, model[, pmax, ic])
Parameters:
  • y (Nx1 matrix) – Time series data to be test.
  • model (Scalar) –

    Model to be implemented.

    0 No constant or trend.
    1 Constant.
    2 Constant and trend.
  • pmax (Scalar) – Optional, the maximum number of lags for \(\delta y\). Default = 8.
  • ic (Scalar) –

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

    1 Akaike.
    1 Schwarz.
    2 t-stat significance.
Returns:
  • tstat (Scalar) – Dickey Fuller test statistic.
  • lags (Scalar) – Number of lags selected by chosen information criterion.
  • cv (Vector) – 1, 5, and 10 percent critical values for ADF tau-stat.

Examples

library tspdlib;

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

// No deterministic component
model = 0;

{ ADFtau, ADFp, cvADF } = ADF(y, model);

Source

adf.src

See also

Functions adf_1br(), adf_2br()