Skip to content

Commit b623dee

Browse files
igerberclaude
andcommitted
Rewrite RC reg/DR to match DRDID::reg_did_rc and DRDID::drdid_rc formulas
_outcome_regression_rc: Pool all treated obs for OR correction term (was: separate per-period averages). Period-specific treated means for Y. Matches Sant'Anna & Zhao (2020) Eq 2.2 / R reg_did_rc exactly. _doubly_robust_rc: Fit 4 OLS models (control+treated, pre+post) for locally efficient DR estimator (was: 2 control-only). Implements tau_1 (AIPW) + tau_2 (local efficiency adjustment) with full 11-component IF. Matches Sant'Anna & Zhao (2020) Eq 3.3+3.4 / R drdid_rc exactly. Add agg_weight field to group_time_effects for RCS aggregation weight (cohort mass), separate from n_treated (per-cell display count). Aggregation uses data.get("agg_weight", data["n_treated"]) for backward compatibility with panel data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6080f92 commit b623dee

2 files changed

Lines changed: 381 additions & 154 deletions

File tree

0 commit comments

Comments
 (0)