*! version 1.0.0 19jul2026

Title

regbreak methods -- Methods and formulas for regbreak

The model

Consider the linear regression with m coefficient breaks and n variance
breaks partitioning 1,...,T into segments,

y_t = z_t' d_j + x_t' + u_t, Var(u_t) = _k^2,

where z_t (q×1) carries the coefficients that change across
regimes, x_t (p×1) carries coefficients that are constant,
d_j is the coefficient vector of coefficient-regime j, and
_k^2 is the error variance of variance-regime k. The coefficient
and variance break dates need not coincide. Bai & Perron (1998) is the special
case n=0 (constant variance); the pure mean-shift model is
z_t=1, p=0.

Bai-Perron coefficient-break procedure (default)

1. Global minimization. For each m, the break dates minimize the total
sum of squared residuals. A dynamic-programming recursion evaluates the SSR of
every admissible segment once and inserts breaks optimally, so that only
O(T²) least-squares problems are solved
(rb_dating; partial-change model
rb_datingpart).

2. Sup F test of 0 vs. m breaks. With d the stacked regime
coefficients and R the (mq×(m+1)q) matrix that
differences adjacent regimes,

F(m) = [(T-(m+1)q-p)/(T m)] · d'R'[R V R']^-¹R d,

where V is the (optionally HAC) covariance of d
(rb_pftest, rb_pvdel).

3. UDmax. The double-maximum statistic
UDmax = max_m F(m) guards against a poor choice of m; its critical
values are tabulated separately (rb_cvdmax).

4. Sequential Sup F(l+1|l). Given the l global breaks, each segment is
searched for one more break and the largest resulting F is compared with the
sequential critical value (rb_spflp1). The estimated number of breaks is
the first l that is not rejected.

5. Information criteria. BIC (Yao 1988), LWZ (Liu-Wu-Zidek 1997) and the
modified KT criterion (Kurozumi-Tuvaandorj 2011) are minimized over m
(rb_ic).

6. Break-date confidence intervals. Under the shrinking-shifts asymptotics
the standardized break date has the Bai (1997) limiting distribution; its
quantiles are obtained by numerically inverting the density
(rb_funcg, rb_cvg) and mapped to date bounds (rb_interval).
Corrected coefficient standard errors come from the diagonal of V
(rb_estim).

Joint variance-and-coefficient tests (joint)

1. Labelings. With m coefficient and n variance breaks there are
K distinct dates, each tagged as a coefficient break, a variance break, or
both. Every admissible tagging is enumerated (rb_numcase,
rb_brcvcase) and the statistic maximized over them.

2. Joint dating. For a given labeling the break dates are estimated by the
Qu & Perron (2007) algorithm: an MLE dynamic program locates the K dates
(rb_dating_MLE, rb_mlef), a restriction matrix splits them into
coefficient and variance breaks (rb_segmake), feasible GLS estimates the
regime coefficients under the regime variances (rb_estimbr), and the
variance-break dates are refined by maximizing the Gaussian segment likelihood
(rb_dating_M2) until convergence (rb_estdate).

3. The five sup-LR statistics
(rb_pslr0-rb_pslr4):

Sup LR m coefficient breaks given no variance breaks

Sup LR1 n variance breaks given no coefficient breaks

Sup LR2 n variance breaks given m coefficient breaks

Sup LR3 m coefficient breaks given n variance breaks

Sup LR4 m coefficient and n variance breaks, jointly

The coefficient piece is a HAC-robust Wald form and the variance piece is scaled
by the two-sided long-run correction
(rb_correct1); LR4 combines them.

4. UDmax4 maximizes Sup LR4 over 1-M and 1-N
(rb_cvdmax4).

5. Sequential SeqLR9 / SeqLR10 test m+1 versus m coefficient
breaks given n variance breaks, and n+1 versus n variance breaks
given m coefficient breaks (rb_pslr9, rb_pslr10); the estimated
dates come from rb_jdateestim.

Error options

robust HAC covariance (quadratic-spectral kernel, Andrews (1991)
AR(1) bandwidth) versus i.i.d.

prewhite AR(1) prewhitening of z_t u_t before the kernel.

hetdat segment-specific data moment matrices in V.

hetvar segment-specific residual variances in V.

hetomega segment-specific long-run variances in the break-date CI.

hetq segment-specific data moments in the break-date CI.

vrobust robust long-run correction for the variance statistics.

typek residuals used to build the kernel: H0, H1 or hybrid.

Step-to-code map

The engine is a Mata library (lregbreak.mlib); each paper step maps to
a named function:

SSR dynamic program rb_dating, rb_parti, rb_ssr

partial-change dating rb_datingpart

variance-LR dating rb_dating_M2, rb_parti2

joint MLE dating rb_dating_MLE, rb_mlef

FGLS estimation rb_estimbr, rb_estdate

labelings rb_numcase, rb_brcvcase, rb_segmake

HAC / long-run var rb_correct1, rb_hac, rb_jhatpr1, rb_bandw

Sup F / covariance rb_pftest, rb_pvdel, rb_psigmq

sequential Sup F rb_spflp1, rb_onebp

break-date CI rb_interval, rb_cvg, rb_funcg

information criteria rb_ic

Sup LR0-4 rb_pslr0 ... rb_pslr4

SeqLR9 / SeqLR10 rb_pslr9, rb_pslr10, rb_jdateestim

critical values rb_cv1, rb_cv2, rb_cv4, rb_cvdmax, rb_cvdmax4

The Bai-Perron path is verified against the mbreaks R package and the joint
path against the Perron-Yamamoto-Zhou MATLAB programs; on the reference
data sets the statistics, break dates, coefficients and confidence intervals
agree to machine precision.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane