Applied Health Economics, RWE & HTA
Overview / Module 4 / Day 39
Module 4 · Policy evaluation · Day 39 of 100

Placebos, Falsification and Limitations

Every design in Module 4 rests on an untestable assumption: parallel trends, no coincident shocks, no other change at age 25, a good synthetic match. Untestable does not mean unexaminable. Falsification tests look for effects where there should be none: at a date before the policy, in an outcome the policy cannot affect, at a cutoff where nothing happens. Today you run them for every Module 4 analysis, learn why a "passed" placebo can still hide the bias you fear, and write the limitations section that turns these results into an honest argument.

▶
Video for Day 39 coming soon

By the end of today you can

  • run placebos in time, on outcomes and at fake cutoffs for every design
  • express each placebo as a share of the main effect, with its interval
  • never read a non-significant placebo as proof of no bias
  • use equivalence tests with margins chosen before seeing the results
  • write limitations by threat to validity, with evidence and the direction of bias

Today's 5.5-hour plan

LessonProjectBreakCommitFrançais
0:00–0:45
39.1 Placebos in time
0:45–1:20
39.2 Placebo outcomes
1:20–1:35
Break
1:35–2:15
39.3 One table of checks
2:15–2:45
39.4 Truth check: did the checks warn us?
2:45–3:00
Break
3:00–3:20
39.5 Absence of evidence
3:20–3:50
39.6 Equivalence tests
3:50–4:50
39.7 Mini-project: the limitations section
4:50–5:00
39.8 Save your work
5:00–5:30
Bloc français

In this lesson

39.1 Placebos in time (45 min)

Pretend each policy started earlier, using only data from before the real start, and estimate its "effect". A credible design finds nothing.

"""Day 39.1: placebos in time - pretend each policy started earlier and look for an 'effect' where none can be."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
from corridor.evaluation import did_effect  # noqa: E402
from corridor.policy import its, its_average_effect, load_panel, province_series  # noqa: E402
from corridor.quasi import load_provinces, synth  # noqa: E402

w = load_provinces()
pre = w[w.index < "2024Q1"]
donors = [c for c in w.columns if c not in ("ON", "SK")]
print("synthetic control, CGM (real start 2024 Q1), pre-policy data only:")
for fake in ("2021Q1", "2022Q1"):
    r = synth(pre, "ON", fake, donors)
    print(f"  fake start {fake}: gap {r['gap'][pre.index >= fake].mean():+.3f} (real effect -0.41)")
p = load_panel()
s = province_series(p, "ON")
print("ITS, Ontario SGLT2 starts (real listing October 2025), data before the listing:")
for fake, lab in ((33, "October 2023"), (45, "October 2024")):
    fit, d = its(s[s.t < 57].reset_index(drop=True), "sglt2_rate", fake)
    est, lo, hi = its_average_effect(fit, d, 12)
    print(f"  fake listing {lab}: first-year effect {est:+.2f} ({lo:+.2f} to {hi:+.2f}) (real estimate -0.82)")
print("DiD, Ontario vs Quebec, data before the listing:")
for fake, lab in ((33, "October 2023"), (45, "October 2024")):
    est, lo, hi = did_effect(p[p.t < 57], "sglt2_rate", "ON", fake, 56)
    print(f"  fake listing {lab}: {est:+.3f} ({lo:+.3f} to {hi:+.3f}) (real estimate -0.79)")
synthetic control, CGM (real start 2024 Q1), pre-policy data only:
  fake start 2021Q1: gap +0.082 (real effect -0.41)
  fake start 2022Q1: gap +0.013 (real effect -0.41)
ITS, Ontario SGLT2 starts (real listing October 2025), data before the listing:
  fake listing October 2023: first-year effect -0.04 (-0.39 to +0.31) (real estimate -0.82)
  fake listing October 2024: first-year effect -0.31 (-0.64 to +0.02) (real estimate -0.82)
DiD, Ontario vs Quebec, data before the listing:
  fake listing October 2023: -0.252 (-0.518 to +0.014) (real estimate -0.79)
  fake listing October 2024: -0.309 (-0.708 to +0.089) (real estimate -0.79)
  • Synthetic control. The synthetic Ontario finds nothing before 2024 (+0.08 and +0.01).
  • ITS and DiD. Both find "effects" in October 2024, a year before the listing: −0.31 each, about 38–39% of their main estimates.

These are warnings. For the DiD, the provinces were converging (Day 32). For the ITS, Ontario's trend was not as straight as the model assumed.


39.2 Placebo outcomes (35 min)

A placebo outcome is one the policy cannot plausibly affect. A formulary listing cannot change who gets a UACR test.

"""Day 39.2: placebo outcomes - outcomes the policy cannot plausibly affect."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
from corridor.evaluation import did_effect, results_chain  # noqa: E402
from corridor.policy import load_panel  # noqa: E402

