Skip to content

Commit 5d5bfa0

Browse files
authored
Merge pull request #218 from igerber/survey-data
Add survey data support (Phases 1-2)
2 parents 8a72a07 + 74f0438 commit 5d5bfa0

11 files changed

Lines changed: 4912 additions & 217 deletions

File tree

TODO.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Deferred items from PR reviews that were not addressed before merge.
5252
| ImputationDiD dense `(A0'A0).toarray()` scales O((U+T+K)^2), OOM risk on large panels | `imputation.py` | #141 | Medium (deferred — only triggers when sparse solver fails; fixing requires sparse least-squares alternatives) |
5353
| EfficientDiD: warn when cohort share is very small (< 2 units or < 1% of sample) — inverted in Omega*/EIF | `efficient_did_weights.py` | #192 | Low |
5454
| EfficientDiD: API docs / tutorial page for new public estimator | `docs/` | #192 | Medium |
55+
| Multi-absorb weighted demeaning needs iterative alternating projections for N > 1 absorbed FE with survey weights; unweighted multi-absorb also uses single-pass (pre-existing, exact only for balanced panels) | `estimators.py` | #218 | Medium |
5556
| TripleDifference power: `generate_ddd_data` is a fixed 2×2×2 cross-sectional DGP — no multi-period or unbalanced-group support. Add a `generate_ddd_panel_data` for panel DDD power analysis. | `prep_dgp.py`, `power.py` | #208 | Low |
5657

5758
#### Performance

diff_diff/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@
9494
PeriodEffect,
9595
SyntheticDiDResults,
9696
)
97+
from diff_diff.survey import (
98+
SurveyDesign,
99+
SurveyMetadata,
100+
)
97101
from diff_diff.staggered import (
98102
CallawaySantAnna,
99103
CallawaySantAnnaResults,
@@ -312,6 +316,9 @@
312316
"compute_pretrends_power",
313317
"compute_mdv",
314318
"plot_pretrends_power",
319+
# Survey support
320+
"SurveyDesign",
321+
"SurveyMetadata",
315322
# Rust backend
316323
"HAS_RUST_BACKEND",
317324
# Linear algebra helpers

diff_diff/estimators.py

Lines changed: 220 additions & 27 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)