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

Staggered Adoption

Between 2023 and 2026, seven of the eleven regions opened a regional kidney care clinic that promotes guideline care, including testing urine albumin (UACR) in people with diabetes. Each region adopted at a different time, and four never did. The natural analysis, a two-way fixed effects regression with a "clinic open" indicator, is the one that econometrics spent 2018–2021 showing to be wrong when effects change over time. Today you see why, measure the bias, and use the two estimators that fixed it: Callaway–Sant'Anna's clean comparisons and the imputation estimator.

▶
Video for Day 33 coming soon

By the end of today you can

  • recognize staggered adoption and know why TWFE fails when effects change over time
  • compute TWFE's implicit weights and find negative ones
  • estimate ATT(g, t) with clean controls and aggregate it overall, by cohort and by event time
  • use the imputation estimator and explain its trade-off with Callaway–Sant'Anna
  • keep never-treated units when I have them, and plot pre-period estimates

Today's 5.5-hour plan

LessonProjectBreakCommitFrançais
0:00–0:30
33.1 The rollout
0:30–1:15
33.2 Two-way fixed effects and its weights
1:15–1:30
Break
1:30–2:20
33.3 Callaway–Sant'Anna
2:20–2:55
33.4 The imputation estimator
2:55–3:10
Break
3:10–3:40
33.5 Truth check
3:40–4:00
33.6 Dropping the never-treated
4:00–4:50
33.7 Mini-project: the event-study figure
4:50–5:00
33.8 Save your work
5:00–5:30
Bloc français

In this lesson

33.1 The rollout (30 min)

"""Day 33.1: regional kidney care clinics opened at different times - UACR testing per 1,000 by cohort."""

import os
import sys

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

matplotlib.use("Agg")
import matplotlib.pyplot as plt  # noqa: E402
import numpy as np  # noqa: E402

from corridor.db import ROOT  # noqa: E402
from corridor.policy import load_panel  # noqa: E402

p = load_panel()
r = p.groupby("region").agg(province=("province", "first"), opened=("clinic_opened", "first"), g=("g", "first"),
                            people=("people_with_diabetes", "last")).sort_values("g")
print(r.assign(opened=r.opened.dt.strftime("%Y-%m").fillna("never"), g=r.g.replace(np.inf, np.nan).astype("Int64"))
      .rename(columns={"g": "first clinic month (t)", "people": "people with diabetes, Dec 2027"}).to_string())
p["cohort"] = p.clinic_opened.dt.strftime("%Y-%m").fillna("never")
fig, ax = plt.subplots(figsize=(8.5, 4))
colors = ["#4f9cf9", "#a78bfa", "#3ecf8e", "#22b8cf", "#f5a524", "#8b8d98"]
for (c, d), col in zip(p.groupby("cohort"), colors):
    s = d.groupby("month").uacr_rate.mean()
    ax.plot(s.index, s.values, lw=1.3, color=col, label=c)
    if c != "never":
        ax.axvline(d.month[d.t == d.g].iloc[0], color=col, lw=0.8, ls="--")
ax.set_ylabel("UACR tests per 1,000 per month")
ax.legend(title="clinic opened", frameon=False, fontsize=8, ncols=3)
ax.spines[["top", "right"]].set_visible(False)
fig.tight_layout()
fig.savefig(os.path.join(ROOT, "figures", "day33_rollout.png"), dpi=150)
print("wrote figures/day33_rollout.png")
       province   opened  first clinic month (t)  people with diabetes, Dec 2027
region                                                                          
ON-TOR       ON  2023-10                      33                          170612
ON-EST       ON  2024-07                      42                          210555
QC-06        QC  2024-07                      42                          118119
ON-CEN       ON  2025-04                      51                          240152
QC-16        QC  2025-04                      51                           88342
QC-03        QC  2026-01                      60                           43946
ON-WST       ON  2026-10                      69                          143398
ON-NTH       ON    never                    <NA>                           41112
QC-07        QC    never                    <NA>                           25999
QC-13        QC    never                    <NA>                           25144
QC-OTH       QC    never                    <NA>                          189414
wrote figures/day33_rollout.png

UACR testing by clinic cohort

Five cohorts (groups defined by their first clinic month) open between October 2023 and October 2026; four regions never open one. Testing rises in every region over time, and after each opening it climbs further, gradually: a clinic takes months to build its patient lists and change practice.


33.2 Two-way fixed effects and its weights (45 min)

def twfe_weights(p, d="clinic"):
    """The weight each treated region-month gets in the two-way fixed effects estimate: the residual of the
    treatment indicator after removing region and month means, normalized over treated cells."""
    import statsmodels.formula.api as smf
    r = smf.ols(f"{d} ~ C(region) + C(t)", p).fit().resid
    w = r[p[d] == 1]
    return (w / w.sum()).reindex(p.index)
"""Day 33.2: the two-way fixed effects estimate with staggered adoption, and the weights behind it."""

import os
import sys

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

from corridor.policy import load_panel, twfe_weights  # noqa: E402

p = load_panel()
m = smf.ols("uacr_rate ~ clinic + C(region) + C(t)", p).fit(cov_type="cluster", cov_kwds={"groups": p.region.factorize()[0]})
lo, hi = m.conf_int().loc["clinic"]
print(f"TWFE: clinics added {m.params.clinic:.2f} UACR tests per 1,000 per month (95% CI {lo:.2f} to {hi:.2f})")
w = twfe_weights(p)
t = p.assign(w=w, e=p.t - p.g)[p.clinic == 1]
print(f"\n{int(t.shape[0])} treated region-months; negative weights: {int((t.w < 0).sum())}")
share = t.groupby(pd.cut(t.e, [-1, 5, 11, 23, 35, 99], labels=["0-5", "6-11", "12-23", "24-35", "36+"]), observed=False).agg(
    cells=("w", "size"), weight=("w", "sum"))
share["weight per cell (x 1,000)"] = 1000 * share.weight / share.cells
print("weight by months since the clinic opened:")
print(share.round(3).to_string())
TWFE: clinics added 8.31 UACR tests per 1,000 per month (95% CI 5.83 to 10.80)

240 treated region-months; negative weights: 0
weight by months since the clinic opened:
       cells  weight  weight per cell (x 1,000)
e                                              
0-5       42   0.281                      6.695
6-11      42   0.246                      5.848
12-23     75   0.315                      4.195
24-35     54   0.134                      2.473
36+       27   0.025                      0.925

The regression says clinics added 8.3 tests per 1,000 per month. But it is not an average of the clinic effects with sensible weights. A two-way fixed effects coefficient is a weighted average of all 2 × 2 comparisons in the data, and some of those comparisons use already-treated regions as controls. When effects grow with time since opening, an early clinic's growing effect is subtracted from a later clinic's estimate.

The weights show the result. Cells in a clinic's first six months get 6.7 thousandths each; cells three or more years after opening get 0.9. The cells where the effect is largest count least. In this panel no weight is negative, thanks to the four never-treated regions; 33.6 shows what happens without them.


33.3 Callaway–Sant'Anna (50 min)

Callaway and Sant'Anna (2021) avoid bad comparisons by construction. For each cohort g and month t, they compute a simple 2 × 2 DiD:

  • the treated side is cohort g, from the month before it was treated (g − 1) to t;
  • the control side is a group that is clean at both dates: never-treated regions, or (as an option) regions not yet treated.

That gives one ATT(g, t) per cohort and month. They are then averaged in the way the question needs: overall, by cohort, or by months since opening (an event study).

def callaway_santanna(p, y, control="never"):
    """ATT(g, t) for every cohort g (first clinic month) and month t, by 2x2 comparisons with base period g - 1
    (t >= g) or t - 1 (t < g, the pre-trend checks). control: 'never' or 'notyet' (not treated by max(t, g - 1))."""
    cohorts = sorted(c for c in p.g.unique() if np.isfinite(c))
    regions = p.groupby("region").g.first()
    rows = []
    for g in cohorts:
        treated = list(regions[regions == g].index)
        for t in sorted(p.t.unique()):
            if t == g - 1 or t == 0:
                continue
            base = g - 1 if t >= g else t - 1
            if control == "never":
                ctrl = list(regions[~np.isfinite(regions)].index)
            else:
                ctrl = list(regions[(regions > max(t, base)) & (regions != g)].index)
            if not ctrl:
                continue
            rows.append({"g": int(g), "t": int(t), "e": int(t - g), "n_regions": len(treated),
                         "att": did_2x2(p, y, treated, ctrl, base, t)})
    return pd.DataFrame(rows)

