Skip to content

DPredict · Guide test 235

Chow breakpoint test

Tests regression coefficient equality across a prespecified breakpoint.

Runs in CodeSplashPython (calls R) example not runR example validated

Do it in CodeSplash

In the app, set it up in Analyze with this method:

  • Structural change in a regression — Did the relationship between the outcome and its predictors change over time — at a known date, at an unknown date, or gradually?

In Structural change in a regression, choose Test = Chow F at a known break.

Do it in CodeSplash Run this test on your own data, in Python or R.

Bench

Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.

Bench · Chow breakpoint test

40
0.30
0.000

Adds curve × (x − 5)².

0.00

Error SD grows like exp(h · (x − 5)/5).

0.00

Errors in collection order carry φ × the previous error.

0.25
0.050

Your data

Simulated with a known ρ

If H₀ were true

F = 7.32
  1. The reference: how F varies across samples when H₀ is true.
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .002).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

F=(RSSp−RSS1−RSS2)/k(RSS1+RSS2)/(n−2k)F = \dfrac{(\mathrm{RSS}_p-\mathrm{RSS}_1-\mathrm{RSS}_2)/k}{(\mathrm{RSS}_1+\mathrm{RSS}_2)/(n-2k)}

With your numbers

F=7.32,ν1=2, ν2=36F = 7.32,\quad \nu_1 = 2,\ \nu_2 = 36
RSSp\mathrm{RSS}_p
pooled fit
RSS1, RSS2\mathrm{RSS}_1,\ \mathrm{RSS}_2
separate fits before and after the break
kk
parameters per fit

The verdict

F(2, 36) = 7.32, p = .002

p ≤ α = .050: reject H₀

Needs the break date fixed in advance; searching for the best date inflates errors (use the sup-F test instead).

Statistic
7.325
p-value
0.0021
Chow breakpoint test on 40 (x, y) pairs: F(2, 36) = 7.32, p = .002. The p-value is below α = .050, so the data are hard to reconcile with H0.

Chow breakpoint test on 40 (x, y) pairs: F(2, 36) = 7.32, p = .002. The p-value is below α = .050, so the data are hard to reconcile with H₀.

Question and hypotheses

H0: regression coefficients are equal before and after a specified break.

Assumptions

Break date fixed independently of outcomes; independent normal errors with common variance for the classical exact F test; both subsamples full rank.

Formula

F=[RSSP−(RSS1+RSS2)]/p(RSS1+RSS2)/(n1+n2−2p)F=\frac{[RSS_P-(RSS_1+RSS_2)]/p}{(RSS_1+RSS_2)/(n_1+n_2-2p)}

Parameters and notation

p coefficients per segment; RSSP pooled regression, RSS1,RSS2 separate segment fits.

Structure of the method

Fit one pooled regression and two regressions separated at an independently specified breakpoint, compare residual sums of squares, and scale by the unrestricted residual variance. Equivalent coefficient-restriction formulations can test all or selected coefficients, but the displayed classical formula assumes p coefficients in each segment.

Estimated and nuisance parameters

Estimate pooled and segment-specific regression coefficients plus common residual variance. The breakpoint is a design choice, not an estimated parameter in this fixed-date test. Parameter counts must include intercepts and the actual model rank; collinear or underpopulated segments invalidate the stated degrees of freedom.

Settings and design choices

Choose breakpoint, covariates, deterministic terms, joint restriction set, and classical versus robust covariance procedure before viewing results. More regressors increase the minimum usable segment size. The supplied code fits y~x at the test stage; unused demonstration fits with z do not change the tested model.

Fitting and adaptation

Refit restricted and unrestricted models over the same retained observations. For heteroskedastic or autocorrelated errors, use a justified robust Wald/bootstrap version and report that changed reference. If the date was discovered from the data, use a full-search method instead of retaining the fixed-date F calibration.

Sensitivity and robustness

Assess leverage, residual variance changes, serial dependence, sample imbalance, and coding of interactions/intercepts. A structural coefficient difference is descriptive evidence about model stability, not proof of a policy’s causal impact. Nonrejection can result from low power when one segment is small or effects move in poorly estimated directions.

How to use and calibrate

Use Fp,n1+n2−2p; robust Wald versions address some heteroskedasticity/dependence.

Example application

Test a structural change at a prespecified policy date.

Interpretation and pitfalls

Watch out

Searching for the date converts the problem to a supF test. A detected coefficient shift is not by itself a causal policy effect.

What changed in edition 2

  • New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.

Python and R

Chow fixes a breakpoint at observation 50; supF searches the trimmed range and uses search-adjusted calibration. CUSUM/MOSUM/score fluctuation tests assess parameter constancy in observation order; MOSUM h is window fraction.

Python · invokes R

Not run — Executed end to end through Rscript · needs Python standard library + Rscript; R packages: strucchange

# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
    raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
n <- 100; x <- rnorm(n); z <- rnorm(n); y <- 1+.5*x+.3*z+rnorm(n)
d <- data.frame(y,x,z); fit <- lm(y~x+z,data=d); reduced <- lm(y~x,data=d)
print(strucchange::sctest(y~x,type="Chow",point=50,data=d))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
                        text=True, capture_output=True)
print(result.stdout)
if result.stderr:
    print(result.stderr)
result.check_returncode()
R

Validated — Executed successfully in the validation environment · needs strucchange

set.seed(2026)
n <- 100; x <- rnorm(n); z <- rnorm(n); y <- 1+.5*x+.3*z+rnorm(n)
d <- data.frame(y,x,z); fit <- lm(y~x+z,data=d); reduced <- lm(y~x,data=d)
print(strucchange::sctest(y~x,type="Chow",point=50,data=d))
Output
	Chow test

data:  y ~ x
F = 0.051582, p-value = 0.9498

Sources

Statistics guide v4 (historical):
Python: Executed end to end through Rscript · R: Executed successfully in the validation environment
Reference's record:
Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 235, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT235.