*! version 1.0.0 17jul2026

help for xtcombreak methods version 1.0.0 - 17jul2026

Title

xtcombreak methods -- Equation-by-equation derivation, the
step-to-equation map, and the exact algebraic reductions used.

This page documents what the code computes and where each formula comes
from, so any step can be checked against the source papers.

1. The asymptotic regime -- do the two papers agree?

This is checked first, because it decides whether one command can host
both. The answer is yes, in their main frameworks.

Source and condition Direction

Bai Assumption 2 (eq.2): N-1/2SUM di2 -> inf N -> inf suffices; T fixed or not

Bai Thm 3.2 (eq.4 + eq.5): N*log(log T)/T -> 0 T >> N

Bai sec.4 CI (Lemma 4.1 invokes eq.5) T >> N

Bai sec.5 QML ("T is larger than N", p.84) T >> N

Bai Remark 3 (p.87): k0 free, single-obs regime N >> T (T/N -> 0)

JK Assumption 2(iii): T/N -> inf T >> N

Bai's confidence interval, his QML, and JK's test all want T large
relative to N. The only divergence is Bai's Remark 3 -- the special mode where k0
is unrestricted and a regime may hold one observation -- which sits outside his CI
framework.

Consequence for reading output: under Assumption 2 the point estimate
khat needs no T/N condition at all and stays consistent when T < N. It is the
CI that rests on eq.(5). The command says so rather than issuing a blanket
warning.

2. Bai (2010): the estimator

2.1 Least squares (his sec.3)

Ybari1 = (1/k) SUMt<=k Yit

Ybari2 = (1/(T-k)) SUMt>k Yit

SiT(k) = SUMt<=k(Yit-Ybari1)2 + SUMt>k(Yit-Ybari2)2

SSR(k) = SUMi SiT(k)

khat = argmin1<=k<=T-1 SSR(k)

Computed from cumulative sums: with
Si(j) = SUMt<=jYit and Qi(j) = SUMt<=jY2it,

SUMt<=k(Y-Ybar1)2 = Qi(k) - Si(k)2/k

so the whole profile costs O(TN) rather than O(T2N). Algebraically
identical.

Bai warns (p.80) against the tempting alternative of estimating a break
per series and averaging: it is not consistent, because series without a
break contribute arbitrary estimates that do not fluctuate around k0.
xtcombreak does not offer it.

2.2 Identification

Assumption 2: N-1/2 SUMi(mui2-mui1)2 ->
infinity. Weakened in Theorem 3.2 to eq.(4),
SUMi(mui2-mui1)2 -> infinity, at the price of eq.(5).
Neither requires every series to break.

2.3 Multiple breaks (his sec.6)

One-at-a-time (Bai 1997a): estimate a single break; split; estimate a single
break in each subsample; retain the one giving the larger SSR reduction;
repeat; relabel ascending. Implemented as: at each step, scan every candidate in
every current segment and keep the (segment, location) with the largest
reduction

Si[a,b] - Si[a,kk] - Si[kk+1,b]

summed over i. This is equivalent to minimising the total partition SSR,
since adding a break only changes the segment containing it.

3. Bai (2010): the confidence interval

3.1 The new limiting framework (his sec.4)

Because P(khat = k0) -> 1, the limit is degenerate. To get a usable
distribution Bai lets the breaks shrink: mui2-mui1 =
N-1/2Deltai, with

lim SUMi(mui2-mui1)2 = lambda (eq.8)

lim SUMi(mui2-mui1)2sigma2i = phi (eq.9)

Then (his Theorem 4.2)

khat - k0 -> argminl [ |l|*lambda + 2*sqrt(phi)*W(l) ] (eq.10)

where W is a two-sided Gaussian random walk, not a Brownian motion --
W(l) = SUMs=1..l Zs with Zs iid standard normal.

The payoff, and the reason the CI needs no simulation: the Zs are
standard normal by a central limit theorem across i, whatever the
distribution of eit. So unlike the univariate case, the limit does not
depend on the error distribution, nor on strict stationarity, nor does khat-k0
diverge.

3.2 The scale and the constants

AN = [SUMi di2]2 / [SUMi di2 sigma2i],
di = mui2-mui1

AN(khat - k0) -> argminl[|l| + 2W(l)] =: l* (eq.12)

l* is parameter-free. Bai simulated it once (100,000 reps, his Fig.3):

P(|l*| <= 7) ~ 0.90 P(|l*| <= 11) ~ 0.95 P(|l*| <= 20) ~ 0.99

CI = [khat - floor(c/AhatN), khat + ceil(c/AhatN)] (eq.13)

with c = 7, 11, 20. Bai proves AhatN = AN + op(1)
(his eq.14), so plugging in estimates is asymptotically free.

Important: eq.(13) as printed is not what Bai actually ran.

Taken literally, eq.(13) is inconsistent with the rest of his own paper.
Three checks -- two internal to the paper, one empirical:

1. It contradicts his prose. p.84: "Due to the use of 'floor' and
'ceiling' functions, the shortest confidence interval (by construction) would
contain three integers (khat-1, khat, khat+1)." But when c/A < 1,
floor(c/A) = 0 and ceil(c/A) = 1, giving {khat, khat+1} -- two
integers. Only a symmetric [khat - ceil(c/A), khat + ceil(c/A)] has minimum
length 3, exactly as he describes.

2. It contradicts the parity of his Table 1. Under the literal form,
whenever c/A is not an integer floor = ceil-1, so length = floor + ceil + 1 =
2*ceil, always EVEN. His published median lengths are 9, 5, 5, 3 (90%);
13, 7, 7, 5 (95%); 23, 13, 9, 7 (99%) -- essentially all ODD, which only
2*ceil+1 can produce.

3. Replication settles it. 300 replications of his own p.83 design
(T=100, k0=50, shift ~ U(-1,1), e ~ N(0,1)) at the 90% level:

N | cov(lit) cov(sym) | Bai | len(lit) len(sym) | Bai

5 | 0.797 0.827 | 0.829 | 8 9 | 9

10 | 0.863 0.887 | 0.900 | 4 5 | 5

15 | 0.890 0.933 | 0.937 | 4 5 | 5

20 | 0.927 0.963 | 0.949 | 2 3 | 3

The symmetric form reproduces all four of his median lengths exactly
and his coverage to within Monte Carlo error. The literal form is systematically
one integer short and under-covers throughout.

So cimethod(symmetric) is the default: it is what Bai ran and
what reproduces his published table. cimethod(literal) gives eq.(13) exactly
as printed, for anyone who wants the letter of the equation. The discrepancy is
documented here rather than silently patched.

