Title

xtpanicsb methods -- Algorithm for the sharp-break PANIC MSB test

Iterated break and factor estimation

Working with the first differences Dx, the procedure iterates between break
estimation and factor extraction:

1. Breaks. For each unit the break dates are the global minimisers of
the residual sum of squares of a mean-shift model, computed by the Bai-Perron
(1998) dynamic-programming algorithm (the SSR of every admissible segment is
built recursively and the optimal m-break partition is found by recursion
over the number of breaks, subject to a minimum segment length h =
[trim x T]).

2. Factors. The break-adjusted differences are stacked and the common
factors are extracted by principal components; the number of factors is the
Bai-Ng (2002) panel-BIC minimiser. The idiosyncratic differences are the residual
after removing the common component and the break dummies.

3. The common component is removed from Dx and steps 1-2 repeat until
the idiosyncratic variance changes by less than 0.001 (at most ten iterations).

The idiosyncratic component e_t is the partial sum of the converged
idiosyncratic differences.

The MSB statistic

For each unit the modified Sargan-Bhargava statistic is

MSB = T^{-2} ( sum_t e_t^2 ) / s2,

where s2 is the Sul-Phillips-Choi prewhitened Bartlett long-run variance of
e (an AR(pbar) prewhitening of the first differences). The simplified
statistic sums the regime-specific MSB contributions defined by the estimated
breaks, which is what enters the panel pooling.

Panel pooling

Each unit's simplified statistic is mapped to a p-value pv_i through the
finite-sample response surface of Bai and Carrion-i-Silvestre (a logistic function
of the statistic and of T/(number of breaks)). The panel statistics are

Pval-chi = -2 sum_i ln(pv_i) ~ chi2(2N),

Pval-normal = ( -2 sum_i ln(pv_i) - 2N ) / sqrt(4N) ~ N(0,1).

Because the response surface is very steep, the pooled p-value is sensitive to the
last one or two significant digits of the iterated idiosyncratic component; the
per-unit MSB statistics and break dates, by contrast, reproduce the source routine
to the last reported digit.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane