Interrupted time series and difference-in-differences
A policy goes live in a particular month and the indicator moves — how much of that belongs to the policy? This page puts two answers on one dataset: ITS extends the pre-intervention trend to build a counterfactual, DiD borrows one from a control series the policy could not touch. It also covers level versus slope, what an unsubtracted seasonal cycle does to the estimate, why a pre-trend check can refute parallel trends but never establish them, and how a panel of negative controls with known null effects measures residual bias directly.
A policy went live. Now what?
Three settings in Taiwan produce this question shape more often than any other: National Health Insurance moving a drug or a test from out-of-pocket to reimbursed, a hospital rolling out an infection-control bundle, and the wholesale displacement of care-seeking during COVID. All three look the same on paper — one time point, one intervention, one monthly indicator, and then somebody asks how much it fell.
The cheapest answer is a before-after comparison: the mean before, the mean after, divided. On this dataset that is 873 against 571 casualties a month, a ratio of 0.654 (95% CI 0.642–0.665), and it looks tidy.
Its problem is not precision. It charges the whole of an already-moving trend to the policy. If the indicator was falling anyway, a before-after comparison books that fall as the policy’s achievement; if the indicator has a seasonal cycle and the intervention lands on the boundary between a high season and a low one, a before-after comparison can get the direction wrong.
The two methods on this page differ in exactly one thing: where the counterfactual comes from.
- Interrupted time series (ITS) extends the pre-intervention trend and treats it as where the indicator would have gone had the policy never arrived. The counterfactual is extrapolated.
- Difference-in-differences (DiD) finds a control series the policy cannot reach and uses its change over the same period as the counterfactual. The counterfactual is borrowed.
Neither conjures a control group from nothing. ITS bets that a trend continues; DiD bets that two series would have kept moving in parallel. This page places both bets on one dataset so you can see what the extra control series buys and what it costs.
The data on this page
datasets::Seatbelts ships with base R — data(Seatbelts) is the whole acquisition step. It holds 192 months of UK road-casualty data from 1969-01 to 1984-12, and it happens to carry both an intervention series and a natural control series:
front— front-seat casualties. The 1983 compulsory seat belt law covered front seats.rear— rear-seat casualties. Same cars, same roads, same economy, but the law did not reach the back seat.
One more thing has to be handled first. Distance driven rose from 14463 to 18890 per month across the transition, an increase of 30.6%. Leave it out of the model and more driving, therefore more collisions gets folded into the effect of the law. Every model on this page therefore carries offset(log(kms)), which turns the outcome from casualties per month into casualties per unit distance — the offset described on the Poisson regression page.
The empirical-calibration section at the end of this page uses simulated data rather than Seatbelts; that section says so again at its start.
Interrupted time series: extending the pre-intervention trend
An ITS is a regression with two extra terms. Written as a Poisson model:
- is the month index and is the pre-intervention secular trend — the term a before-after comparison lacks.
- is an indicator that switches on at the intervention, and is the level change: the step at the moment of the intervention.
- counts months elapsed since the intervention and is 0 before it, so is the slope change: how much further the indicator moves each month relative to the old trend. In the code on this page
tslis already 1 in the intervention month itself, so is the step read at while the ratio actually observed in the first post-intervention month is . Reporting as the level change is the usual convention, but the coding moves a small amount between the step and the slope, so the Methods have to say which one was used. - is a time-varying covariate; here it is petrol price.
Level and slope answer two different clinical questions. A level change asks what changed the moment this happened — regulations, reimbursement rules and other switch-like interventions usually look like this. A slope change asks what this did to the trajectory afterwards — education, training and anything that diffuses gradually usually looks like that. One intervention can produce either, or both.
figures/scripts/B6-10-its-did.RThe fitted level change is RR 0.680 (95% CI 0.654–0.707, p < 0.0001) — at the moment the law took effect, front-seat casualties fell about 32.0% relative to the counterfactual. The slope change is RR 1.0123 per month (95% CI 1.010–1.015), which is above 1: the monthly trajectory after the law tilts upward relative to the one before it.
A before-after comparison is not an interrupted time series
Put the model beside the before-after ratio from the top of this page:
| Approach | Estimate | 95% CI | What it can separate |
|---|---|---|---|
| Before-after ratio, no time term | 0.654 | 0.642–0.665 | Nothing. One number is all it has |
| ITS: trend + level + slope | 0.680 | 0.654–0.707 | Secular trend, level change and slope change, one coefficient each |
The two numbers are not far apart, which is luck rather than reassurance — the pre-intervention trend in this series happens to be shallow. The real difference is in the last column. A before-after ratio cannot tell you whether this was a step or a change of direction, and that is precisely what clinical readers want to know. A policy that knocks an indicator down one notch and then lets it climb again calls for different follow-up from a policy that bends the whole trajectory.
There is a second, invisible cost: a before-after ratio cannot be caught out by its own figure. An ITS plot carries a counterfactual line the reader can judge for plausibility. Two means offer nothing to disagree with.
Whatever you fail to subtract gets charged to the policy
This is the most practical section on the page. Same level change, adjustment terms removed one at a time:
| Model | Level RR | 95% CI | Monthly slope RR | AIC |
|---|---|---|---|---|
| Adjusted (petrol price + distance offset) | 0.680 | 0.654–0.707 | 1.0123 | 5204 |
| No petrol price (distance offset kept) | 0.665 | 0.640–0.691 | 1.0129 | 5330 |
| No distance offset (petrol price kept) | 0.682 | 0.657–0.709 | 1.0136 | 4719 |
| Neither (counts only) | 0.660 | 0.635–0.685 | 1.0144 | 4988 |
| Adjusted + calendar month | 0.739 | 0.711–0.768 | 1.0062 | 2941 |
| (Reference) before-after ratio, no time term | 0.654 | 0.642–0.665 | — | — |
The first thing worth noticing runs against intuition. Dropping petrol price and the distance offset moves the estimate only between 0.660 and 0.682, a spread of 3.4%, with heavily overlapping intervals. On this dataset, whether you adjusted for petrol price cannot change the conclusion. That point was originally planned as this page’s headline lesson and the numbers overturned it once the script actually ran.
What does change the conclusion is seasonality. Add calendar month and the level change moves from 0.680 to 0.739 (95% CI 0.711–0.768) — an interval that does not overlap the fully adjusted model’s 0.654–0.707. AIC falls at the same time from 5204 to 2941, a drop of 2263, which says the seasonal cycle was the largest piece of structure the other models were ignoring.
The reason is not mysterious. Road casualties have a strong within-year cycle — short winter days, worse weather, more casualties — and the law arrived in 1983-02, so the 23 post-intervention months do not cover the same mix of calendar months as the 169 months before them. Without a calendar-month term, that seasonal difference is charged to the law.
The placebo series: the line the law could not reach
The great weakness of an ITS is that it has no control group — its control is the same population’s own past. So anything else that changed the indicator in the same month (another policy, an oil shock, a change of coding rules) is indistinguishable from the intervention.
Seatbelts offers a clean check: run exactly the same model on rear. Rear-seat casualties share the season, the petrol price and the distance driven, but the law did not cover them. That makes rear-seat casualties a negative control outcome: if the model is right, no level change should appear here.
| Series | Model | Level RR | 95% CI | p |
|---|---|---|---|---|
| Front seats (law applies) | Fully adjusted | 0.680 | 0.654–0.707 | < 0.0001 |
| Rear seats (placebo) | Fully adjusted | 0.963 | 0.919–1.008 | 0.1072 |
| Rear seats (placebo) | Unadjusted, counts only | 0.953 | 0.910–0.998 | 0.0400 |
The fully adjusted placebo series gives a level RR of 0.963 with a 95% CI of 0.919–1.008, which crosses 1: not statistically significant. That row is the most valuable line on this page. The law really did reach only the front seats, and the reader can now see that as evidence in a table rather than take it as the author’s assertion.
The wording has to stay precise. That row says no level change was detected in these data, not rear-seat casualties did not change. The lower confidence limit reaches 0.919, so a genuine reduction of roughly 8.1% remains compatible with the data. Claiming that the rear seats were unaffected would require a pre-specified equivalence margin, not an interval that happens to cross 1.
The third row carries a bonus lesson: the same placebo series turns significant when it is left unadjusted (RR 0.953, 95% CI 0.910–0.998, p = 0.0400). A placebo test is itself sensitive to model specification. It is not free insurance — a badly specified placebo test hands out false reassurance as readily as false alarms.
The full taxonomy of negative controls — what a negative control exposure and a negative control outcome can each refute, and how to read one that is not null — is on the instrumental variables page. The last section here takes the same idea and scales it to dozens of outcomes.
Difference-in-differences: borrowing the counterfactual
With rear in hand, a placebo test is not the only thing available. Stack the two series into long format, add a group indicator, and the counterfactual switches from extrapolated to borrowed:
, the interaction, is the DiD estimate: the treated group’s change across the intervention, minus the control group’s change over the same period. Anything that hit both groups — petrol, weather, the economy, a change of coding rules — cancels in the subtraction. That cancellation is what the control series buys.
figures/scripts/B6-10-its-did.RAll three coefficients are worth unpacking, because papers routinely print only the interaction row and readers never learn what the other two were doing:
| Coefficient | RR | 95% CI | What it says |
|---|---|---|---|
| Group main effect | 2.182 | 2.162–2.202 | How many times higher front-seat casualties were before the law. DiD does not require the two groups to match here |
| Period main effect | 1.190 | 1.162–1.218 | The control series’ own change after the intervention — the borrowed counterfactual |
| Interaction (the DiD estimate) | 0.642 | 0.624–0.660 | How much further the front seats moved than the rear seats did |
The group main effect of 2.182 says front-seat casualties were already more than twice rear-seat casualties before the law. DiD does not require the two groups to be at the same level, only that their trends would have moved in parallel. That is the sharpest difference between DiD and the matching and weighting methods, and the point most often misread.
Parallel trends: the one identifying assumption DiD needs
DiD trades extrapolation for a control series, and the price is a new assumption: parallel trends — that absent the policy, the gap between the two series would have stayed put.
The assumption cannot be verified, because it describes a world that did not happen. What can be done is a pre-trend check: split the pre-intervention period into bins, estimate a treated-versus-control value in each, and see whether they all sit near 1. That is an event-study plot.
figures/scripts/B6-10-its-did.R| Year | Front vs rear RR | 95% CI | Interval |
|---|---|---|---|
| 1969 | 1.152 | 1.098–1.209 | Excludes 1 |
| 1970 | 1.174 | 1.120–1.232 | Excludes 1 |
| 1971 | 1.143 | 1.090–1.199 | Excludes 1 |
| 1972 | 1.168 | 1.114–1.225 | Excludes 1 |
| 1973 | 1.079 | 1.029–1.131 | Excludes 1 |
| 1974 | 1.057 | 1.007–1.110 | Excludes 1 |
| 1975 | 1.003 | 0.954–1.054 | Covers 1 |
| 1976 | 1.038 | 0.988–1.092 | Covers 1 |
| 1977 | 1.097 | 1.044–1.154 | Excludes 1 |
| 1978 | 1.089 | 1.036–1.144 | Excludes 1 |
| 1979 | 1.089 | 1.036–1.144 | Excludes 1 |
| 1980 | 1.056 | 1.005–1.110 | Excludes 1 |
| 1981 | 1.018 | 0.968–1.070 | Covers 1 |
| 1982 | Reference year (fixed at 1) | — | — |
The result is unambiguous, and for this page it is good news: 10 of the 13 non-baseline years have intervals that exclude 1, and the joint test that all of them are zero gives chi-squared 129.6 on 13 degrees of freedom, p < 0.0001. Across 1969 to 1972 the front-to-rear ratio ran at 1.143 to 1.174 times its baseline value; only after 1975 does it settle.
So the DiD estimate of 0.642 on this page cannot be presented as more trustworthy than the ITS estimate of 0.680. The honest formulation is that the pre-trend check refutes parallel trends over the full period and only the later stretch is defensible. A DiD here should either restrict the sample to that stretch or move to a specification that allows differential trends — and either decision belongs in the Methods.
How to compute it
All four models are base R glm() with no extra packages.
data(Seatbelts)
d <- as.data.frame(Seatbelts)
d$time <- seq_len(nrow(d))
d$mon <- (d$time - 1) %% 12 + 1
d$month <- factor(d$mon)
# Derive the intervention index from the data; never hard-code a month. The
# effective date in a policy circular and the month the database actually
# turns are routinely one or two months apart.
law_idx <- which(d$law == 1)[1]
# Months elapsed since the intervention, 0 before it. This coding makes the
# `law` coefficient the step AT the transition and `tsl` the change in slope
# after it; shifting the origin by one month moves value between the two.
d$tsl <- pmax(0, d$time - law_idx + 1)
# --- 1. ITS on the front seats --------------------------------------------
its <- glm(front ~ time + law + tsl + PetrolPrice + offset(log(kms)),
data = d, family = poisson())
exp(cbind(RR = coef(its), confint.default(its)))["law", ]
# --- 2. Seasonality: add calendar month. The term that moves the answer ----
its_season <- glm(front ~ time + law + tsl + PetrolPrice + month +
offset(log(kms)), data = d, family = poisson())
exp(coef(its_season)["law"])
# --- 3. Placebo series: the identical model on the rear seats -------------
# The law did not cover rear seats. A level change here means the model is
# picking up something other than the law.
placebo <- glm(rear ~ time + law + tsl + PetrolPrice + offset(log(kms)),
data = d, family = poisson())
exp(cbind(RR = coef(placebo), confint.default(placebo)))["law", ]
# --- 4. DiD: stack the two series into long format ------------------------
long <- rbind(
data.frame(y = d$front, grp = 1L, d[, c("time", "law", "kms", "PetrolPrice")]),
data.frame(y = d$rear, grp = 0L, d[, c("time", "law", "kms", "PetrolPrice")])
)
did <- glm(y ~ grp * law + time + PetrolPrice + offset(log(kms)),
data = long, family = poisson())
exp(cbind(RR = coef(did), confint.default(did)))["grp:law", ]
# --- 5. The pre-trend check (event study) ---------------------------------
# Pre-intervention data only, one grp x year interaction per year.
pre <- subset(long, law == 0 & time < law_idx)
pre$year <- 1969 + (pre$time - 1) %/% 12
pre$yf <- relevel(factor(pre$year), ref = "1982") # last complete pre-law year
es <- glm(y ~ grp + yf + grp:yf + PetrolPrice + offset(log(kms)),
data = pre, family = poisson())
# Joint test that every pre-intervention interaction is zero. Rejecting it
# refutes parallel trends; failing to reject does NOT establish them.
es_null <- glm(y ~ grp + yf + PetrolPrice + offset(log(kms)),
data = pre, family = poisson())
anova(es_null, es, test = "LRT")Verified with R 4.6.0 and jsonlite 2.0.0. Seatbelts ships with base R; data(Seatbelts) is the whole acquisition step.
import numpy as np
import pandas as pd
import statsmodels.api as sm
import statsmodels.formula.api as smf
d = sm.datasets.get_rdataset("Seatbelts", "datasets").data.copy()
d["time"] = np.arange(1, len(d) + 1)
d["mon"] = (d["time"] - 1) % 12 + 1
law_idx = int(d.loc[d["law"] == 1, "time"].iloc[0])
d["tsl"] = np.maximum(0, d["time"] - law_idx + 1)
# In statsmodels the offset is an argument to the fit, not part of the formula.
its = smf.glm("front ~ time + law + tsl + PetrolPrice",
data=d, family=sm.families.Poisson(),
offset=np.log(d["kms"])).fit()
print(np.exp(its.params["law"]), np.exp(its.conf_int().loc["law"]))
# Seasonality: C(mon) is patsy's factor syntax, equivalent to R's factor()
its_season = smf.glm("front ~ time + law + tsl + PetrolPrice + C(mon)",
data=d, family=sm.families.Poisson(),
offset=np.log(d["kms"])).fit()
# DiD in long format; grp * law means the same thing in patsy as in R
long = pd.concat([
d.assign(y=d["front"], grp=1),
d.assign(y=d["rear"], grp=0),
], ignore_index=True)
did = smf.glm("y ~ grp * law + time + PetrolPrice",
data=long, family=sm.families.Poisson(),
offset=np.log(long["kms"])).fit()
print(np.exp(did.params["grp:law"]))statsmodels' GLM reproduces R's glm() coefficient for coefficient under a Poisson family, and Seatbelts is reachable through statsmodels.api.datasets.get_rdataset. The differences are how the offset is passed and how interactions are written; both are marked in the code. Every number on this page comes from the R.
ITS and DiD side by side: what a control series buys
| ITS | DiD | |
|---|---|---|
| Where the counterfactual comes from | Extrapolating the pre-intervention trend | Borrowed from a control series |
| Core assumption | Absent the intervention, the pre-intervention trend would have continued | Absent the intervention, the gap between the groups would have stayed put |
| Estimate on this page | 0.680 (0.654–0.707) | 0.642 (0.624–0.660) |
| Can the assumption be pre-tested? | Not directly; placebo series and multiple intervention points give indirect evidence | An event study can, but it can only refute, never establish |
| What the check found here | No level change detected in the placebo series, consistent with a front-seat-only effect | The pre-trend check refutes parallel trends over the full period |
| How it breaks | A second intervention at the same time, a change of case definition, a trend about to turn anyway | Spillover onto the control group, the two groups facing different shocks, or units adopting the policy at different times (see the staggered-adoption warning above) |
The two estimates differ by 0.038, with the DiD estimate the further from 1 — that is, the larger reduction (0.642 against 0.680). The source of the gap is visible: the DiD period main effect of 1.190 is above 1, so the borrowed counterfactual says the indicator should have risen over that window, and the front seats therefore have to fall further relative to it.
That does not make DiD the better answer here. It means the two methods disagree about what would have happened, and on this dataset the assumption behind the DiD answer failed its pre-test. What the control series buys is cancellation of common shocks; what it costs is a requirement that the relative trajectory of the two series be stable, and here it is not.
Common practice is to report both — one as the primary analysis and the other as a sensitivity analysis — and to say explicitly that their assumptions differ, so that agreement is support and disagreement is something to explain. Reporting only one, without mentioning the other, leaves the reader unable to judge how sensitive the conclusion is to the choice of method.
Negative controls and empirical calibration
A single negative control outcome — rear, above — answers whether there is bias. A panel of them answers a harder question: how large the bias is and in which direction.
figures/scripts/B6-10-its-did.RThe cloud in the left panel is the whole argument. All 39 of those outcomes have a true RR of 1, so an unbiased analysis would scatter them either side of 1. Instead the cloud sits to the right, with a fitted null-distribution centre of RR 1.316 — off 1 by 31.6% — and a spread (tau, on the log scale) of 0.117.
One number is sharper still: 34 of the 39 negative controls have a 95% CI that excludes 1. Read conventionally, those 34 significant associations would all be believed, and every one of them has a true RR of 1. Intervals labelled 95% achieve actual coverage of 12.8%.
| Uncalibrated | Calibrated | Nominal / true | |
|---|---|---|---|
| Coverage of the negative controls’ 95% CIs | 12.8% | 94.9% | 95.0% |
| RR for the outcome of interest | 2.99 | 2.27 | 2.0 |
| 95% CI for the outcome of interest | 2.72–3.29 | 1.77–2.91 | Has to cover 2.0 |
The calibration itself is simple: on the log scale, subtract the fitted offset mu from every estimate and replace the standard error with the square root of the original variance plus tau squared. Three things then happen at once:
- Coverage among the negative controls returns from 12.8% to 94.9%, which is what the nominal level promised.
- The outcome of interest moves from 2.99 (95% CI 2.72–3.29, which misses the true value of 2.0) to 2.27 (95% CI 1.77–2.91, which covers it).
- The price is an interval 2.6 times wider. Calibration does not make you more certain. It makes your certainty honest.
Questions to ask of a policy-evaluation paper
When a title says an indicator fell by so much after a policy, four questions dispose of most of the doubt:
- Who is the control group? An ITS uses the same population’s own past; a DiD uses another group over the same period. A paper that does not say which cannot be evaluated. If it is a DiD, the reason the control group is beyond the policy’s reach has to be argued.
- Was the parallel-trends assumption checked? Is there an event-study plot, or only a sentence saying the check was not significant? The second reads low power as proof.
- Were seasonality and the secular trend subtracted? On this page, one calendar-month term moved the level change from 0.680 to 0.739, with intervals that do not overlap.
- Is there a negative control or placebo series? An outcome or a group the policy could not reach is the cheapest and most convincing check available.
Two more details that get skipped: how the intervention month was defined (the circular’s date and the database’s turning point are routinely a month or two apart), and whether autocorrelation was handled (if not, the standard errors are optimistic and the intervals too narrow).
Common misuses
| Misuse | Why it is wrong |
|---|---|
| Claiming a policy effect from a before-after comparison of means | Charges an already-moving trend entirely to the policy |
| Reporting the level change without the slope change | Readers assume the drop persisted, when it may rebound inside the observation window |
| Reporting a slope change from only a few post-intervention months | The slope is the most fragile estimate in the model and a short window cannot support it |
| Leaving seasonality unadjusted | Unless the post-intervention window is a whole number of years, the seasonal difference is charged to the policy |
| Hard-coding the intervention month from the policy circular | The database usually turns one or two months later, putting a transition month on the wrong side |
| Treating unequal group levels as a problem for DiD | DiD requires parallel trends, not equal levels |
| Reading a flat event-study plot as proof of parallel trends | The plot can refute the assumption but never establish it, and a null result may just be low power |
| Reporting DiD unchanged after the pre-trend check fails | At minimum, restrict the period or change the specification, and put that decision in the Methods |
| Using a control series the policy reaches indirectly | Spillover dilutes the true effect and biases the DiD estimate toward the null |
| Applying this 2×2 DiD when units adopt the policy at different times | Under staggered adoption a two-way fixed-effects DiD uses already-treated units as controls; when the effect changes over time this can produce negative weights and even the wrong sign |
| Not inspecting the residuals for autocorrelation | Standard errors come out optimistic and intervals narrower than they should be |
| Reading the standard errors straight off a GLM fitted to two stacked series | The two rows for the same month are not independent observations, so the intervals come out too narrow |
| Reporting only the ITS or only the DiD, without mentioning the other | Their assumptions differ, so the reader cannot judge how sensitive the conclusion is |
| Reading a non-significant placebo series as no effect at all | Not detected is not absent; claiming equivalence needs a pre-specified margin |
| Running a database study with no negative controls at all | Residual bias is the norm in these data, and without negative controls there is no way to measure it |
How this page relates to the others
- Where you meet it clinically — see database and claims-data studies. Any trend analysis across years has to check the reimbursement policy history, and a policy change is itself something the methods on this page can estimate.
- The underlying model — see Poisson regression and incidence rates. Every model here is a Poisson GLM with an offset, and each exponentiated coefficient is a rate ratio.
- Another design where people serve as their own controls — see self-controlled designs. It places the control window inside the same person’s own follow-up, which is the same family of idea as using a whole series’ past.
- The language of counterfactuals and identifying assumptions — see causal diagrams and the backdoor criterion and target trial emulation. Parallel trends is a counterfactual assumption, unverifiable in exactly the way exchangeability is.
- The full taxonomy of negative controls — see instrumental variables.
- Time-related traps — see time-varying covariates. Policy-evaluation data often carry a time-varying exposure and time-varying confounding at once.
Rerunning every number on this page
/opt/homebrew/bin/Rscript figures/scripts/B6-10-its-did.RRead the figure
The answer comes from the same statistical output that produced this page's figures, not from a number typed in beside them.
For the same step change, dropping petrol price and the distance offset moves the estimate only between 0.660 and 0.682; adding calendar month moves the step from 0.680 to 0.739. What does that say?
Show the answer and why
Correct answer: Seasonality is the largest piece of structure this analysis was ignoring: with calendar month in, the step is 0.739 and its interval does not overlap the fully adjusted model
Road casualties have a strong within-year cycle, the law arrived in February, and the months covered by the post-law window are not the same mix as the months before it - without calendar month in the model, that seasonal difference is booked to the law. So the step moves from 0.680 to 0.739 and the two intervals do not overlap. Conversely, the whole span from 0.660 to 0.682 is the entire influence of the three petrol and distance variants, with heavily overlapping intervals: in these data, whether petrol price is adjusted for cannot change the conclusion. The lesson is not that more adjustment is safer but that the right adjustment matters - which term matters is a property of the data, and almost any monthly health indicator has a seasonal cycle.
Running the identical model on rear-seat casualties, the series the law does not touch, gives a step of 0.963 with a 95% CI from 0.919 to 1.008. How should that row be written up?
Show the answer and why
Correct answer: No step change in rear seats was detected in these data, noting that the lower limit reaches 0.919, so a real reduction of about 8% remains compatible with them
This is the most valuable row on the page, but what it says is not detected rather than absent. The interval around 0.963 crosses the null and its lower limit reaches 0.919, so a real reduction of nearly a tenth is still compatible with these data; claiming rear seats were unaffected would require a pre-specified equivalence margin. The value 0.953 is the same placebo series under the unadjusted model, and its interval excludes the null - that is, it is significant. A placebo test is itself sensitive to model specification, and a badly specified one hands out false reassurance and false alarms alike; it is not evidence that the law spilled over.
In the pre-law event study of front-seat against rear-seat casualties, 10 of the 13 non-baseline years have intervals excluding the null. What does that say about the DiD estimate?
Show the answer and why
Correct answer: The pre-test refutes parallel trends over the whole period - the earliest year alone sits at 1.152 times the baseline year
An event study checks whether the relative path of the two series was stable before the intervention, and 10 of the 13 non-baseline years have intervals excluding the null, with the earliest year as high as 1.152 times the baseline; the series only flattens in the later stretch. That refutes parallel trends across the whole period, so 0.642 cannot be presented as more credible than the ITS figure of 0.680. But refuted is not the same as useless: the honest response is to restrict the sample to the later stretch where the assumption holds up, or move to a specification that allows differing trends, and to write that decision into the Methods. Conversely, the pre-law shape is not background irrelevant to DiD - the entire counterfactual is borrowed from the control series, and this figure is what says whether the loan is sound.
The ITS step is 0.680 and the DiD estimate is 0.642. Where does that gap come from?
Show the answer and why
Correct answer: From the borrowed counterfactual: the DiD period main effect is 1.190, meaning the control series says this stretch should have risen anyway, so the front seats have that much further to fall relative to it
The two methods give different answers to what would have happened anyway. ITS extrapolates the pre-law trend; DiD borrows from the control series, and the control series says the post-law stretch should have risen - the period main effect of 1.190 is above the null - so front seats must fall further relative to it, which is why 0.642 sits further from the null than 0.680. The value 2.182 is the group main effect, the fixed gap between front and rear, and that is precisely what the difference in differences cancels; it never enters the policy effect. The value 1.012 is the ITS monthly slope change, the amount by which each month moves faster after the law than before it, and the DiD model carries a time term too, so this is not a question of one modelling trend and the other not. The gap itself does not make either method better; it says their assumptions differ, and in these data the DiD assumption failed its pre-test.
Across 39 negative-control outcomes whose true value is the null, the fitted empirical null is centred at 1.316. What does that say?
Show the answer and why
Correct answer: Nominal 95% intervals actually cover only 0.128 of the negative controls, so reading the p-values as usual would believe a large batch of null results
If the analysis were unbiased, 39 estimates whose truth is the null would scatter on both sides of it; instead the whole cloud sits to one side, with a fitted centre of 1.316. That is what systematic bias looks like - and 0.117, the spread of that cloud, being smaller than the offset says the points moved together rather than scattering. The consequence is written in the coverage: nominal 95% intervals actually cover 0.128 of the negative controls, so the great majority of results whose truth is the null read as significant associations. This is the situation of a database study: an unmeasured confounder acts on the exposure and on every outcome, and the analyst never sees it.
After the offset is subtracted back out, the outcome of interest moves from 2.99 to 2.27, against a true value of 2. What does calibration buy, and what does it cost?
Show the answer and why
Correct answer: It buys honest confidence: the calibrated lower limit falls to 1.77 and the interval finally covers the truth, at the cost of an interval more than twice as wide
Calibration does two things: it subtracts the offset from every estimate on the log scale, and it replaces the standard error with the square root of the original variance plus the spread of the empirical null. The uncalibrated 2.99 with a lower limit of 2.72, sitting entirely to the right of the truth, becomes 2.27 with a lower limit of 1.77, an interval that covers the truth, while negative-control coverage returns to its nominal value. The cost is an interval 2.64 times wider - which is not diluting the signal but restoring uncertainty that had been understated. Calibration does not make you more confident; it makes your confidence honest. An interval that looks narrow while missing the truth is narrow only in appearance.
A plain before-after comparison gives 0.654 with an interval of 0.642 to 0.665; the ITS step is 0.680 with an interval of 0.654 to 0.707. The two are close, so is the before-after comparison good enough?
Show the answer and why
Correct answer: No. A before-after comparison gives one number and cannot say whether this was a step or a turn; the ITS separately estimates a monthly slope change of 1.012
The two being close is luck in these data, whose pre-law trend was relatively flat to begin with. The real difference is not the value but what each can separate: a before-after comparison is two means, and it cannot say whether the policy pushed the indicator down a notch or bent the whole trajectory, which are very different things for what happens next. Alongside the step of 0.680, the ITS separately estimates 1.012 as the monthly slope change relative to the pre-law trend - the post-law slope itself is that term combined with the time term - something the before-after comparison is structurally blind to. The value 0.009 is the before-after standard error; its smallness is neither a virtue nor something to patch afterwards, since widening an interval does not produce a slope coefficient. There is one further hidden cost: a before-after comparison cannot be caught out by its own figure, whereas an ITS plot carries a counterfactual dashed line the reader can judge for themselves.
Chapters that use this method
Sources and licences
This page is original writing