Skip to content

Commit 8a57092

Browse files
authored
Merge pull request #56 from igerber/claude/update-benchmark-docs-v1.4.0
Claude/update benchmark docs v1.4.0
2 parents d21d29f + 988f02f commit 8a57092

3 files changed

Lines changed: 2670 additions & 93 deletions

File tree

ROADMAP.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,39 @@ Extend the existing `TripleDifference` estimator to handle staggered adoption se
100100
- Treatment adoption "staircase" plot for staggered designs
101101
- Interactive plots with plotly backend option
102102

103+
### CallawaySantAnna Analytical SE Parity with R
104+
105+
**Status:** Future work needed
106+
107+
The analytical standard error for the overall ATT in `CallawaySantAnna` differs from R's `did` package by ~19% due to different variance formulas.
108+
109+
**Current diff-diff formula** (assumes independence):
110+
```
111+
Var(Σ wᵢθᵢ) = Σ wᵢ² Var(θᵢ)
112+
```
113+
114+
**R `did` package formula** (accounts for covariance via influence functions):
115+
```
116+
Var(θ̄) = (1/n) Σᵢ (ψᵢ - ψ̄)²
117+
```
118+
119+
Where ψᵢ is the influence function contribution from unit i to the overall ATT.
120+
121+
**Why this matters:** The ATT(g,t) estimates share control units across calculations, creating positive covariance. Ignoring this **underestimates** the variance:
122+
- diff-diff analytical SE: 0.0095 (on MPDTA)
123+
- R `did` analytical SE: 0.0118 (on MPDTA)
124+
125+
**Workaround:** Use `n_bootstrap > 0` for bootstrap inference, which correctly captures covariance.
126+
127+
**Fix needed:** Aggregate influence functions across units when computing overall SE, accounting for covariance terms:
128+
```
129+
Var(Σ wᵢθᵢ) = Σᵢ Σⱼ wᵢwⱼ Cov(θᵢ, θⱼ)
130+
```
131+
132+
This requires storing and properly aggregating the per-unit influence function contributions when computing the overall ATT standard error.
133+
134+
**Note:** Point estimates match R exactly; only analytical SEs differ.
135+
103136
---
104137

105138
## Medium-Term Enhancements (v1.6+)

0 commit comments

Comments
 (0)