erspt

Purpose

Computes ERS point optimal unit root test.

Format

{ Pt, lrv, cvPT } = ERSpt(y, model[, bwl, varm])
Parameters:
  • y (Nx1 matrix) – Time series data to be test.
  • model (Scalar) –

    Model to be implemented.

    1 Constant.
    2 Constant and trend.
  • bwl (Scalar) – Optional, bandwidth for the spectral window. Default = round(4 * (T/100)^(2/9)).
  • varm (Scalar) –

    Optional, long-run consistent variance estimation method. Default = 1.

    1 iid.
    2 Bartlett.
    3 Quadratic Spectral (QS).
    4 SPC with Bartlett (Sul, Phillips & Choi, 2005)
    5 SPC with QS
    6 Kurozumi with Bartlett
    7 Kurozumi with QS
Returns:
  • Pt (Scalar) – Point statistic
  • lrv (Scalar) – Long-run variance estimate.
  • cvPt (Vector) – 1, 5, and 10 percent critical values for Pt.

Examples

new;
cls;
library tspdlib;

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

//  With constant
model = 1;

{ Pt, lrv, cvPt } = ERSpt(y, model);

Source

gls.src

See also

Functions adf(), kpss()