pd_stationary

Purpose

Computes the panel data KPSS test.

Format

{ testd_hom, testd_het, m_lee_est, brks } = pd_stationary(y, model[, nbreak, bwl, varm, pmax, bCtl])
Parameters:
  • y (TxN matrix) – Wide format panel data.

  • model (Scalar) –

    Optional, Model to be implemented.

    1

    Constant (Default)

    2

    Constant and trend

  • test (String) –

    Optional, Test to be conducted.

    ”st”

    Stationary tests, no modifications.

    ”ca”

    Based on CA (cross-section averages approach).

    ”fourier”

    CA approach with smooth breaks (fourier approach).

    ”panic”

    Based on PANIC approach

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

  • kmax (Scalar) – Optional, maximum number of factors. Default = 5.

  • ic (Scalar) –

    Optional, information criterion for optimal number of factors. Default = 1.

    1

    Akaike.

    2

    Schwarz.

    3

    t-stat significance.

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

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

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

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

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

Examples

new;
cls;
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);

/*
** 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_stationary.src

See also

Functions pd_kpss(), pdfzk(), pdlm()