This is not the round() variant Bai explicitly rejects on p.84 ("If we
round 7/AN to the nearest integer instead ... the shortest confidence interval
would contain a single element {khat} ... We did not consider such
intervals"), which would give minimum length 1. His minimum is 3.

Note eq.(12) is an approximation: the change-of-variable argument
behind it is exact only for continuous l and Brownian W, whereas here l is integer
and W a random walk. Bai says so, and notes it holds well because a Gaussian random
walk and a Brownian motion agree at integer times.

3.3 Heteroskedastic vs homoskedastic A_N

When sigma2i = sigma2 for all i,

[SUM d2]2 / [SUM d2sigma2] = [SUM d2]2 / (sigma2 SUM d2) = SUM d2/sigma2

which is exactly what Bai states on p.83 and used in his own Monte Carlo
with sigmahat2 = SUM SUM ehat2/(NT-2N). anmethod(het) is the
general form (default); anmethod(hom) is his Monte-Carlo form.

4. Bai (2010): variance breaks, QML and efficiency

4.1 The QML objective (his eq.16)

sigmahat2i1(k) = (1/k) SUMt<=k(Yit-Ybari1)2

sigmahat2i2(k) = (1/(T-k)) SUMt>k(Yit-Ybari2)2

UNT(k) = k SUMi log sigmahat2i1(k) + (T-k) SUMi log sigmahat2i2(k)

khat = argmink UNT(k)

Consistency (his Theorem 5.1) needs either a mean break (eq.18) or a
variance break (eq.17), where

f(x) = x - 1 - log(x), lim SUMi f(sigma2i1/sigma2i2) = infinity

f is minimised uniquely at x=1 with f(1)=0, so f(sigma2i1/sigma2i2) > 0
iff the variances differ. f is not symmetric in x vs 1/x, so the ratio order
matters; the code uses pre-break over post-break, as printed.

4.2 The master scale (his eq.19)

(tau + omega/2)2 / [tau + (2+kappa)*omega/4 + mu3*pi] * (khat-k0) -> l*

with

tau = lim SUMi(mui1-mui2)2/sigma2i

omega = lim 2 SUMi f(sigma2i1/sigma2i2)

kappa = 4th cumulant of etait

mu3 = E(eta3it)

pi = lim SUMi [(mui1-mui2)/sigmai][(sigma2i1-sigma2i2)/sigma2i]

Verified to nest both corollaries:

o omega = 0 (no variance break) gives tau2/tau = tau, i.e.
tau(khat-k0) -> l* = his Corollary 5.3.

o tau = 0 (no mean break) and pi = 0 gives
(omega/2)2/[(2+kappa)omega/4] = omega/(2+kappa) = his Corollary 5.4,
which he writes as [2/(kappa+2) SUM f](khat-k0) -> l*; with omega = 2 SUM f these
agree.

All three of tau, omega, pi are plain sums over i -- the N-1 is
absorbed by the N-1/2 scaling in Deltai and deltai. The code uses
the sample analogues directly.

4.3 The efficiency result (his p.85)

BN = SUMi di2/sigma2i (QML scale, his Corollary 5.3)

By Cauchy-Schwarz,

(SUM di2)2 = (SUM (di/sigmai)(disigmai))2
<= (SUM di2/sigma2i)(SUM di2sigma2i)

so AN <= BN, with equality iff sigma2i is constant.
A larger scale gives a narrower CI, so QML is never less efficient than LS --
even with no variance break. The mechanism: QML asymptotically minimises
SUMi sigma-2i SiT(k), a GLS criterion that down-weights
noisy series. The command reports both and their ratio; the example do-file
asserts AN <= BN as a live check.

4.4 Why there is no WLS option

Bai (p.85) shows that weighting by the regime-specific variances, even the
true ones, gives an inconsistent break estimator. Counter-example:
mui2=2mui1, sigmai2=2sigmai1. Dividing regime 2 by 2 leaves
no break in mean or variance. LS and QML both survive; WLS does not. So it is not
offered.

4.5 The Chow test (his p.84)

Chowi = (muhati2-muhati1)2 / [sigmahat2i(1/khat + 1/(T-khat))] ~ chi2(1)

Valid with ordinary chi2 critical values, series by series: as N grows,
series i contributes O(1/N) of khat, so khat is asymptotically exogenous for series
i and no correction for estimating it is needed. The argument is an N -> infinity
approximation, so the command warns when N < 15.

5. Jiang-Kurozumi (2026): the statistic

5.1 The break estimate (their eq.3)

Zi(k) = [0,...,0, xi,k+1,...,xiT]'

Yi = Xibi + Zi(k)di + ui

khat = argminm<=k<=T-m SUMi SSRi(k)

Plain pooled least squares, per series. No CCE transformation: JK's
Assumption 3(ii) has cross-sectionally independent errors and no factor structure.
They cite Baltagi-Feng-Kao (2016) for the consistency of khat, but their eq.(3) is
as printed above -- that is what is coded.

5.2 The CUSUM numerator (their eq.4-5)

uhati = Yi - Xbari(khat)bhati(khat)

USNT(k,khat) = ( (NT)-1/2 SUMi SUMt<=k uhatit )2

The sum over i is inside the square, so panels are collapsed to a single
T-vector gt = SUMi uhatit before any squaring. Coded that way.

5.3 The self-normaliser (their eq.6-10)

Refit on four regimes split at k1 < khat < k2 (their eq.8):

Yi = Xibi + X1i(k1,khat)d1i + X2i(khat,k2)d2i + X3i(k2)d3i + ui

giving residuals utilde (their eq.9), and then (their eq.10)

V = (1/T) SUMs=1..k1 ( (NT)-1/2 SUMi SUMt=1..s utilde )2 [forward]

+ (1/T) SUMs=k1+1..khat ( (NT)-1/2 SUMi SUMt=s..khat utilde )2 [BACKWARD]

+ (1/T) SUMs=khat+1..k2 ( (NT)-1/2 SUMi SUMt=khat+1..s utilde )2 [forward]

+ (1/T) SUMs=k2+1..T ( (NT)-1/2 SUMi SUMt=s..T utilde )2 [BACKWARD]

The second and fourth terms are backward partial sums. This is the
easiest thing in the whole implementation to get wrong; it is coded exactly as
printed.

SNT(khat) = sup(k,k1,k2) in Lambda(eps) USNT(k,khat) / VNT(k1,khat,k2)

6. The three exact reductions

Naively this is a triple sup with an N-panel refit inside:
O(T3*N*p3). Three exact algebraic reductions bring it to
O(T*N*p3). None is an approximation.

6.1 (EQ-A) Lambda(eps) is a product set, so the sup factorises

Lambda(eps) = {[T*eps]<=k<=[T(1-eps)]} x {[T*eps]<=k1<=khat-[T*eps]} x {khat+[T*eps]<=k2<=[T(1-eps)]}

The range of k does not depend on k1 or k2, and vice versa. The numerator
depends only on k; the denominator only on (k1,k2). Hence

sup US(k)/V(k1,k2) = [supk US(k)] / [inf(k1,k2) V(k1,k2)]

Corroborated by the paper itself: their Proposition 2 states
supk USNT -> infinity (numerator alone) and Proposition 3 states
inf(k1,k2) VNT = Op(1) (denominator alone). They would not state
the two separately unless the sup factorises.

6.2 (EQ-B) V is separable: V(k1,khat,k2) = A(k1) + B(k2)

The four blocks are [1,k1], [k1+1,khat], [khat+1,k2], [k2+1,T]. So utilde
for t <= khat depends only on k1, and for t > khat only on k2. Checking every index
range in eq.(10):

term 1: s in [1,k1], inner t in [1,s] -> all t <= k1 <= khat => k1 only

term 2: s in [k1+1,khat], inner t in [s,khat] -> t in [k1+1,khat] => k1 only

term 3: s in [khat+1,k2], inner t in [khat+1,s] -> t in [khat+1,k2] => k2 only

term 4: s in [k2+1,T], inner t in [s,T] -> t in [k2+1,T] => k2 only

Therefore inf V = mink1 A(k1) + mink2 B(k2): two O(T) scans, not
an O(T2) grid.

Cross-check: the limiting functional in their Theorem 1 has the same
shape -- its denominator is (two integrals in tau1) + (two integrals in tau2),
separable identically. The sample statistic and its limit agree structurally, which
is strong evidence the reading is right.

6.3 (EQ-C) The stacked design equals per-regime OLS

Since Xi = SUMr blockr and X1, X2, X3 are blocks 2, 3, 4,

span{Xi, X1i, X2i, X3i} = span{block1, block2, block3, block4}

Residuals are invariant to a non-singular reparameterisation, so utilde from
the stacked 4p-column fit is numerically identical to four separate per-block
OLS fits. Likewise [Xi, Zi(khat)] equals two separate fits. This is why
JK's non-cumulative parameterisation (d2i is relative to bi, not to
bi+d1i) is irrelevant here: only residuals enter eq.(10).

