Research question

In a hypothetical relationship the slope is 0.60 for the first 60 months and 0.10 for the next 60. What do a full-sample regression, a rolling window and a break test each show? This article uses 120 simulated months to explain rolling analysis and structural change. The data are generated with seed 20261031 and are not real data.

Data

Item Value
Sample 120 months
Frequency monthly
Generating slope 0.60 in months 1–60; 0.10 in months 61–120
Full-sample regression b = 0.34 (SE 0.07), R² = 0.16, r = 0.40
First 60 months b = 0.54 (SE 0.11), R² = 0.30, r = 0.54
Last 60 months b = 0.20 (SE 0.09), R² = 0.07, r = 0.27
24-month rolling correlation 97 windows, range -0.19 to 0.71
24-month rolling slope range -0.15 to 0.83
Known-break F test F(2,116) = 2.8, p = 0.065 (not rejected at 5%)
First 60 months used to predict the last 60 out-of-sample R² = -0.13 (benchmark: training-period mean)
License simulated data, no external license

In N(mu,sigma) the second parameter is the standard deviation, not the variance (this model uses 1, 0.5 and 1 in turn). x and y are monthly teaching series in arbitrary simulated units (dimensionless); a slope reads as the change in y per one-unit change in x, and the rolling statistics are computed on 24-month windows within the 120-month sample.

Method and assumptions

Rolling analysis re-estimates parameters at each point using the most recent W observations, producing a path of coefficients or correlations; shorter windows track change but are noisier. Structural change means the parameters shift at some date. With a known break, the residual sums of squares of the pooled sample and the two subsamples can be compared in an F statistic; the unrestricted model has two intercepts and two slopes, so the numerator degrees of freedom are 2 and the denominator degrees of freedom are 120 − 4 = 116. With an unknown break, Andrews (1993) computes the statistic for every candidate date and takes the supremum, whose distribution is nonstandard. R² is not model validation: residual plots reveal drift and non-constant variance (NIST 4.4.4).

Results

The full-sample slope is 0.34, apparently a moderate positive relationship. Split by regime, the first 60 months give 0.54 and the last 60 give 0.20: the second regime is clearly weaker yet still above its designed 0.10. The known-break test gives F(2,116) = 2.8 with p = 0.065, so constant parameters are not rejected at the 5% level but are at 10%. The 24-month rolling correlation ranges from -0.19 to 0.71 and the rolling slope from -0.15 to 0.83; reporting only the 0.71 window would overstate both the strength and the stability of the relationship. Using the first-60-month model to predict the last 60 months gives an out-of-sample R² of -0.13 against the training-period mean benchmark, worse than using the mean. Every figure above comes from one run of npm run sim:rolling-structure with seed 20261031, and npm run check:sim compares the body against the script output. Re-running over the 400 seeds starting at 20261031 gives a full-sample slope averaging 0.35 (95% range 0.18-0.51), an F statistic averaging 6.71 (range 0.88-15.54) and an out-of-sample R² averaging -0.38 (range -1.19 to 0.11). This draw sits at the low end, so with 60 plus 60 months and noise comparable to the break, the test has power but an unstable one: failing to reject is not evidence that nothing changed.

Regression slopes for the full sample and both halves Three zero-based bars at eighteen pixels per 0.1 of slope: full sample 0.34 (61.2 pixels), first sixty months 0.54 (97.2), last sixty months 0.20 (36). Gold dashed lines mark the generating slopes, 0.60 in the first half and 0.10 in the second. Slope b (zero baseline, 18 px per 0.1) 0.34 0.54 0.20 true 0.60 true 0.10 full 120 months first 60 last 60
Figure 1: the generating slope jumps from 0.60 to 0.10 at month 60, while the full-sample regression reports 0.34 - a compromise that holds in neither half (zero baseline, 18 pixels per 0.1; gold dashes show the true slopes). The split estimates 0.54 and 0.20 sit closer to the truth, the known break gives F(2,116) = 2.8 (p = 0.065), which 5% does not reject, and 24-month rolling slopes range from -0.15 to 0.83. Simulated teaching numbers.

Robustness

  • Windows of 18 or 36 months make the path noisier or smoother, but the coefficient still falls after the break.
  • Robust standard errors or rank correlations leave the subsample difference in place; the exact values change.
  • Use a supremum test when the break date is unknown and an F test when it is known; if the date was chosen by data mining, the critical values need adjustment.
  • Check whether a subsample is driven by a few observations, and report every window length and break-selection rule.

Limitations

The simulated break is exogenous and abrupt; real structural change may be gradual, repeated, or coincide with a change in volatility. Rolling windows have endpoint effects, and both window length and break date affect the conclusion. A detected break does not explain its cause and should not be treated as a policy or institutional change on its own. Extrapolating to a later period goes beyond the observed range (OpenStax 12.5).

Reproduction

  1. Generate 120 months of x and the two-regime slope with the fixed seed 20261031 (npm run sim:rolling-structure).
  2. Estimate the full-sample and two subsample regressions.
  3. Compute 24-month rolling correlations and slopes.
  4. Run the known-break F test and predict the last 60 months from the first 60.
  5. Report the window length, the break-selection rule and all subsamples.