def aggregate(att, how="simple"):
    """'simple': average of post-period ATT(g, t) weighted by cohort size; 'dynamic': by event time e;
    'group': by cohort."""
    post = att[att.e >= 0]
    if how == "simple":
        return float(np.average(post.att, weights=post.n_regions))
    key = "e" if how == "dynamic" else "g"
    d = att if how == "dynamic" else post
    return d.groupby(key).apply(lambda x: np.average(x.att, weights=x.n_regions), include_groups=False)
"""Day 33.3: Callaway and Sant'Anna - clean 2x2 comparisons for every cohort and month, then averaged."""

import os
import sys

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

p = load_panel()
att = callaway_santanna(p, "uacr_rate", control="never")
print(f"{len(att)} ATT(g, t) estimates for {att.g.nunique()} cohorts; controls: the 4 never-treated regions")
print(f"\noverall ATT (post-period cells, weighted by cohort size): {aggregate(att):.2f}")
print("\nby cohort (first clinic month t):")
print(aggregate(att, "group").round(2).to_string())
dyn = aggregate(att, "dynamic")
print("\nby months since opening:")
print("  " + "   ".join(f"{e:+d}: {v:.2f}" for e, v in dyn.items() if e in (-24, -12, -6, -1, 0, 6, 12, 24, 36, 48)))
print(f"  mean of pre-period estimates (e = -24..-2): {dyn.loc[-24:-2].mean():+.2f}")
410 ATT(g, t) estimates for 5 cohorts; controls: the 4 never-treated regions

overall ATT (post-period cells, weighted by cohort size): 12.15

by cohort (first clinic month t):
g
33    13.88
42    15.82
51     9.55
60     5.68
69     7.60

by months since opening:
  -24: 0.55   -12: -0.58   -6: 0.74   +0: 3.33   +6: 6.10   +12: 11.03   +24: 15.96   +36: 20.05   +48: 17.32
  mean of pre-period estimates (e = -24..-2): -0.02

The overall effect is 12.2, larger than TWFE's 8.3. The pre-period estimates average zero (−0.02): no sign that regions opened clinics because testing was already rising. The effect grows from 3.3 at opening to 11 after a year and about 16–20 after two to three years. Early cohorts gain more (13.9 and 15.8) than late ones, partly because they have been treated longer.

Check it in R with the did package. It refuses to use only 4 never-treated regions as controls, so the R check adds the not-yet-treated:

# Day 33: Callaway and Sant'Anna with the did package. With only 4 never-treated regions, did refuses them as
# the only controls, so not-yet-treated regions are added (as in day33/exercise_not_yet_treated.py).
suppressPackageStartupMessages({ library(did) })
p <- read.csv("data/drug_utilization_monthly.csv")
r <- read.csv("data/kidney_clinic_rollout.csv")
p <- merge(p, r, by = "region")
p$t <- (as.integer(substr(p$month, 1, 4)) - 2021) * 12 + as.integer(substr(p$month, 6, 7))      # 1 = Jan 2021
p$g <- ifelse(is.na(p$clinic_opened) | p$clinic_opened == "", 0,
              (as.integer(substr(p$clinic_opened, 1, 4)) - 2021) * 12 + as.integer(substr(p$clinic_opened, 6, 7)))
p$id <- as.integer(factor(p$region))
p$rate <- 1000 * p$uacr_tests / p$people_with_diabetes
set.seed(2026)
a <- att_gt(yname = "rate", tname = "t", idname = "id", gname = "g", data = p, control_group = "notyettreated",
            base_period = "varying", bstrap = TRUE, cband = FALSE)
s <- aggte(a, type = "simple")
cat(sprintf("overall ATT %.2f (95%% CI %.2f to %.2f)\n", s$overall.att, s$overall.att - 1.96 * s$overall.se,
            s$overall.att + 1.96 * s$overall.se))
d <- aggte(a, type = "dynamic")
k <- d$egt %in% c(0, 6, 12, 24, 36)
print(round(data.frame(e = d$egt[k], att = d$att.egt[k], se = d$se.egt[k]), 2))
overall ATT 12.14 (95% CI 9.51 to 14.78)
   e   att   se
1  0  3.27 0.93
2  6  6.45 0.87
3 12 10.43 1.26
4 24 15.99 1.80
5 36 20.05 0.62

Try it (15 min). Add not-yet-treated regions as controls in Python. Does it change the estimates?

Solution
"""Day 33 try it: Callaway-Sant'Anna with not-yet-treated regions as controls as well."""

import os
import sys

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

p = load_panel()
for c in ("never", "notyet"):
    att = callaway_santanna(p, "uacr_rate", control=c)
    d = aggregate(att, "dynamic")
    print(f"{c:<8} overall {aggregate(att):.2f}   e=0 {d[0]:.2f}   e=12 {d[12]:.2f}   e=24 {d[24]:.2f}   "
          f"pre-period mean {d.loc[-24:-2].mean():+.2f}")
never    overall 12.15   e=0 3.33   e=12 11.03   e=24 15.96   pre-period mean -0.02
notyet   overall 12.14   e=0 3.27   e=12 10.43   e=24 15.99   pre-period mean +0.01

Almost nothing changes (12.15 vs 12.14), and the R did package's not-yet-treated estimate is identical: 12.14 (95% CI 9.51 to 14.78). Not-yet-treated controls add data at the cost of assuming no anticipation (regions do not change before their clinic opens). The flat pre-period estimates support that assumption.


33.4 The imputation estimator (35 min)

Borusyak, Jaravel and Spiess (2024) start from the other end. Fit region and month effects on the untreated cells only, never-treated regions plus treated regions before they open, then predict each treated cell's outcome without the clinic and subtract. Every pre-period month helps estimate each region's level, not just the month before treatment, so the estimator is more precise when parallel trends holds.

"""Day 33.4: the imputation estimator - learn region and month effects from untreated cells, predict the rest."""

import os
import sys

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

p = load_panel()
att, cells = imputation_att(p, "uacr_rate")
print(f"overall ATT: {att:.2f} UACR tests per 1,000 per month ({len(cells)} treated region-months)")
dyn = cells.groupby("e").effect.mean()
print("by months since opening: " + "   ".join(f"{e:+.0f}: {dyn[e]:.2f}" for e in (0, 6, 12, 24, 36, 48)))
print("by cohort: " + "   ".join(f"t={g:.0f}: {v:.2f}" for g, v in cells.groupby("g").effect.mean().items()))
overall ATT: 10.67 UACR tests per 1,000 per month (240 treated region-months)
by months since opening: +0: 1.54   +6: 4.72   +12: 8.82   +24: 14.53   +36: 17.97   +48: 17.98
by cohort: t=33: 14.61   t=42: 12.39   t=51: 8.75   t=60: 6.14   t=69: 3.30

The overall effect is 10.7, between TWFE and Callaway–Sant'Anna. The dynamic pattern is the same: about 1.5 at opening, about 9 after a year, about 18 after three years.


33.5 Truth check (30 min)

"""Day 33 truth check: TWFE, Callaway-Sant'Anna and imputation against the generator's clinic effects."""

import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
import statsmodels.formula.api as smf  # noqa: E402

from corridor.policy import aggregate, callaway_santanna, imputation_att, load_panel, truth_panel  # noqa: E402

