Ask Mallard

Interrupted time series and segmented regression

Estimate a prespecified change in an outcome trajectory after an intervention.

The analysis question

An interrupted time series compares the observed post-intervention trajectory with a projected continuation of the pre-intervention trajectory under explicit assumptions. Segmented regression can parameterize an immediate level change, a slope change or another prespecified impact pattern. Choose that pattern from how the intervention is expected to work before inspecting the outcome series.

Define the time variables

Let T index observations, let X be 0 before the intervention and 1 from its start T0, and define time since intervention as (T − T0) × X. It is zero at the breakpoint. In the linear identity-link model Y = β0 + β1T + β2X + β3(T − T0)X, β2 is the level change at T0 and β3 is the change in slope. At a later time, the contrast is β2 + β3(T − T0). Different coding or a nonlinear link changes coefficient interpretation; use the cited correction to the original tutorial.

What a level change and a slope change look like

An interrupted time series. Points before the intervention follow a rising trend. After it, the series jumps up and rises more steeply. A dashed line continues the earlier trend as the counterfactual, and the gaps between it and the later line are the level change and the slope change.Interrupted time series: the trend before, and what it would have doneTimeOutcomeIntervention startsCounterfactual: the pre-period trend continuedLevel changeSlope changeThe counterfactual is an assumption, not an observation. Several points before the interruption are neededto estimate the trend it extends.
Conceptual diagram. It shows the structure of the idea, not data from any study.

Choose the outcome and error model

  • Use a model appropriate to counts, rates, proportions or continuous outcomes. A count model may need a log denominator offset and an overdispersion assessment.
  • Check residual temporal dependence and seasonality. Independent-error standard errors can be misleading even when the fitted trajectory looks plausible.
  • Document observation spacing, data quality, coding changes, denominator changes and intervention rollout or lag.
  • A short or unstable baseline weakens the projected counterfactual. There is no universal number of observations that guarantees adequate power or trend estimation.

Strengthen the design

A credible unaffected comparison series, alternative intervention dates, appropriate negative controls and sensitivity to trend or lag assumptions may help investigate competing explanations. Each has assumptions of its own. A concurrent system-wide change cannot be separated by adding an intervention indicator that occurred at exactly the same time.

Example

Monthly infection counts fall after a hospital protocol. The team prespecifies the expected level or trend change, models patient-days where appropriate, checks seasonal and residual patterns, and examines concurrent surveillance changes before attributing the decline to the protocol.

Record in the workspace

Record the intervention timing and expected impact, time scale, outcome and denominator, counterfactual trend, comparison series, error structure and sensitivity analyses. The code library does not yet provide a validated general ITS implementation; obtain a method-specific implementation and review.

What to watch out for

Segmented regression does not isolate an intervention from every event occurring at the same time. Concurrent changes, seasonality, autocorrelation and changing denominators can undermine the counterfactual trend.

Code for this method
Loading…
Recent studies that used this
Searching PubMed…
Part of the learning path Evaluate a change on your own ward (step 5 of 6).
Related Learn pages
Sources & further reading
  1. Interrupted time series regression for the evaluation of public health interventions: a tutorial (opens in a new tab) · Int J Epidemiol · doi 10.1093/ije/dyw098
  2. Segmented Regression in an Interrupted Time Series Study Design (opens in a new tab) · Anesth Analg · doi 10.1213/ANE.0000000000005269
  3. Corrigendum to: Interrupted time series regression for the evaluation of public health interventions: a tutorial (opens in a new tab) · Int J Epidemiol · doi 10.1093/ije/dyaa118
Prepared with AI assistance. Methodological and source checks are documented in this release; this is educational material, not independent professional approval. Reporting guidance supports transparent reporting and does not establish validity.
Last source review: 2026-09-09
AI-generated educational content
Mallard uses reputable methodological and reporting sources, but this material may contain errors or omit important context. Verify important methodological decisions with the cited sources and, when appropriate, a qualified research methodologist or statistician.