pd_kpss

Purpose

Computes the panel data KPSS test.

Format

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

    Model to be implemented.

    1 Constant (Hadri test).
    2 Constant and trend (Hadri test).
    3 Shift in the mean.
    4 Shift in mean and trend.
  • nbreak (Scalar) – Optional, number of breaks to consider (up to 5). Default = 5.
  • 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:
  • test_hom (Scalar) – Panel test statistic assuming homogenous variance.
  • test_het (Scalar) – Panel test statistic assuming heterogenous variance.
  • m_lee_est (Matrix) – Contains results for each individual group. First column contains KPSS test statistic, second column contains the optimal number of lags selected using the mlwz criteria.
  • brks (Scalar) – Estimated breaks. Breaks for each individual group are contained in separate rows.

Examples

new;
cls;
library tspdlib;

// Load data
data = loadd(__FILE_DIR $+ "pd_gdef.gdat");
data = setColDateFormats(data, "%Y", "Year");

// Set model to  hve break in constant and trend
model = 4;

// Compute panel data test
{ test_hom, test_het, kpsstest, m_br} = pd_kpss(data, model);

// Plot results
plotPDKPSS(data, m_br, kpsstest);

Source

pd_kpss.src

See also

Functions kpss_1break(), kpss_2breaks(), lmkpss()