Tutorials › Causal Inference › Segmented Regression for Comparative Interrupted Series

Synthetic Control and Interrupted Series · Tutorial 674 of 972

Segmented Regression for Comparative Interrupted Series

Build and interpret a segmented regression that estimates how an intervention changes the treated series’ level and trend relative to a comparison series.

Advanced 10 min read

What You'll Learn

  • Define the treatment-group indicator, post-intervention indicator, and time variables for a comparative interrupted time series.
  • Specify a segmented regression that permits group-specific pre-intervention trends and shared and differential post-intervention changes.
  • Interpret the differential level change and differential slope change in context and units.
  • Calculate the intervention effect at a given post-intervention time from the fitted coefficients.
  • State the assumptions needed to give the regression’s differential changes a causal interpretation.

Why Use a Segmented Regression?

A comparative interrupted time series (CITS) tracks an outcome over time in a treated group and a comparison group, before and after an intervention. The regression is segmented because it allows the outcome trajectory to change at the intervention date. It is comparative because it distinguishes changes in the treated series from changes also seen in the comparison series.

A single post-intervention difference can miss an important pattern: an intervention might produce an immediate change in the outcome, alter its rate of change over time, or do both. The regression separates these possibilities. Its coefficients describe the fitted trajectories; whether those descriptions are causal depends on assumptions about what would have happened without the intervention.

Definition: A differential level change is the treated series’ immediate post-intervention change relative to the comparison series’ corresponding change. A differential slope change is the change in the treated series’ post-intervention trend relative to the comparison series’ trend change. “Differential” means that the comparison series’ change has been subtracted, not that the treated series changed in isolation.

Specify the Model

Let \(Y_{gt}\) be the outcome for group \(g\) at time \(t\), where \(g=1\) denotes the treated group and \(g=0\) denotes the comparison group. The outcome might be a rate, such as hospitalizations per 10,000 residents, or a group-level mean. Let \(G_g\) equal 1 for the treated group and 0 for the comparison group. Define \(P_t=1\) for the intervention period and later periods, and \(P_t=0\) before the intervention.

Index time in consistent units, such as months. Let \(T_0\) be the first post-intervention time point and define \(q_t=(t-T_0)P_t\). Thus, \(q_t=0\) before the intervention and also at the first post-intervention time point; it increases by one for each time unit thereafter. This coding makes the level change refer to the start of the post period and the slope change refer to the change in trend per time unit.

$$ Y_{gt} = \beta_0 + \beta_1G_g + \beta_2t + \beta_3(G_gt) + \beta_4P_t + \beta_5(G_gP_t) + \beta_6q_t + \beta_7(G_gq_t) + \varepsilon_{gt}. $$

The model includes four types of terms: a baseline level, a baseline time trend, a post-intervention level change, and a post-intervention slope change. Each post-intervention change has a common component and a treated-versus-comparison differential component. The group-by-time term allows the two groups to have different pre-intervention trends; it does not force their pre-intervention slopes to be equal.

CoefficientInterpretation in this coding
\(\beta_0\)Comparison-group fitted level at \(t=0\), before any intervention terms.
\(\beta_1\)Treated-minus-comparison fitted level difference at \(t=0\).
\(\beta_2\)Comparison-group pre-intervention slope, in outcome units per time unit.
\(\beta_3\)Treated-minus-comparison difference in pre-intervention slopes.
\(\beta_4\), \(\beta_6\)Comparison-group post-intervention level and slope changes.
\(\beta_5\), \(\beta_7\)Differential level and slope changes for the treated group.

For example, if \(Y\) is a rate per 10,000 people and \(t\) is measured in months, \(\beta_5\) is measured in rate units per 10,000 people, while \(\beta_7\) is measured in rate units per 10,000 people per month. The interpretation of a slope coefficient depends on the time unit: changing the index from months to years changes its numerical value.

Read the Fitted Trajectories

The model’s meaning is clearest when written separately for each group and period. Before the intervention, the comparison trajectory has intercept \(\beta_0\) and slope \(\beta_2\). The treated trajectory has intercept \(\beta_0+\beta_1\) and slope \(\beta_2+\beta_3\). After the intervention, the comparison trajectory gains level change \(\beta_4\) and slope change \(\beta_6\). The treated trajectory additionally gains \(\beta_5\) in level and \(\beta_7\) in slope, relative to those comparison-group changes.

$$ \begin{aligned} E(Y_{0t}\mid t<T_0) &= \beta_0+\beta_2t,\\ E(Y_{1t}\mid t<T_0) &= \beta_0+\beta_1+(\beta_2+\beta_3)t,\\ E(Y_{0t}\mid t\ge T_0) &= \beta_0+\beta_2t+\beta_4+\beta_6q_t,\\ E(Y_{1t}\mid t\ge T_0) &= \beta_0+\beta_1+(\beta_2+\beta_3)t +\beta_4+\beta_6q_t+\beta_5+\beta_7q_t. \end{aligned} $$

The differential treatment effect represented by the model at post-intervention time \(t\) is therefore

$$ \tau_t = \beta_5+\beta_7q_t. $$

At the first post-intervention time, \(q_t=0\), so the estimated differential effect is \(\beta_5\). Each time unit later, the estimated differential effect changes by \(\beta_7\). A positive \(\beta_7\) means that the treated group’s outcome becomes increasingly higher relative to its comparison-based counterfactual trajectory, or increasingly less low, per time unit. The sign alone does not determine whether the outcome is desirable.

Why the Differential Terms Have This Interpretation

The contrast can be justified directly from the model. At a post-intervention time, subtract the fitted comparison outcome from the fitted treated outcome. The common post-intervention terms \(\beta_4\) and \(\beta_6q_t\) cancel. The fitted treated-comparison gap is \(\beta_1+\beta_3t+\beta_5+\beta_7q_t\). The first two terms are the gap predicted by extending the pre-intervention group difference; the last two are the additional post-intervention difference.

$$ \begin{aligned} E(Y_{1t}-Y_{0t}\mid t\ge T_0) &= \beta_1+\beta_3t+\beta_5+\beta_7q_t,\\ \text{additional differential change at }t &= E(Y_{1t}-Y_{0t}\mid t\ge T_0)-(\beta_1+\beta_3t)\\ &= \beta_5+\beta_7q_t. \end{aligned} $$

This algebra explains the model’s contrast; it does not by itself establish that the contrast is causal. A causal interpretation requires that, without the intervention, the modeled treated-comparison gap would have continued as specified. In particular, the regression needs an appropriate time scale and trajectory form, no anticipation that changes outcomes before the intervention, and no concurrent treated-group-specific event that would create a similar level or slope change. The comparison series must not itself be affected by the intervention, and outcome measurement and group composition must be sufficiently stable for changes in the series to be interpretable.

The model also assumes that linear segments are a reasonable description of the trajectories over the study period. A fitted line is not evidence that the untreated trajectory truly would have remained linear. Design knowledge and examination of the observed series matter alongside the coefficient estimates. Ordinary least squares can estimate the specified regression, but it cannot make these causal assumptions true.

Worked Example: Interpreting Differential Level and Slope Changes

Suppose monthly hospitalization rates per 10,000 residents are analyzed for a treated region and one comparison region. Assume the fitted regression gives \(\hat{\beta}_5=-2.4\) and \(\hat{\beta}_7=-0.6\). The first post-intervention month has \(q_t=0\). Interpret the fitted differential change at the start of the post period and three months later.

At the start of the post period, the fitted differential effect is

$$ \hat{\tau}_{0}=\hat{\beta}_5+\hat{\beta}_7(0) =-2.4+(-0.6)(0)=-2.4. $$

The treated region’s hospitalization rate is estimated to be 2.4 lower per 10,000 residents than its comparison-based counterfactual at that point, after accounting for the comparison region’s post-period change and the pre-intervention group gap.

Three months later, \(q_t=3\), so

$$ \hat{\tau}_{3}=\hat{\beta}_5+\hat{\beta}_7(3) =-2.4-1.8=-4.2. $$

The estimated differential effect is then 4.2 fewer hospitalizations per 10,000 residents. The slope change is \(-0.6\) rate units per 10,000 residents per month: after the intervention, the treated rate declines by 0.6 more per month, or increases by 0.6 less per month, than the comparison rate’s change. These are causal interpretations only if the design assumptions are credible.

Work Through the Coefficient Arithmetic

The next example uses a hypothetical fitted model to show why the common post terms should not be confused with the differential treatment terms. Suppose time is measured in months relative to the intervention, with pre-intervention months \(t=-2,-1\), and the first post-intervention month \(t=0\). The fitted coefficients are \(\hat{\beta}_0=50\), \(\hat{\beta}_1=5\), \(\hat{\beta}_2=2\), \(\hat{\beta}_3=1\), \(\hat{\beta}_4=3\), \(\hat{\beta}_5=4\), \(\hat{\beta}_6=-0.5\), and \(\hat{\beta}_7=1.2\). For illustration, treat these as exact fitted values for the example.

Worked Example: Comparing Fitted Outcomes Across Groups

Calculate the fitted outcomes at month \(t=1\), then find the differential change relative to the extrapolated pre-intervention group gap. The coding gives \(P_t=1\) and \(q_t=1\) at this time.

For the comparison group,

$$ \hat{Y}_{0,1} =50+2(1)+3+(-0.5)(1)=54.5. $$

For the treated group,

$$ \hat{Y}_{1,1} =50+5+2(1)+1(1)+3+4+(-0.5)(1)+1.2(1) =65.7. $$

The fitted treated-comparison gap at month 1 is \(65.7-54.5=11.2\) outcome units. Before the intervention, the group gap at time \(t\) is \(\hat{\beta}_1+\hat{\beta}_3t\). Extending that gap to month 1 gives \(5+1(1)=6\). Thus the additional differential change is \(11.2-6=5.2\) units. Directly from the treatment terms, the same result is

$$ \hat{\beta}_5+\hat{\beta}_7q_t=4+1.2(1)=5.2. $$

The common comparison-group level change of 3 and slope change of \(-0.5\) affect the fitted outcomes, but cancel when the treated-comparison change is calculated. The treated series’ differential level change is 4 units at the first post time, and its differential slope change is 1.2 units per month.

Estimate an Effect at a Later Time

The effect at a particular post-intervention time is a linear combination of two estimated coefficients. Its point estimate is \(\hat{\beta}_5+q_t\hat{\beta}_7\). For uncertainty about that combination, the coefficient covariance matters: the standard error cannot generally be calculated by adding the two standard errors. The example below uses a hypothetical covariance matrix and an approximate normal interval to demonstrate the calculation. In an actual CITS analysis, the standard error and interval must also use an inferential method appropriate to the time-series error structure.

Worked Example: A Three-Month Differential Effect and Its Uncertainty

Suppose \(\hat{\beta}_5=4.0\) and \(\hat{\beta}_7=1.2\), with estimated variances \(0.25\) and \(0.04\), respectively, and estimated covariance \(-0.02\). Find the estimated differential effect at \(q_t=3\), its standard error, and an approximate 95% interval.

The estimated effect is

$$ \hat{\tau}_3=4.0+3(1.2)=7.6. $$

For a linear combination, the variance is

$$ \widehat{\operatorname{Var}}(\hat{\tau}_3) =\widehat{\operatorname{Var}}(\hat{\beta}_5) +3^2\widehat{\operatorname{Var}}(\hat{\beta}_7) +2(3)\widehat{\operatorname{Cov}}(\hat{\beta}_5,\hat{\beta}_7) =0.25+9(0.04)+6(-0.02)=0.49. $$

Therefore, \(SE(\hat{\tau}_3)=\sqrt{0.49}=0.70\). Using 1.96 as the approximate normal critical value gives

$$ 7.6\pm1.96(0.70)=7.6\pm1.372, \qquad (6.228,\ 8.972). $$

Under the assumptions behind this interval, it is an approximate 95% confidence interval for the differential effect at three months. If the outcome is a rate, the interval endpoints have the same rate units. It is not a statement that there is a 95% probability that the fixed effect lies in this particular interval.

Common Mistakes

  • Calling \(\beta_4\) the treatment effect. It is the comparison group’s post-intervention level change. The differential level change is \(\beta_5\).
  • Calling \(\beta_6\) the treated-group slope change. It is the comparison group’s slope change. The treated group’s change relative to the comparison is \(\beta_7\).
  • Reporting \(\beta_5\) as the effect throughout the post period. It is the effect at \(q_t=0\). At later times, use \(\beta_5+\beta_7q_t\).
  • Assuming different pre-intervention slopes invalidate the model automatically. The \(G_gt\) term allows a linear difference in pre-intervention slopes. Causal interpretation still requires a credible model for how that differential trajectory would have continued without treatment.
  • Treating the interaction as proof of causation. The regression identifies a modeled contrast. Causal interpretation also requires the design assumptions, including no relevant treated-specific concurrent shock.
Key takeaway: In the specified CITS regression, \(\beta_5\) is the differential level change at the intervention boundary and \(\beta_7\) is the differential slope change. At \(q_t\) time units into the post period, the modeled differential effect is \(\beta_5+\beta_7q_t\). Interpret that contrast causally only when the comparative trajectory assumptions are defensible.

Check Your Understanding

Use the model and time coding defined above.

  1. If \(\hat{\beta}_5=3\) and \(\hat{\beta}_7=-0.4\), what is the estimated differential effect at \(q_t=5\), and in what sense is it differential?
  2. What does \(\beta_4\) represent, and why is it not the differential treatment level change?
  3. If time is measured in weeks rather than months, how should the units of a slope-change coefficient be described?
  4. Why does allowing a nonzero \(\beta_3\) matter when the two groups had different pre-intervention slopes?
  5. Name one design assumption needed to interpret \(\beta_5+\beta_7q_t\) causally, beyond the regression’s algebra.
Clinical Biostats