From 64cc8a2ce04c43a26194b2ed933d97491dab8a26 Mon Sep 17 00:00:00 2001 From: igerber Date: Tue, 26 May 2026 10:18:15 -0400 Subject: [PATCH 1/3] efficient-did: thread vcov_type as narrow {hc1} contract per Chen-Sant'Anna-Xie 2025 (Phase 1b interstitial #4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the IF-based narrow-contract template from CallawaySantAnna #487, TripleDifference #488, and ImputationDiD #492. EfficientDiD uses influence-function-based variance per Chen-Sant'Anna-Xie (2025) achieving the semiparametric efficiency bound; the per-unit EIF aggregation has no equivalent single design matrix, so analytical-sandwich families cannot be defined and vcov_type is permanently narrow to {"hc1"}. Input contract: - vcov_type kwarg threaded through __init__ / get_params / set_params - _validate_vcov_type rejects {classical, hc2, hc2_bm} with methodology-rooted message citing Chen-Sant'Anna-Xie (2025) and the missing design matrix - conley rejected as deferred (TODO.md follow-up row) - set_params(vcov_type=bad) raises immediately via _validate_params chain (intentional eager-validation; diverges from sibling IF-based estimators which defer to fit-time per sklearn mutate-then-validate-at-use) EfficientDiDResults harmonization (BC): - cluster field renamed to cluster_name (matches IF-based estimator naming) - New n_clusters field for the G= suffix on the variance summary line - New vcov_type field - New to_dict() method (mirrors TripleDifferenceResults / ImputationDiDResults) - summary() now renders "Variance estimator: