- Introduced by
- Extensions of Shadish, Cook & Campbell (2002) ITS framework; HTE formulation developed by Lopez Bernal and colleagues
- Year
- 2000s–2010s
- Type
- Quasi-experimental segmented regression with subgroup moderation
- Family
- Quasi-experimental / causal inference
What does it do?
Heterogeneous Treatment Effect Interrupted Time Series extends the standard ITS design to detect whether an intervention's effect on a time series differs systematically across subgroups or in response to unit-level moderators.
Where ordinary ITS yields a single level-change and slope-change estimate, HTE-ITS adds interaction terms for a moderating variable, revealing who benefits more or less from the intervention and by how much.
The intuition behind the method
Imagine a public health policy — say, a new vaccination campaign — is introduced at a specific date. Standard ITS would ask whether the disease rate changed in level or trend after the policy. HTE-ITS goes further and asks: did the policy work equally well in urban and rural areas, or in high-income and low-income regions? By interacting the post-intervention indicators with a group or continuous moderator, the model estimates separate level and slope changes for each subgroup. The key insight is that the overall average effect may mask important variation: a policy could raise outcomes for one group while leaving another unchanged, or even harming a third.
History
Interrupted time series designs are described in the cited sources: Kontopantelis et al. (2015) present ITS as a regression-based quasi-experimental approach for longitudinal data, and Lopez Bernal, Cummins, and Gasparrini (2017) present a segmented-regression tutorial for ITS. The cited material does not attribute the heterogeneous-effect extension to a specific originator, so its origin is not verified on this page.
When to use it
Choose HTE-ITS when the outcome is measured repeatedly over time, the intervention occurs at a known date, and there is a prior reason to expect the effect to differ by a baseline characteristic, either binary or continuous. Each subgroup needs enough observations before and after the intervention to estimate a trend and a post-intervention change, because too few points on either side leave the interaction estimates unstable. The design suits aggregate health, education, or policy series recorded at regular intervals. Do not use it when the intervention date is uncertain, when the pre-intervention series cannot be modelled as a stable process, when subgroups are too small for separate trend estimates, or when the moderator is itself affected by the intervention. The model as written uses one shared intervention point T0 for all subgroups, so it is not suited to subgroups that start at different times.
Limitations and considerations
- Each subgroup's level and slope change is estimated from its own segments of the series; when a subgroup has few pre- or post-intervention points, the heterogeneity contrast becomes unstable.
- Reading the Z interaction terms as moderation assumes Z is not itself changed by the intervention; if the intervention shifts the moderator, the contrast mixes moderation with changes in group membership.
- Autocorrelation and over-dispersion in the time series must be modelled explicitly; uncorrected autocorrelation inflates the apparent precision of the interaction estimates.
- Seasonal patterns and time-varying confounders are not handled by the basic specification and need explicit terms, since they are among the main methodological issues for ITS analysis.
- The specification uses one sharp intervention point T0 shared by all subgroups; gradual rollout or subgroup-specific start dates require a different specification.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Estimates whether the level and slope changes after an intervention differ between subgroups or along a continuous moderator, rather than reporting only one average effect for the whole series.
- Uses each subgroup's pre-intervention series as its own comparison, so randomisation is not needed and routinely collected aggregate data can be used.
- The moderator interaction terms test directly, within one model, whether the post-intervention changes differ across groups, instead of comparing separately fitted subgroup models.
- Over-dispersed count series may need a count-model variant; Lopez Bernal et al. (2017) identify over-dispersion of time-series data as a main methodological issue to address.
- Fitted trajectories for each subgroup can be plotted against the observed series, making the size and timing of any differences visible.
Applications
- Assessing whether a public-health intervention (e.g., an anti-smoking policy) reduced disease rates more in high-deprivation than low-deprivation areas.
- Evaluating differential effects of a clinical guideline change on prescription patterns across hospital types or specialty groups.
- Examining whether a school reform improved test scores more for disadvantaged students than for their peers.
- Studying subgroup variation in traffic-safety outcomes (by road type or region) following a speed-limit change.
- Detecting heterogeneous economic impacts of a trade-policy shock across industry sectors using aggregate time-series data.
- Investigating whether environmental regulations reduced pollution differently in industrial versus residential zones.
How it works
How it works
The standard ITS model is first specified: the outcome Y at time t is regressed on a linear time trend, a step indicator D that switches from 0 to 1 at the intervention point T0, and a post-intervention slope change (t minus T0) times D. This captures the pre-intervention level and trend, plus the average level jump and slope change after the intervention.
Formula
Y_t = \beta_0 + \beta_1 t + \beta_2 D_t + \beta_3 (t - T_0)D_t + \varepsilon_t
A moderating variable Z (binary subgroup or continuous covariate) is added together with its interactions with the step indicator D and with the slope-change term (t − T0)D. As specified, the pre-intervention slope β1 is common to all subgroups: the model has no Z·t term, so subgroups share one pre-intervention trend and differ only in their post-intervention level and slope changes. The coefficient on Z·D (γ2) estimates the differential level change, and the coefficient on Z·(t − T0)D (γ3) estimates the differential trend shift. If subgroups are expected to differ in their pre-intervention trend, a Z·t term must be added, which requires enough pre-intervention points within each subgroup to estimate it.
Formula
Y_t = \beta_0 + \beta_1 t + \beta_2 D_t + \beta_3 (t-T_0)D_t + \gamma_1 Z + \gamma_2 Z\cdot D_t + \gamma_3 Z\cdot(t-T_0)D_t + \varepsilon_t
For a binary moderator, HTE = γ2 + γ3(t − T0) is the difference in the intervention effect between Z = 1 and Z = 0 at time t. It combines the differential level change (γ2) with the differential slope change accumulated since T0 (γ3(t − T0)). For a continuous moderator this expression is not a group contrast and should not be read as one. The effect at a chosen value of Z is obtained from the full model with that value substituted for Z, so the expression above should not be plotted directly against Z.
Formula
\text{HTE} = \hat{\gamma}_2 + \hat{\gamma}_3(t - T_0)Model fit is checked through autocorrelation diagnostics (Durbin-Watson or ARIMA-based residual tests), pre-intervention trend tests, and placebo checks that reassign the intervention date to rule out spurious findings. For subgroup comparisons, multiple-testing corrections (e.g., Bonferroni or FDR) should be applied when several moderators are evaluated. The heterogeneity estimate at time t is a linear combination of γ2 and γ3, so its variance is Var(γ2) + (t − T0)² Var(γ3) + 2(t − T0) Cov(γ2, γ3). These terms come from the covariance matrix of the fitted coefficients (delta method), and the autocorrelation-robust covariance matrix should be used when that correction is applied.
Common pitfalls
- Reading the γ2 and γ3 terms as causal moderation without checking that Z was fixed before the intervention.
- Ignoring autocorrelation and reporting narrow intervals for the heterogeneity expression γ2 + γ3(t − T0).
- Choosing or adjusting the intervention date after seeing the data; the impact model should be proposed before estimation, which is the step most often omitted in ITS studies.
- Testing many candidate moderators and reporting only the interactions that reach significance.
- Treating a statistically significant interaction as practically important; the size of γ2 and γ3 should be judged against the outcome scale and the substantive question.
Frequently asked questions
How is HTE-ITS different from running separate ITS models per subgroup?
Separate models give subgroup-specific estimates but do not directly test whether the effects differ. HTE-ITS places the moderator interaction terms in one model, so the difference in level and slope changes between subgroups is estimated and tested through the interaction coefficients. The single model assumes a common residual variance across groups, which separate models do not require.
How many time points do I need per subgroup?
This page does not give a sourced minimum. The number needed depends on how variable the outcome is and how much autocorrelation it has. With few points before or after the intervention in a subgroup, its baseline trend is poorly estimated and the interaction estimate can depend on a small number of observations, so a sensitivity check is advisable.
What if autocorrelation is present in the residuals?
Autocorrelation violates the independence assumption and inflates the apparent precision of all estimates, including the heterogeneity interaction. It can be addressed by fitting an ARIMA error structure, by using Newey-West standard errors, or by including lagged outcome terms in the model.
Can I include more than one moderator?
Yes, but each additional moderator multiplies the number of interaction terms and the risk of spurious findings. Pre-register the hypothesised moderators, correct for multiple comparisons, and treat exploratory moderators as hypothesis-generating rather than confirmatory.
Is the moderating variable Z allowed to change over time?
The simplest HTE-ITS formulation treats Z as fixed (a baseline characteristic measured before the intervention). Time-varying moderators are technically possible but require careful specification to avoid confounding the moderator with the intervention itself.
Related methods
Sources
Lopez Bernal, J., Cummins, S., & Gasparrini, A. (2017). Interrupted time series regression for the evaluation of public health interventions: a tutorial. International Journal of Epidemiology, 46(1), 348-355.
Open DOI referenceKontopantelis, E., Doran, T., Springate, D. A., Buchan, I., & Reeves, D. (2015). Regression based quasi-experimental approach when randomisation is not an option: interrupted time series analysis. BMJ, 350, h2750.
Open DOI reference