p = load_panel()
tr = truth_panel().merge(p[["region", "month", "t", "g"]], on=["region", "month"])
tr = tr[tr.t >= tr.g].assign(e=lambda x: x.t - x.g, effect=lambda x: x.uacr_rate - x.uacr_rate_no_clinic)
twfe = smf.ols("uacr_rate ~ clinic + C(region) + C(t)", p).fit().params.clinic
cs = callaway_santanna(p, "uacr_rate")
imp, cells = imputation_att(p, "uacr_rate")
print(f"{'overall ATT':<34}{'estimate':>9}{'truth':>8}")
print(f"{'TWFE':<34}{twfe:>9.2f}{tr.effect.mean():>8.2f}")
print(f"{'Callaway-Sant Anna (never-treated)':<34}{aggregate(cs):>9.2f}{tr.effect.mean():>8.2f}")
print(f"{'imputation':<34}{imp:>9.2f}{tr[tr.t.isin(cells.t)].effect.mean():>8.2f}")
dyn, truth_e = aggregate(cs, "dynamic"), tr.groupby("e").effect.mean()
idyn = cells.groupby("e").effect.mean()
print(f"\n{'months since opening':<22}{'CS':>7}{'imputation':>12}{'truth':>8}")
for e in (0, 6, 12, 24, 36):
    print(f"{e:<22}{dyn[e]:>7.2f}{idyn[e]:>12.2f}{truth_e[e]:>8.2f}")
print("\ntrue effect by cohort: " + "   ".join(f"t={g:.0f}: {v:.2f}" for g, v in tr.groupby("g").effect.mean().items()))
overall ATT                        estimate   truth
TWFE                                   8.31   10.58
Callaway-Sant Anna (never-treated)    12.15   10.58
imputation                            10.67   10.58

months since opening       CS  imputation   truth
0                        3.33        1.54    1.98
6                        6.10        4.72    4.90
12                      11.03        8.82    7.93
24                      15.96       14.53   15.21
36                      20.05       17.97   16.34

true effect by cohort: t=33: 14.68   t=42: 11.90   t=51: 9.05   t=60: 6.02   t=69: 3.21

The truth is 10.6. TWFE (8.3) underestimates it by 21%, for the reason 33.2 explained. Callaway–Sant'Anna (12.2) is unbiased by design, but it leans on one base month per cohort, and with single-region cohorts that month's noise carries into every estimate: it is 15% too high here, and its R interval (9.5 to 14.8) covers the truth. The imputation estimator (10.7) uses all the pre-period and lands almost exactly on it, and its event study tracks the truth month by month.

Early cohorts really did gain more (14.7 vs 3.2 for the last), because the generator gave early adopters larger effects and more time to grow. That is the heterogeneity that breaks TWFE.

Why it matters at work: health programs almost always roll out in stages: by region, by hospital, by clinic. Program evaluations for ministries and Treasury Board-style reviews now expect modern staggered estimators; a single TWFE coefficient invites the question, "what about the Goodman-Bacon problem?"

Where you'll meet this: evaluations of Ontario Health Teams, regional screening programs, team-based primary care rollouts; the did, fixest (sunab), didimputation and did2s packages in R


33.6 Dropping the never-treated (20 min)

Bug of the day. "The four regions without a clinic (North, Outaouais, Laval and the other Quebec regions) are different, so drop them and compare clinic regions with each other."

"""Day 33 bug of the day: 'the four regions without a clinic are different - drop them'."""

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 statsmodels.formula.api as smf  # noqa: E402

from corridor.policy import imputation_att, load_panel, twfe_weights  # noqa: E402

p = load_panel()
q = p[np.isfinite(p.g)].reset_index(drop=True)
for label, d in (("all 11 regions", p), ("7 clinic regions only", q)):
    b = smf.ols("uacr_rate ~ clinic + C(region) + C(t)", d).fit().params.clinic
    w = twfe_weights(d)
    neg = d.assign(w=w, e=d.t - d.g)[w < 0]
    extra = f"; they fall on cells {neg.e.min():.0f}-{neg.e.max():.0f} months after opening" if len(neg) else ""
    print(f"TWFE, {label:<22}{b:>6.2f}   negative weights: {len(neg)} (sum {neg.w.sum():+.2f}){extra}")
att, cells = imputation_att(q, "uacr_rate")
print(f"imputation, clinic regions only: {att:.2f} on {len(cells)} cells (months after the last opening cannot be imputed)")
TWFE, all 11 regions          8.31   negative weights: 0 (sum +0.00)
TWFE, 7 clinic regions only   4.66   negative weights: 54 (sum -0.19); they fall on cells 27-50 months after opening
imputation, clinic regions only: 9.82 on 135 cells (months after the last opening cannot be imputed)