7. Critical values

7.1 The table

JK Table 1 is tabulated only at eps = 0.1, for tau0 in [0.20, 0.80] in
steps of 0.01, at the 10/5/1% levels. tau0hat = khat/T; nearest-tau0 lookup.

If trimming() is not 0.1, or tau0hat falls outside [0.20, 0.80], the
table does not apply and xtcombreak refuses it and requires
simulate, rather than silently reporting wrong numbers.

7.2 The typo at tau0 = 0.39

The published Table 1 prints 5.162 for the 10% level at tau0 = 0.39.
Every neighbour is about 45.2 (0.38 -> 45.423, 0.40 -> 45.413): the leading 4 was
dropped in typesetting. xtcombreak stores 45.162. This is a deliberate
correction, not a coding error, and the example do-file checks it.

7.3 Simulating Theorem 1

With simulate, the limit is simulated directly using JK's own recipe
(Brownian motions approximated on a grid). The same three reductions apply. The
integrals are evaluated in closed form from cumulative sums of W, rW and
W2, giving O(M) per replication instead of O(M2). For example

I1(tau1) = INT0tau1[W(r) - (r/tau1)W(tau1)]2dr

= SW2(tau1) - 2(W(tau1)/tau1)SrW(tau1) + (W(tau1)/tau1)2tau13/3