seed = 20261031
lvl[0] = 0
lvl[t] = 0.5*lvl[t-1] + N(0,1)
x[t] = lvl[t] + N(0,0.5)
b = 0.60 (t <= 60), 0.10 (t > 60)
y[t] = 0.2 + b*x[t] + N(0,1)
rolling window = 24
F test, break = 60, df = (2,116)
per month draw order: lvl innovation, then x noise, then y noise

Strength of conclusions

In the simulation the parameters really do change (designed at 0.60 and 0.10): the full-sample coefficient mixes two regimes, the rolling path is unstable and the out-of-sample forecast fails, while this draw of the F test does not reject constant parameters at 5% - a power limit, not evidence that nothing changed. These are descriptive results. Real breaks need institutional context, and a statistical break alone does not establish causation.

Related

  • Required prerequisite: Trends, Nonstationarity and Spurious Regression (RES-016), Leads, Lags and Forecasting (RES-017).
  • Related reading: Introduction to Linear Regression (RES-013), Trends, Nonstationarity and Spurious Regression (RES-016), Leads, Lags and Forecasting (RES-017).

Figures in plain language

The three figures below check the mechanism, boundary and comparison in this article; labels come from its own sections, not new data.

Rolling Analysis and Structural Change: mechanism chain Rolling Analysis and Structural Change — three-step structure: problem, mechanism, judgment. Labels come from the article's sections, not new data. Rolling Analysis and Structural Change: mechanism chain Labels come from the article's sections; all three steps matter. Problem With 0.54 estimat ed in the first… With 0.54 estimated in the first half and 0.20 in the second, a… Reproduction Reproduction: 1. Reproduction: 1. Data | Item | Value | | --- | ---: | |… | Item | Value | | --- | ---: | | Sample | 120 months | | Frequency |… Reading order: test the problem, then the mechanism, then whether the judgment overreaches. If a middle step lacks evidence, later conclusions are hypotheses, not facts. Structural illustration, not a new data chart; sample is the article's own argument.
Figure 2: Rolling Analysis and Structural Change — mechanism chain: problem, mechanism, judgment. Sample: the article's own argument; units as stated in the text.
Rolling Analysis and Structural Change: boundary Separates conditions where the claim holds from those where it fails; a local example is not universal. Rolling Analysis and Structural Change: when does it hold? Check the conditions before the conclusion If conditions, definitions or samples change, recompute the conclusion Holds The simulated break is exogenous and abrupt; real structural change may be gradual, repeated, or… Fails / rewrite In a hypothetical relationship the slope is 0.60 for the first 60 months and 0.10 for the… Boundary illustration; sample is the article's own argument; units as stated in the text.
Figure 3: Rolling Analysis and Structural Change — boundary: when the claim holds, and when it fails. Sample: the article's own argument; units as stated in the text.
Rolling Analysis and Structural Change: object, conditions and common mistakes Three rows compare the concept, its conditions and common mistakes; comparison is not equivalence and does not replace a definition. Rolling Analysis and Structural Change: object, conditions and common mistakes at a glance This article Commonly confused Object With 0.54 estimated in the first half… Adjacent concepts / common claims Conditions The simulated break is exogenous and… In a hypothetical relationship the slope is 0.60 for the first… Check Define first, then compare; never judge labels only Correlation is not causation; a local case is not universal Comparison illustration; sample is the article's own argument; units as stated in the text.
Figure 4: Rolling Analysis and Structural Change — comparison of object, conditions and common mistakes. Sample: the article's own argument; units as stated in the text.

Exercises

  1. Why is the full-sample slope of 0.34 below the first-regime 0.54?
  2. What does a wide range of rolling correlations indicate?
  3. How do known-break and unknown-break tests differ?
Suggested answers
  1. The full sample pools both regimes, so the near-zero second slope pulls the average down; the weights also depend on the variance of x in each regime.
  2. The relationship changes over time; a single full-sample correlation hides the instability, and the window choice affects what is seen.
  3. A known break allows a direct comparison of subsample residuals; an unknown break takes the maximum over candidate dates, with larger critical values and a nonstandard distribution.

Sources

  1. Andrews, Donald W. K. “Tests for Parameter Instability and Structural Change with Unknown Change Point.” Econometrica 61, no. 4 (1993): 821–856. License unknown. https://ideas.repec.org/a/ecm/emetrp/v61y1993i4p821-56.html (accessed 2026-10-30)
  2. NIST/SEMATECH. e-Handbook of Statistical Methods, “4.4.4 How can I tell if a model fits my data?” U.S. Government work (public domain). https://www.itl.nist.gov/div898/handbook/pmd/section4/pmd44.htm (accessed 2026-10-30)
  3. OpenStax. Introductory Statistics 2e, “12.5 Prediction.” CC BY-NC-SA 4.0. https://openstax.org/books/introductory-statistics-2e/pages/12-5-prediction (accessed 2026-10-30)

Worked demo

Read-through check: can you say three things?

No recitation needed. Tick each sentence below and see whether you can explain the mechanism, one worked example and one boundary in your own words.

Ticked 0 / 3

The numbers are teaching assumptions that show relationships, not forecasts or investment advice.

This article has passed the current publication gate. Factual, calculation and translation revisions update both language versions together.

Back to station