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
Copy file name to clipboardExpand all lines: ROADMAP.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@ For past changes and release history, see [CHANGELOG.md](CHANGELOG.md).
8
8
9
9
## Current Status
10
10
11
-
diff-diff v2.7.5 is a **production-ready** DiD library with feature parity with R's `did` + `HonestDiD` + `synthdid` ecosystem for core DiD analysis, plus **unique survey support** — design-based variance estimation (Taylor linearization, replicate weights) integrated across all estimators. No R or Python package offers this combination:
11
+
diff-diff v2.8.4 is a **production-ready** DiD library with feature parity with R's `did` + `HonestDiD` + `synthdid` ecosystem for core DiD analysis, plus **unique survey support** — all estimators accept survey weights, with design-based variance estimation varying by estimator. No R or Python package offers this combination:
12
12
13
-
-**Core estimators**: Basic DiD, TWFE, MultiPeriod, Callaway-Sant'Anna, Sun-Abraham, Borusyak-Jaravel-Spiess Imputation, Synthetic DiD, Triple Difference (DDD), TROP, Two-Stage DiD (Gardner 2022), Stacked DiD (Wing et al. 2024), Continuous DiD (Callaway, Goodman-Bacon & Sant'Anna 2024)
13
+
-**Core estimators**: Basic DiD, TWFE, MultiPeriod, Callaway-Sant'Anna, Sun-Abraham, Borusyak-Jaravel-Spiess Imputation, Synthetic DiD, Triple Difference (DDD), Staggered Triple Difference (Ortiz-Villavicencio & Sant'Anna 2025), TROP, Two-Stage DiD (Gardner 2022), Stacked DiD (Wing et al. 2024), Continuous DiD (Callaway, Goodman-Bacon & Sant'Anna 2024)
-**Sensitivity analysis**: Honest DiD (Rambachan-Roth), Pre-trends power analysis (Roth 2022)
17
17
-**Study design**: Power analysis tools
18
18
-**Data utilities**: Real-world datasets (Card-Krueger, Castle Doctrine, Divorce Laws, MPDTA), DGP functions for all supported designs
19
-
-**Survey support**: Full `SurveyDesign` with strata, PSU, FPC, weight types, replicate weights(BRR/Fay/JK1/JKn), Taylor linearization, DEFF diagnostics, subpopulation analysis — integrated across all estimators (see [survey-roadmap.md](docs/survey-roadmap.md))
19
+
-**Survey support**: `SurveyDesign` with strata, PSU, FPC, weight types, DEFF diagnostics, subpopulation analysis. All 15 estimators accept survey weights; design-based variance estimation (TSL, replicate weights, survey-aware bootstrap) varies by estimator. Replicate weights (BRR/Fay/JK1/JKn/SDR) supported for 12 of 15; `BaconDecomposition` is diagnostic-only. See [choosing_estimator.rst](docs/choosing_estimator.rst#survey-design-support) for the full compatibility matrix.
20
20
-**Performance**: Optional Rust backend for accelerated computation; faster than R at scale (see [CHANGELOG.md](CHANGELOG.md) for benchmarks)
21
21
22
22
---
@@ -34,19 +34,20 @@ full details.
34
34
-**Repeated Cross-Sections***(Implemented)*: `panel=False` support for
35
35
CallawaySantAnna using cross-sectional DRDID (Sant'Anna & Zhao 2020,
Copy file name to clipboardExpand all lines: docs/choosing_estimator.rst
+121-2Lines changed: 121 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -571,5 +571,124 @@ If you're unsure which estimator to use:
571
571
investigate why (often reveals violations of assumptions)
572
572
573
573
5. **Using survey data?** - Pass a ``SurveyDesign`` to ``fit()`` for design-based
574
-
variance estimation. See the `survey tutorial <https://github.com/igerber/diff-diff/blob/main/docs/tutorials/16_survey_did.ipynb>`_
575
-
for a full walkthrough with strata, PSU, FPC, replicate weights, and subpopulation analysis.
574
+
variance estimation. See the :ref:`survey-design-support` section below for
575
+
the compatibility matrix, and the `survey tutorial <https://github.com/igerber/diff-diff/blob/main/docs/tutorials/16_survey_did.ipynb>`_
576
+
for a full walkthrough.
577
+
578
+
.. _survey-design-support:
579
+
580
+
Survey Design Support
581
+
---------------------
582
+
583
+
All estimators accept an optional ``survey_design`` parameter in ``fit()``.
584
+
Pass a :class:`~diff_diff.SurveyDesign` object to get design-based variance
585
+
estimation. The depth of support varies by estimator:
586
+
587
+
.. list-table::
588
+
:header-rows: 1
589
+
:widths: 25 12 18 18 18
590
+
591
+
* - Estimator
592
+
- Weights
593
+
- Strata/PSU/FPC
594
+
- Replicate Weights
595
+
- Survey Bootstrap
596
+
* - ``DifferenceInDifferences``
597
+
- Full
598
+
- Full
599
+
- Full
600
+
- --
601
+
* - ``TwoWayFixedEffects``
602
+
- Full
603
+
- Full
604
+
- Full
605
+
- --
606
+
* - ``MultiPeriodDiD``
607
+
- Full
608
+
- Full
609
+
- Full
610
+
- --
611
+
* - ``CallawaySantAnna``
612
+
- pweight only
613
+
- Full
614
+
- Full
615
+
- Multiplier at PSU
616
+
* - ``TripleDifference``
617
+
- pweight only
618
+
- Full
619
+
- Full (analytical)
620
+
- --
621
+
* - ``StaggeredTripleDifference``
622
+
- pweight only
623
+
- Full
624
+
- Full
625
+
- Multiplier at PSU
626
+
* - ``SunAbraham``
627
+
- Full
628
+
- Full
629
+
- Full
630
+
- Rao-Wu rescaled
631
+
* - ``StackedDiD``
632
+
- pweight only
633
+
- Full (pweight only)
634
+
- Full
635
+
- --
636
+
* - ``ImputationDiD``
637
+
- pweight only
638
+
- Full
639
+
- Full (analytical)
640
+
- Multiplier at PSU
641
+
* - ``TwoStageDiD``
642
+
- pweight only
643
+
- Full
644
+
- Full (analytical)
645
+
- Multiplier at PSU
646
+
* - ``ContinuousDiD``
647
+
- Full
648
+
- Full
649
+
- Full (analytical)
650
+
- Multiplier at PSU
651
+
* - ``EfficientDiD``
652
+
- Full
653
+
- Full
654
+
- Full (analytical)
655
+
- Multiplier at PSU
656
+
* - ``SyntheticDiD``
657
+
- pweight only
658
+
- Via bootstrap
659
+
- --
660
+
- Rao-Wu rescaled
661
+
* - ``TROP``
662
+
- pweight only
663
+
- Via bootstrap
664
+
- --
665
+
- Rao-Wu rescaled
666
+
* - ``BaconDecomposition``
667
+
- Diagnostic
668
+
- Diagnostic
669
+
- --
670
+
- --
671
+
672
+
**Legend:**
673
+
674
+
- **Full**: All weight types (pweight/fweight/aweight) + strata/PSU/FPC + Taylor Series Linearization variance
675
+
- **Full (pweight only)**: Full TSL with strata/PSU/FPC, but only ``pweight`` accepted (``fweight``/``aweight`` rejected because composition changes weight semantics)
676
+
- **Via bootstrap**: Strata/PSU/FPC supported only with bootstrap variance. ``SyntheticDiD`` requires ``variance_method='bootstrap'``; ``TROP`` uses bootstrap by default. ``SyntheticDiD`` placebo does not support strata/PSU/FPC.
677
+
- **pweight only** (Weights column): Only ``pweight`` accepted; ``fweight``/``aweight`` raise an error
678
+
- **Diagnostic**: Weighted descriptive statistics only (no inference)
679
+
- **--**: Not supported
680
+
681
+
.. note::
682
+
683
+
``EfficientDiD`` does not support ``covariates`` and ``survey_design``
684
+
simultaneously (the DR nuisance path does not yet thread survey weights).
685
+
686
+
.. note::
687
+
688
+
``SyntheticDiD`` with ``variance_method='placebo'`` does not support
689
+
strata/PSU/FPC. Use ``variance_method='bootstrap'`` for full survey
690
+
design support.
691
+
692
+
For the full walkthrough with code examples, see the
0 commit comments