|
1 | 1 | # Survey Data Support Roadmap |
2 | 2 |
|
3 | 3 | This document captures the survey data support roadmap for diff-diff. |
4 | | -All phases (1-6) are implemented. |
| 4 | +Phases 1-7 are implemented. Phase 8 (maturity refinements) is planned. |
5 | 5 |
|
6 | 6 | ## Implemented (Phases 1-2) |
7 | 7 |
|
@@ -202,3 +202,101 @@ variance estimation for staggered triple differences. |
202 | 202 |
|
203 | 203 | **Reference:** Ortiz-Villavicencio, M. & Sant'Anna, P.H.C. (2025). |
204 | 204 | "Better Understanding Triple Differences Estimators." arXiv:2505.09942. |
| 205 | + |
| 206 | +--- |
| 207 | + |
| 208 | +## Phase 8: Survey Maturity |
| 209 | + |
| 210 | +Refinements to close remaining gaps versus R's `survey` package and improve |
| 211 | +practitioner experience. Prioritized by user impact. |
| 212 | + |
| 213 | +### 8a. Successive Difference Replication (SDR) |
| 214 | + |
| 215 | +**Priority: High.** ACS PUMS — the most common US survey dataset for DiD |
| 216 | +policy evaluation — provides 80 SDR replicate weight columns. Without SDR |
| 217 | +support, these users can't use their provided replicate weights directly. |
| 218 | + |
| 219 | +**What's needed:** |
| 220 | +- Add `"SDR"` to `valid_rep_methods` in `SurveyDesign` |
| 221 | +- Variance formula: `V = 4/R * sum((theta_r - theta)^2)` — a scaling |
| 222 | + difference from BRR, not a new algorithm |
| 223 | +- Wire through `compute_replicate_vcov()` and `compute_replicate_if_variance()` |
| 224 | + |
| 225 | +**Reference:** Fay, R.E. & Train, G.F. (1995). "Aspects of Survey and |
| 226 | +Model-Based Postcensal Estimation of Income and Poverty Characteristics |
| 227 | +for States and Counties." ASA Proceedings. |
| 228 | + |
| 229 | +### 8b. FPC in ImputationDiD and TwoStageDiD |
| 230 | + |
| 231 | +**Priority: High.** Both estimators now support replicate weights and TSL |
| 232 | +with strata/PSU, but reject FPC outright (`NotImplementedError`). Adding |
| 233 | +FPC is incremental — thread `fpc` through the existing TSL variance path. |
| 234 | +Matters for finite population surveys (common in state-level sampling). |
| 235 | + |
| 236 | +**Current gate:** `imputation.py:280`, `two_stage.py:268` |
| 237 | + |
| 238 | +### 8c. Silent Operation Warnings |
| 239 | + |
| 240 | +**Priority: High.** Add `UserWarning` emissions for operations that |
| 241 | +silently alter analysis results: |
| 242 | +- TROP lstsq → pseudo-inverse numerical fallback |
| 243 | +- TwoStageDiD NaN masking of unidentified fixed effects |
| 244 | +- TwoStageDiD always-treated unit removal |
| 245 | +- CallawaySantAnna silent (g,t) pair skipping |
| 246 | +- TROP missing treatment indicator fill with 0 |
| 247 | +- Rust → Python backend fallback (currently debug log only) |
| 248 | +- Survey weight normalization (pweights rescaled to mean=1) |
| 249 | +- `np.inf` → 0 never-treated conversion |
| 250 | + |
| 251 | +### 8d. Lonely PSU "adjust" in Bootstrap |
| 252 | + |
| 253 | +**Priority: Medium.** `lonely_psu="adjust"` works for analytical (TSL) |
| 254 | +variance but raises `NotImplementedError` for survey-aware bootstrap |
| 255 | +(2 raises in `bootstrap_utils.py`). Real survey data regularly has |
| 256 | +singleton strata. Users needing bootstrap inference with such data hit |
| 257 | +a wall. |
| 258 | + |
| 259 | +**Reference:** Rust, K.F. & Rao, J.N.K. (1996). "Variance Estimation |
| 260 | +for Complex Surveys Using Replication Techniques." Statistical Methods |
| 261 | +in Medical Research 5(3). |
| 262 | + |
| 263 | +### 8e. Survey Diagnostics and Utilities |
| 264 | + |
| 265 | +**Priority: Medium.** Small additions that signal maturity to survey |
| 266 | +statisticians: |
| 267 | +- **CV on estimates**: coefficient of variation (SE/estimate) on results |
| 268 | + objects — trivial to add, used by federal agencies for publication |
| 269 | + standards (NCHS requires CV < 30% for releasable estimates) |
| 270 | +- **Weight trimming**: `trim_weights(data, weight_col, upper=None, |
| 271 | + quantile=None)` utility in `prep.py` for capping extreme weights |
| 272 | +- **ImputationDiD pretrends + survey**: pre-trends F-test currently |
| 273 | + ignores survey variance (`NotImplementedError` at `imputation.py:240`) |
| 274 | + |
| 275 | +### 8f. Survey Compatibility Matrix |
| 276 | + |
| 277 | +**Priority: Medium.** Users discover survey support limits by hitting |
| 278 | +`NotImplementedError` at runtime. Add a table to the survey tutorial |
| 279 | +or `choosing_estimator.rst` showing which estimator × survey feature |
| 280 | +combinations are supported (weights, strata/PSU, FPC, replicate weights, |
| 281 | +bootstrap + survey). |
| 282 | + |
| 283 | +### 8g. Documentation-Only Items |
| 284 | + |
| 285 | +**Priority: Low.** No code changes required: |
| 286 | +- **Multi-stage design**: document that single-stage (strata + PSU) |
| 287 | + is sufficient for variance estimation per Lumley (2004) Section 2.2. |
| 288 | + Don't implement multi-stage — it adds complexity without changing |
| 289 | + results for DiD applications. |
| 290 | +- **Post-stratification / calibration**: document that `SurveyDesign` |
| 291 | + expects pre-calibrated weights. Point users to `samplics` or R's |
| 292 | + `survey::calibrate()` for weight calibration. This is data prep, |
| 293 | + not DiD estimation — out of scope. |
| 294 | + |
| 295 | +### Deferred |
| 296 | + |
| 297 | +| Estimator | Capability | Reason | |
| 298 | +|-----------|-----------|--------| |
| 299 | +| SyntheticDiD | Replicate weights | No published theory on replicate weights + unit weight optimization | |
| 300 | +| TROP | Replicate weights | No published theory on replicate weights + nuclear norm regularization | |
| 301 | +| BaconDecomposition | Replicate weights | Diagnostic tool with no inference — replicate weights don't apply | |
| 302 | +| EfficientDiD | Covariates + survey, cluster + survey, bootstrap + survey | Lower demand, newer estimator; 3 `NotImplementedError` paths | |
0 commit comments