p = load_panel()
est, lo, hi = did_effect(p, "uacr_rate", "ON", 57, 60)
print(f"Renavex listing -> UACR testing (ON vs QC, Oct 2025-Jan 2026): {est:+.2f} ({lo:+.2f} to {hi:+.2f}) tests per 1,000 "
      "- a listing cannot change who gets tested")
print("   (but clinics opened in some regions in these months: the comparison mixes in another policy)")
q = p.assign(uacr_rate=p.uacr_rate)
q = q[(q.g > 61) | ~q.g.lt(1e9)]                             # regions with no clinic before February 2026
est, lo, hi = did_effect(q, "uacr_rate", "ON", 57, 60)
print(f"   ... restricted to regions without an open clinic: {est:+.2f} ({lo:+.2f} to {hi:+.2f})")
r = results_chain(p).set_index("outcome")
print(f"clinics -> SGLT2 starts: {r.att['sglt2_rate']:+.2f} per 1,000 (R did: +0.23, 95% CI -0.38 to +0.85) - "
      "here the 'placebo' is a real question: the logic model says it should move")
Renavex listing -> UACR testing (ON vs QC, Oct 2025-Jan 2026): +2.76 (-4.14 to +9.67) tests per 1,000 - a listing cannot change who gets tested
   (but clinics opened in some regions in these months: the comparison mixes in another policy)
   ... restricted to regions without an open clinic: -0.32 (-1.59 to +0.94)
clinics -> SGLT2 starts: +0.15 per 1,000 (R did: +0.23, 95% CI -0.38 to +0.85) - here the 'placebo' is a real question: the logic model says it should move

The listing's "effect" on UACR testing (+2.8, CI −4.1 to +9.7) looks like nothing, but the comparison is contaminated: clinics were opening in some regions during these months. Restricted to regions without an open clinic, the placebo is −0.3 (CI −1.6 to +0.9). A placebo outcome tests the design only when nothing else moves that outcome; choosing one requires the same care as choosing a control group.

The clinics' effect on SGLT2 starts looks like a placebo result (near zero) but is not one: the logic model says it should move. Do not call a disappointing result a "falsification test".


39.3 One table of checks (40 min)

Collect the main check for every design in one table, docs/falsification_checks.csv, with each placebo expressed as a share of its main estimate:

