pd_stationary#

Purpose#

Computes panel data stationarity tests.

Format#

{ Nkpss, W, P, Pm, Z } = pd_stationary(y[, model, test, varm, bwl, fmax, ICk])#
Parameters:
  • y (TxN matrix) – Wide format panel data.

  • model (Scalar) –

    Optional, model to be implemented.

    1

    Constant.

    2

    Constant and trend.

  • test – Optional, specifies type of panel stationarity test to run.

  • 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.

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

  • fmax (Scalar) – Optional, maximum number of single Fourier frequency (upper bound is 5). Default = 5.

  • ICk

    Optional, Information Criterion for optimal number of factors. Default = 1.

    1

    PCp criterion.

    2

    ICp criterion.

Returns:
  • Nkpss (Dataframe) – Contains the KPSS statistics for each cross-section and the corresponding p-values.

  • W (Dataframe) – Panel stationarity statistic by Hadri (2000) and the corresponding p-value.

  • P (Dataframe) – Panel stationarity statistic by Yin & Wu (2001) and the corresponding p-value.

  • Pm (Dataframe) – Panel stationarity statistic by Nazlioglu et al. (2021) and the corresponding p-value.

  • Z (Dataframe) – Panel stationarity statistic by Nazlioglu et al. (2021) and the corresponding p-value.

Examples#

Standard tests#

library tspdlib;

// Load date file
y = loadd(getGAUSSHome() $+ "pkgs/tspdlib/examples/pd_full.csv", ". + date($Date, '%b-%y')");

/*
** Classical panel stationarity test
*/
// With constant
model = 1;
{ Nkpss, W, P, Pm, Z} = pd_stationary(y, model);

// With constant and trend
model = 2;
{ Nkpss, W, P, Pm, Z} = pd_stationary(y, model);

Cross-section approach panel stationarity test#

library tspdlib;

// Load date file
y = loadd(getGAUSSHome() $+ "pkgs/tspdlib/examples/pd_full.csv", ". + date($Date, '%b-%y')");

/*
** Cross-section approach panel stationarity test
*/

// Set test
test = "ca";

// With constant
model = 1;

{ Nkpss, W, P, Pm, Z} = pd_stationary(y, model, test);

Source#

pd_pst.src

See also

Functions pd_kpss(),