Without never-treated regions, the only controls are regions that open later, and after they open, already-treated ones. The TWFE estimate collapses to 4.7, less than half the truth, and 54 cells now get negative weights, all of them 27 to 50 months after opening, where the effect is largest. A large effect, multiplied by a negative weight, pulls the estimate down. The imputation estimator still works (9.8), but only on the 135 cells before the last region opens: after October 2026 there is no untreated region left to learn from. Never-treated units are valuable; drop them only for a real reason, and then use an estimator that knows what it is missing.


33.7 Mini-project: the event-study figure (50 min)

The program's evaluation report needs one figure: the effect by months since opening, from both estimators, with TWFE's single number for contrast. Save the series to docs/clinic_effects.csv.

"""Day 33 mini-project: the event-study figure for the program evaluation report (docs/clinic_effects.csv)."""

import os
import sys

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

matplotlib.use("Agg")
import matplotlib.pyplot as plt  # noqa: E402
import pandas as pd  # noqa: E402
import statsmodels.formula.api as smf  # noqa: E402

from corridor.db import ROOT  # noqa: E402
from corridor.policy import aggregate, callaway_santanna, imputation_att, load_panel  # noqa: E402

p = load_panel()
cs = aggregate(callaway_santanna(p, "uacr_rate"), "dynamic").loc[-24:48]
_, cells = imputation_att(p, "uacr_rate")
imp = cells.groupby("e").effect.mean().loc[:48]
twfe = smf.ols("uacr_rate ~ clinic + C(region) + C(t)", p).fit().params.clinic
fig, ax = plt.subplots(figsize=(8, 3.8))
ax.plot(cs.index, cs.values, "o-", ms=2.5, lw=1, color="#22b8cf", label="Callaway-Sant'Anna")
ax.plot(imp.index, imp.values, "s-", ms=2.5, lw=1, color="#f5a524", label="imputation")
ax.axhline(twfe, color="#e5484d", lw=1, ls="--", label=f"TWFE (one number: {twfe:.1f})")
ax.axhline(0, color="black", lw=0.8)
ax.axvline(-0.5, color="#8b8d98", lw=0.8, ls=":")
ax.set_xlabel("months since the clinic opened")
ax.set_ylabel("extra UACR tests per 1,000 per month")
ax.spines[["top", "right"]].set_visible(False)
ax.legend(frameon=False, fontsize=8)
fig.tight_layout()
fig.savefig(os.path.join(ROOT, "figures", "day33_dynamic.png"), dpi=150)
out = pd.DataFrame({"callaway_santanna": cs, "imputation": imp}).round(2)
out.index.name = "months_since_opening"
out.to_csv(os.path.join(ROOT, "docs", "clinic_effects.csv"))
print("wrote figures/day33_dynamic.png and docs/clinic_effects.csv")
print(f"year 1 average: CS {cs.loc[0:11].mean():.2f}, imputation {imp.loc[0:11].mean():.2f}; "
      f"year 2: CS {cs.loc[12:23].mean():.2f}, imputation {imp.loc[12:23].mean():.2f}")
wrote figures/day33_dynamic.png and docs/clinic_effects.csv
year 1 average: CS 6.63, imputation 4.98; year 2: CS 12.95, imputation 11.58

Clinic effects by months since opening

The flat pre-period is the evidence for the design; the climbing post-period is the program's story. Write the caption: "UACR testing rose by about 5–7 per 1,000 per month in a clinic's first year and 11–13 in its second." The TWFE line runs through the middle and describes no actual month.

33.8 Save your work

python -m pytest -q
git add .
git commit -m "Day 33: staggered adoption - TWFE weights, Callaway-Sant'Anna, imputation"

Day 33 checklist

  • I recognize staggered adoption and know why TWFE fails when effects change over time
  • I can compute TWFE's implicit weights and find negative ones
  • I estimate ATT(g, t) with clean controls and aggregate it overall, by cohort and by event time
  • I can use the imputation estimator and explain its trade-off with Callaway–Sant'Anna
  • I keep never-treated units when I have them, and plot pre-period estimates