"""Day 39.3: every check in Module 4, in one table (docs/falsification_checks.csv)."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
import numpy as np  # noqa: E402
import pandas as pd  # noqa: E402

from corridor.db import ROOT  # noqa: E402
from corridor.evaluation import did_effect  # noqa: E402
from corridor.policy import aggregate, callaway_santanna, its, its_average_effect, load_panel, province_series  # noqa: E402
from corridor.quasi import load_provinces, load_young_adults, rd_local_linear, synth  # noqa: E402

p = load_panel()
rows = []
fit, d = its(province_series(p, "ON")[lambda s: s.t < 57].reset_index(drop=True), "sglt2_rate", 45)
e, lo, hi = its_average_effect(fit, d, 12)
rows.append(("ITS (Day 31)", "placebo listing Oct 2024", e, lo, hi, -0.82))
e, lo, hi = did_effect(p[p.t < 57], "sglt2_rate", "ON", 45, 56)
rows.append(("DiD (Day 32)", "placebo listing Oct 2024", e, lo, hi, -0.79))
dyn = aggregate(callaway_santanna(p, "uacr_rate"), "dynamic")
rows.append(("staggered (Day 33)", "mean pre-period ATT, e = -24..-2", dyn.loc[-24:-2].mean(), np.nan, np.nan, 12.15))
w = load_provinces()
r = synth(w[w.index < "2024Q1"], "ON", "2022Q1", [c for c in w.columns if c not in ("ON", "SK")])
rows.append(("synthetic control (Day 34)", "placebo start 2022 Q1", r["gap"][w.index[w.index < "2024Q1"] >= "2022Q1"].mean(),
             np.nan, np.nan, -0.41))
y = load_young_adults().query("province == 'ON' and age < 25").assign(x=lambda s: s.age - 24)
y = y.assign(above=(y.x >= 0).astype(int))
k = rd_local_linear(y, "insulin_fill", 1.0)
rows.append(("RD (Day 35)", "placebo cutoff at 24", k["estimate"], k["estimate"] - 1.96 * k["se"], k["estimate"] + 1.96 * k["se"], -0.128))
t = pd.DataFrame(rows, columns=["design", "check", "placebo_estimate", "ci_low", "ci_high", "main_estimate"])
t["placebo_as_share_of_main"] = (t.placebo_estimate / t.main_estimate).round(2)
t = t.round(3)
t.to_csv(os.path.join(ROOT, "docs", "falsification_checks.csv"), index=False)
print(t.to_string(index=False))
                    design                            check  placebo_estimate  ci_low  ci_high  main_estimate  placebo_as_share_of_main
              ITS (Day 31)         placebo listing Oct 2024            -0.308  -0.639    0.023         -0.820                      0.38
              DiD (Day 32)         placebo listing Oct 2024            -0.309  -0.708    0.089         -0.790                      0.39
        staggered (Day 33) mean pre-period ATT, e = -24..-2            -0.015     NaN      NaN         12.150                     -0.00
synthetic control (Day 34)            placebo start 2022 Q1             0.013     NaN      NaN         -0.410                     -0.03
               RD (Day 35)             placebo cutoff at 24             0.012  -0.001    0.025         -0.128                     -0.09

Read the last column. The synthetic control, the RD and the staggered design pass with placebos under 10% of their main effects. The ITS and the DiD have placebos about 38–39% of their main effects: something besides the policy moves those comparisons.

Check it in R (the DiD placebo with fixest):

# Day 39: the placebo DiD (fake Ontario listing in October 2024) in R with fixest.
suppressPackageStartupMessages({ library(fixest) })
p <- read.csv("data/drug_utilization_monthly.csv")
p$t <- (as.integer(substr(p$month, 1, 4)) - 2021) * 12 + as.integer(substr(p$month, 6, 7)) - 1
p$rate <- 1000 * p$sglt2_starts / p$people_with_diabetes
w <- subset(p, t < 57)
w$D <- as.integer(w$province == "ON" & w$t >= 45)
m <- feols(rate ~ D | region + t, data = w, weights = ~people_with_diabetes, cluster = ~region)
print(round(coeftable(m), 3))
print(round(confint(m), 3))
  Estimate Std. Error t value Pr(>|t|)
D   -0.309      0.202  -1.535    0.156
attr(,"vcov_type")
[1] "Clustered (region)"
   2.5 % 97.5 %
D -0.758   0.14

39.4 Truth check: did the checks warn us? (30 min)

"""Day 39 truth check: which designs were biased, and did their falsification checks say so?"""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
import pandas as pd  # noqa: E402

from corridor.db import ROOT  # noqa: E402

f = pd.read_csv(os.path.join(ROOT, "docs", "falsification_checks.csv")).set_index("design")
truth = {"ITS (Day 31)": -0.66, "DiD (Day 32)": -0.37, "staggered (Day 33)": 10.58, "synthetic control (Day 34)": -0.41,
         "RD (Day 35)": 0.22 * -0.548}            # reduced-form truth = true effect 0.22 x the first stage -0.548
print(f"{'design':<28}{'main':>8}{'truth':>8}{'bias':>8}{'placebo / main':>16}")
for d, tv in truth.items():
    m = f.main_estimate[d]
    print(f"{d:<28}{m:>+8.2f}{tv:>+8.2f}{m - tv:>+8.2f}{f.placebo_as_share_of_main[d]:>16.2f}")
print("\n(truths from Days 31-35; the RD truth is the true effect 0.22 times the first stage, -0.548)")
design                          main   truth    bias  placebo / main
ITS (Day 31)                   -0.82   -0.66   -0.16            0.38
DiD (Day 32)                   -0.79   -0.37   -0.42            0.39
staggered (Day 33)            +12.15  +10.58   +1.57           -0.00
synthetic control (Day 34)     -0.41   -0.41   +0.00           -0.03
RD (Day 35)                    -0.13   -0.12   -0.01           -0.09

(truths from Days 31-35; the RD truth is the true effect 0.22 times the first stage, -0.548)

The two designs with large placebos (ITS and DiD) were the two biased ones: their estimates were 0.16 and 0.42 too large. The synthetic control and the RD passed their checks and were right. The staggered design (Callaway–Sant'Anna) passed its pre-trend check but was 1.6 too large. Its error came from noise in a single base month (Day 33), something pre-trends cannot detect; the imputation estimator was right.

The lesson cuts both ways. Falsification checks catch real problems (the DiD's converging trends). They cannot catch everything: post-period shocks (Day 31) and estimator noise leave no trace in the pre-period. A passed check reduces, but never removes, the need to argue the assumptions.


39.5 Absence of evidence (20 min)

Bug of the day. "The placebo DiD was not statistically significant (p = 0.16), so parallel trends holds."

"""Day 39 bug of the day: 'the placebo test was not significant, so there is no bias'."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
from corridor.evaluation import did_effect  # noqa: E402
from corridor.policy import load_panel  # noqa: E402