with SW2(x) = INT0xW2, SrW(x) = INT0xrW. The
other three integrals expand the same way.

This is the single strongest compatibility check available. Simulating
at eps=0.1 and tau0=0.50 must reproduce JK's published row 45.476 / 57.809 /
85.984. The example do-file runs exactly this at tau0 = 0.30, 0.50 and 0.70 and
prints the comparison. If the simulated numbers match the table, the coded
functional -- and hence the sample statistic that mirrors it -- is right.

8. Step-to-equation map

estimate = Bai (2010)

Step Paper

E2 SiT(k), p.80

E3 khat = argmin SSR(k), p.80

E4 UNT(k), eq.(16)

E6 two-step feasible GLS, p.85

E7 AN, p.83

E8 CI, eq.(13)

E9 BN, p.85

E10 master scale, eq.(19)

E11 per-series Chow, p.84

E12 multiple breaks, sec.6

test = Jiang-Kurozumi (2026)

Step Paper

J1 khat, eq.(3)

J3 uhat, eq.(4)

J4 USNT, eq.(5)

J5-J6 4-regime design and utilde, eq.(6)-(9)

J7 VNT, eq.(10)

J8 SNT, sec.3

J9 Lambda(eps), sec.3

J10 critical values, Table 1

J11 simulated limit, Theorem 1

9. Faithfulness notes -- open choices, stated

Where a paper does not fully pin something down, the choice is recorded
rather than hidden:

1. sigma2i in tau and pi. In the variance-break model Bai
does not separately define the single per-series scale sigmai that appears in
tau and pi; under his small-break framework sigmai1 ~ sigmai2 ~
sigmai. The code uses the regime-length-weighted average
(khat*sigmahat2i1 + (T-khat)*sigmahat2i2)/T. This is our
choice, not his.

2. pi's second factor. Bai prints
(sigma2i1-sigma2i2)/sigma2i, though
sigma2i2 would match his di = sigma2i1/sigma2i2-1
more literally. They are asymptotically equivalent under small breaks. We follow the
printed equation.

3. JK's trimming m is 2[T*eps], not [T*eps]. Their eq.(3) writes
khat = argmin over [m, T-m] without giving m a value. But Lambda(eps) needs
[T*eps] <= k1 <= khat-[T*eps], so khat >= 2[T*eps]; and khat+[T*eps] <= k2 <=
[T(1-eps)], so khat <= T-2[T*eps]. With m = [T*eps] the search can return a khat
for which Lambda(eps) is empty and the statistic does not exist -- this fired
in testing under the alternative. Setting m = 2[T*eps] forces tau0 into
[2*eps, 1-2*eps] = [0.20, 0.80] at eps = 0.1, which is exactly the range JK
tabulate and exactly what they state below their Table 1: "the possible break
fractions tau0 are from 0.2 to 0.8 when eps = 0.1". Only m = 2[T*eps] makes
eq.(3), Lambda(eps) and Table 1's range mutually consistent.

4. Ties in the argmin. Neither paper says what to do. We take the
smallest minimising k and report the count in r(nties).

5. JK cite Baltagi et al. (2016) for khat's consistency, but their own
eq.(3) is plain pooled LS with no CCE step, and their model has no factors. We
implement eq.(3) as printed.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane