Title

xtpstat methods -- Methods and formulas for xtpstat

Common factors

The differenced data (demeaned for the trend model) are decomposed into common
factors and idiosyncratic errors by principal components; the number of factors
is chosen by the Bai-Ng (2002) ICp2 criterion (see xtpanic_methods). The
idiosyncratic residuals are cumulated to recover the idiosyncratic component in
levels, Eit = sum e-hatis.

Idiosyncratic KPSS

Each unit's cumulated idiosyncratic component is regressed on the deterministic
terms; with residuals vt and partial sums St = sum v, the
KPSS statistic is

KPSS = ( sum St^2 ) / ( T^2 * lrv ),

where lrv is the long-run variance estimated by the Sul-Phillips-Choi (2003)
prewhitened Bartlett kernel: an AR order is selected by BIC, the residuals
are prewhitened, a Bartlett kernel with an Andrews-Monahan plug-in bandwidth is
applied, and the estimate is recoloured, subject to the SPC boundary rule.

Pooling

KPSS p-values pi come from the paper's response surface (a fourth-order
polynomial in 1/T for each of 221 percentiles). They are combined into

Ppc = -2 sum ln(pi) ~ chi-square(2N);

Pm = (Ppc - 2N)/sqrt(4N) ~ N(0,1);

Zpc = sum Phi^{-1}(pi) / sqrt(N) ~ N(0,1) (Choi);

W = sqrt(N)(mean(KPSS) - mu)/sqrt(v) (Hadri LM),

with (mu, v) = (1/6, 1/45) for the constant model and (1/15, 11/6300) for the
trend model. Ppc, Pm and W reject stationarity for large values; Zpc for very
negative values.

Step-to-code map

computation

factors (Bai-Ng 2002) Mata _xtpk_pca / _xtpk_fnumber2

idiosyncratic KPSS Mata _xtpk_kpss

SPC prewhitened Bartlett lrv Mata _xtpk_alrv

response-surface p-value Mata _xtpk_pval

pooled Ppc, Pm, Zpc, W Mata _xtpk_run

Each block reproduces the GAUSS routine BNG_PANICkpss; the statistics
and p-values match the GAUSS output on the OPEC CO2 data to the last digit.

Reference

Bai, J., and S. Ng. 2004. A PANIC attack on unit roots and cointegration.
Econometrica 72: 1127-1177.

Back to xtpstat | xtpdroot library