p = load_panel()
e, lo, hi = did_effect(p[p.t < 57], "sglt2_rate", "ON", 45, 56)
print(f"placebo DiD (fake listing October 2024): {e:+.3f}, 95% CI {lo:+.3f} to {hi:+.3f}")
print(f"  p > 0.05, 'passed'. But the interval includes biases as large as {abs(lo):.2f} - "
      f"{abs(lo) / 0.79:.0%} of the main estimate (-0.79).")
print("  the true bias of the main DiD estimate was -0.42 (Day 32): inside this 'passed' interval.")
placebo DiD (fake listing October 2024): -0.309, 95% CI -0.708 to +0.089
  p > 0.05, 'passed'. But the interval includes biases as large as 0.71 - 90% of the main estimate (-0.79).
  the true bias of the main DiD estimate was -0.42 (Day 32): inside this 'passed' interval.

The placebo's interval includes biases as large as 0.71, 90% of the main estimate, and the true bias (−0.42) sits inside it. A placebo test with low power "passes" whether or not the design is biased. The question is not "is the placebo significant?" but "is the placebo small enough, compared with the effect, to matter?".


39.6 Equivalence tests (30 min)

An equivalence test (two one-sided tests, TOST) turns the question around. It asks whether the placebo effect is shown to be smaller than a margin you decide in advance. If the 90% confidence interval lies entirely inside ± margin, equivalence is shown.

def tost(estimate, lo90, hi90, margin):
    """Two one-sided tests: equivalence to zero within +/- margin is shown when the 90% CI lies inside it."""
    return bool(-margin < lo90 and hi90 < margin)

Try it (20 min). Test the two DiD placebos for equivalence at margins of 0.2, 0.4 and 0.8 starts per 1,000.

Solution
"""Day 39 try it: equivalence tests (TOST) - show that a placebo effect is smaller than a margin you care about."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
from scipy import stats  # noqa: E402

from corridor.evaluation import did_effect, tost  # noqa: E402
from corridor.policy import load_panel  # noqa: E402

p = load_panel()
for fake, lab in ((33, "October 2023"), (45, "October 2024")):
    e, lo95, hi95 = did_effect(p[p.t < 57], "sglt2_rate", "ON", fake, 56)
    se = (hi95 - lo95) / (2 * 1.96)
    lo90, hi90 = e - stats.norm.ppf(0.95) * se, e + stats.norm.ppf(0.95) * se
    for margin in (0.2, 0.4, 0.8):
        print(f"placebo {lab}: 90% CI {lo90:+.2f} to {hi90:+.2f}; equivalent to zero within +/-{margin}: "
              f"{'yes' if tost(e, lo90, hi90, margin) else 'no'}")
placebo October 2023: 90% CI -0.48 to -0.03; equivalent to zero within +/-0.2: no
placebo October 2023: 90% CI -0.48 to -0.03; equivalent to zero within +/-0.4: no
placebo October 2023: 90% CI -0.48 to -0.03; equivalent to zero within +/-0.8: yes
placebo October 2024: 90% CI -0.64 to +0.03; equivalent to zero within +/-0.2: no
placebo October 2024: 90% CI -0.64 to +0.03; equivalent to zero within +/-0.4: no
placebo October 2024: 90% CI -0.64 to +0.03; equivalent to zero within +/-0.8: yes

Neither placebo is shown to be smaller than 0.2 or 0.4; both are shown to be smaller than 0.8, which is about the size of the main estimate. So these checks rule out a bias as large as the whole effect, and nothing smaller. Choose the margin from what would change a decision, before you see the result. That turns a placebo into evidence.

Why it matters at work: reviewers of policy evaluations and RWE submissions now expect falsification tests, and increasingly expect them to be interpreted with intervals and margins, not p-values. A table of checks with "placebo as a share of the main effect" is one of the most persuasive things a methods appendix can contain.

Where you'll meet this: robustness and placebo appendices of policy evaluations; equivalence and non-inferiority logic in trials (Module 7); pre-registered analysis plans


39.7 Mini-project: the limitations section (60 min)

Write the Module 4 limitations section, docs/m4_limitations.md, organized by threat to validity (Shadish, Cook and Campbell's framework), with the evidence for each:

"""Day 39 mini-project: the limitations section of the Module 4 policy brief (docs/m4_limitations.md),
organized by threats to validity, with the evidence for each."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
import pandas as pd  # noqa: E402

