Skip to content

Commit 970b54d

Browse files
authored
Merge pull request #178 from igerber/continuous-did-tutorial
Add continuous DiD tutorial
2 parents 5fab91a + adcbad4 commit 970b54d

3 files changed

Lines changed: 727 additions & 7 deletions

File tree

diff_diff/continuous_did_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class ContinuousDiDResults:
9090
dose_response_acrt : DoseResponseCurve
9191
ACRT(d) dose-response curve.
9292
overall_att : float
93-
Binarized overall ATT^{glob}.
93+
Binarized overall ATT (ATT^{loc} under PT, equals ATT^{glob} under SPT).
9494
overall_acrt : float
9595
Plug-in overall ACRT^{glob}.
9696
group_time_effects : dict

docs/methodology/REGISTRY.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,18 +403,31 @@ The multiplier bootstrap uses random weights w_i with E[w]=0 and Var(w)=1:
403403

404404
### Identification
405405

406-
Under **Strong Parallel Trends** (SPT): for all doses d in D_+,
406+
Two levels of parallel trends (following CGBS 2024, Assumptions 1-2):
407+
408+
**Parallel Trends (PT):** for all doses d in D_+,
407409
`E[Y_t(0) - Y_{t-1}(0) | D = d] = E[Y_t(0) - Y_{t-1}(0) | D = 0]`.
410+
Untreated potential outcome paths are the same across all dose groups and the
411+
untreated group. Stronger than binary PT because it conditions on specific dose values.
412+
Identifies: `ATT(d|d)`, `ATT^{loc}`. Does NOT identify `ATT(d)`, `ACRT`, or cross-dose comparisons.
413+
414+
**Strong Parallel Trends (SPT):** additionally, for all d in D,
415+
`E[Y_t(d) - Y_{t-1}(0) | D > 0] = E[Y_t(d) - Y_{t-1}(0) | D = d]`.
416+
No selection into dose groups on the basis of treatment effects.
417+
Implies `ATT(d|d) = ATT(d)` for all d.
418+
Additionally identifies: `ATT(d)`, `ACRT(d)`, `ACRT^{glob}`, and cross-dose comparisons.
408419

409-
This is stronger than standard PT because it conditions on specific dose values.
420+
See `docs/methodology/continuous-did.md` Section 4 for full details.
410421

411422
### Key Equations
412423

413424
**Target parameters:**
414-
- `ATT(d) = E[Y_t(d) - Y_t(0) | D > 0]` — dose-response curve
415-
- `ACRT(d) = dATT(d)/dd` — average causal response (marginal effect)
416-
- `ATT^{glob} = E[Delta Y | D > 0] - E[Delta Y | D = 0]` — binarized ATT
417-
- `ACRT^{glob} = E[ACRT(D_i) | D > 0]` — plug-in average marginal effect
425+
- `ATT(d|d) = E[Y_t(d) - Y_t(0) | D = d]` — effect of dose d on units who received dose d (PT)
426+
- `ATT(d) = E[Y_t(d) - Y_t(0) | D > 0]` — dose-response curve (SPT required)
427+
- `ACRT(d) = dATT(d)/dd` — average causal response / marginal effect (SPT required)
428+
- `ATT^{loc} = E[ATT(D|D) | D > 0] = E[Delta Y | D > 0] - E[Delta Y | D = 0]` — binarized ATT (PT); equals `ATT^{glob}` under SPT
429+
- `ATT^{glob} = E[ATT(D) | D > 0]` — global average dose-response level (SPT required)
430+
- `ACRT^{glob} = E[ACRT(D_i) | D > 0]` — plug-in average marginal effect (SPT required)
418431

419432
**Estimation via B-spline OLS:**
420433
1. Compute `Delta_tilde_Y = (Y_t - Y_{t-1})_treated - mean((Y_t - Y_{t-1})_control)`

0 commit comments

Comments
 (0)