Title

xtpanicsb -- PANIC panel unit-root test with sharp structural breaks
(Bai and Carrion-i-Silvestre 2009)

Syntax

xtpanicsb varname [if] [in] [, options]

The data must be xtset as a strongly balanced panel.

model(string) break specification: constant (level breaks) or
trend (level & trend breaks, default)

breaks(#) number of structural breaks per unit (default 2)

kmax(#) maximum number of common factors (default 2)

pbar(#) lags for the prewhitened long-run variance (default 3)

trim(#) trimming fraction for the break search (default 0.15)

factors(#) fix the number of common factors instead of estimating

Description

xtpanicsb implements the PANIC panel unit-root test with sharp structural
breaks of Bai and Carrion-i-Silvestre (2009). For each unit the break dates are
estimated by the Bai-Perron (1998) dynamic-programming global minimiser, common
factors are extracted from the break-adjusted first differences by principal
components (iterated with the break estimation until the idiosyncratic variance
stabilises), and the modified Sargan-Bhargava (MSB) statistic is computed on
the cumulated idiosyncratic component. The unit p-values come from the finite-
sample response surface of Bai and Carrion-i-Silvestre and are pooled into the
Fisher-type panel statistics Pval-chi and Pval-normal (the simplified
tests that account for the estimated breaks).

Removing the common factors makes the test robust to strong cross-sectional
dependence, while the sharp breaks accommodate structural change of unknown
timing. xtpanicsb is part of the xtpdroot library. See
help xtpanicsb methods for the algorithm.

Options

model(string): trend (breaks in level and trend, the default) or
constant (level breaks only).

breaks(#): the number of breaks per unit (default 2). With
trim(0.15) the maximum is 5.

kmax(#), factors(#): the maximum number of common factors
(default 2), estimated by the Bai-Ng (2002) panel BIC; or fixed at # with
factors().

pbar(#): the autoregressive order for the Sul-Phillips-Choi
prewhitened long-run variance (default 3).

trim(#): the fraction trimmed at each end in the break search
(default 0.15), which also caps the maximum number of breaks.

Examples

PANIC test with two level-and-trend breaks:

. xtset country year

. xtpanicsb lrgdp, model(trend) breaks(2)

Level breaks only, one common factor imposed:

. xtpanicsb lrgdp, model(constant) factors(1)

Stored results

xtpanicsb is rclass and stores:

Scalars

r(Pchi), r(Pchi_p) Fisher chi-square panel statistic and p-value

r(Pnorm), r(Pnorm_p) standardized panel statistic and p-value

r(nf) number of common factors

r(N), r(T) panel and time dimensions

Matrices

r(units) per-unit id, MSB, p-value, break1, break2, lag

Interpreting the output

The null is a unit root in each panel. The per-unit MSB statistic rejects for
small values, and the panel Pval-chi and Pval-normal reject for large
values, in favour of stationarity of the idiosyncratic component once common
factors and sharp breaks are removed. The break columns report the estimated
break periods in the units of your time variable.

A note on reproducibility

The per-unit MSB statistics, estimated break dates and the number of common
factors reproduce the source GAUSS routine (Bai and Carrion-i-Silvestre) to the
last reported digit. The pooled Pval-chi / Pval-normal are computed from
the same finite-sample response surface; because that surface is extremely steep
(the p-value is a logistic function with very large coefficients applied to the
regime-partitioned statistic), it magnifies the last one or two significant digits
of the iterated idiosyncratic component, and the pooled p-value can differ slightly
across linear-algebra libraries even when every per-unit statistic matches.

References

Bai, J., and J. L. Carrion-i-Silvestre. 2009. Structural changes, common
stochastic trends, and unit roots in panel data. Review of Economic Studies
76: 471-501.

Bai, J., and P. Perron. 1998. Estimating and testing linear models with
multiple structural changes. Econometrica 66: 47-78.

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

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane

Faithful Stata port of the GAUSS routines of J. L. Carrion-i-Silvestre
(carrionlib / Panicbrk); the per-unit MSB statistics, break dates and factor count
were validated byte-for-byte against the GAUSS output on the health-expenditure
panel. Part of the xtpdroot library.