from corridor.db import ROOT  # noqa: E402

f = pd.read_csv(os.path.join(ROOT, "docs", "falsification_checks.csv")).set_index("design")
rows = [
    ("History (another event at the same time)", "ITS of the listing (Day 31)",
     "No placebo can test the post-period; a coincident drop would be attributed to the listing",
     f"Placebo listing Oct 2024: {f.placebo_estimate['ITS (Day 31)']:+.2f} (pre-period only)"),
    ("Non-parallel trends", "DiD Ontario vs Quebec (Day 32)", "The provinces were converging before the listing",
     f"Placebo listing Oct 2024: {f.placebo_estimate['DiD (Day 32)']:+.2f} ({f.placebo_as_share_of_main['DiD (Day 32)']:.0%} of the main estimate)"),
    ("Heterogeneous timing effects", "Clinic rollout (Day 33)", "TWFE biased; Callaway-Sant'Anna and imputation used",
     f"Pre-period ATTs average {f.placebo_estimate['staggered (Day 33)']:+.2f}"),
    ("Donor pool / interpolation", "Synthetic control (Day 34)", "9 units: smallest possible p = 0.11; SK excluded",
     f"Placebo start 2022 Q1: {f.placebo_estimate['synthetic control (Day 34)']:+.3f}"),
    ("Discontinuities at 25 other than coverage", "RD (Day 35)", "Covariates not available to test",
     f"Placebo cutoff at 24: {f.placebo_estimate['RD (Day 35)']:+.3f}"),
    ("External validity", "All", "Invented population and policies; results transfer only through mechanisms", "-"),
]
lines = ["# Limitations and threats to validity (Module 4)", "",
         "| Threat | Analysis | Why it matters | Evidence |", "|---|---|---|---|"]
lines += [f"| {a} | {b} | {c} | {d} |" for a, b, c, d in rows]
lines += ["", "A placebo that is not statistically significant does not prove the absence of bias: each check is reported",
          "with its estimate and interval, and compared with the size of the main estimate."]
open(os.path.join(ROOT, "docs", "m4_limitations.md"), "w", encoding="utf-8").write("\n".join(lines) + "\n")
print("\n".join(lines))
# Limitations and threats to validity (Module 4)

| Threat | Analysis | Why it matters | Evidence |
|---|---|---|---|
| History (another event at the same time) | ITS of the listing (Day 31) | No placebo can test the post-period; a coincident drop would be attributed to the listing | Placebo listing Oct 2024: -0.31 (pre-period only) |
| Non-parallel trends | DiD Ontario vs Quebec (Day 32) | The provinces were converging before the listing | Placebo listing Oct 2024: -0.31 (39% of the main estimate) |
| Heterogeneous timing effects | Clinic rollout (Day 33) | TWFE biased; Callaway-Sant'Anna and imputation used | Pre-period ATTs average -0.01 |
| Donor pool / interpolation | Synthetic control (Day 34) | 9 units: smallest possible p = 0.11; SK excluded | Placebo start 2022 Q1: +0.013 |
| Discontinuities at 25 other than coverage | RD (Day 35) | Covariates not available to test | Placebo cutoff at 24: +0.012 |
| External validity | All | Invented population and policies; results transfer only through mechanisms | - |

A placebo that is not statistically significant does not prove the absence of bias: each check is reported
with its estimate and interval, and compared with the size of the main estimate.

A good limitations section is specific: it names the threat, the analysis it affects, the evidence for or against it, and the likely direction of any bias. "Results should be interpreted with caution" says none of that. Tomorrow's capstone brief uses this table.

39.8 Save your work

python -m pytest -q
git add .
git commit -m "Day 39: placebos, falsification and limitations"

Day 39 checklist

  • I run placebos in time, on outcomes and at fake cutoffs for every design
  • I express each placebo as a share of the main effect, with its interval
  • I never read a non-significant placebo as proof of no bias
  • I use equivalence tests with margins chosen before seeing the results
  • I write limitations by threat to validity, with evidence and the direction of bias