You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`13_stacked_did.ipynb`| Stacked DiD (Wing et al. 2024), Q-weights, sub-experiment inspection, trimming, clean control definitions |
128
+
|`15_efficient_did.ipynb`| Efficient DiD (Chen et al. 2025), optimal weighting, PT-All vs PT-Post, efficiency gains, bootstrap inference |
128
129
129
130
## Data Preparation
130
131
@@ -1071,6 +1072,56 @@ results = stacked_did(
1071
1072
)
1072
1073
```
1073
1074
1075
+
### Efficient DiD (Chen, Sant'Anna & Xie 2025)
1076
+
1077
+
Efficient DiD achieves the semiparametric efficiency bound for ATT estimation in staggered adoption designs. It optimally weights across all valid comparison groups and baselines via the inverse covariance matrix Omega*, producing tighter confidence intervals than standard estimators like Callaway-Sant'Anna when the stronger PT-All assumption holds.
1078
+
1079
+
```python
1080
+
from diff_diff import EfficientDiD, generate_staggered_data
1081
+
1082
+
# Generate sample data
1083
+
data = generate_staggered_data(n_units=300, n_periods=10,
| When to choose | Maximum efficiency, PT-All credible | Covariates needed, weaker PT |
1124
+
1074
1125
### Triple Difference (DDD)
1075
1126
1076
1127
Triple Difference (DDD) is used when treatment requires satisfying two criteria: belonging to a treated **group** AND being in an eligible **partition**. The `TripleDifference` class implements the methodology from Ortiz-Villavicencio & Sant'Anna (2025), which correctly handles covariate adjustment (unlike naive implementations).
0 commit comments