Staggered Adoption ================== Estimators for staggered DiD designs where treatment is adopted at different times. This module provides three estimators for staggered adoption settings: 1. **Callaway-Sant'Anna (2021)**: Aggregates group-time 2x2 DiD comparisons 2. **Sun-Abraham (2021)**: Interaction-weighted regression approach 3. **Ortiz-Villavicencio & Sant'Anna (2025)**: Staggered triple-difference (DDD) with group-time ATT Running CS and SA together provides a useful robustness check - when they agree, results are more credible. .. module:: diff_diff.staggered CallawaySantAnna ---------------- Callaway & Sant'Anna (2021) estimator for heterogeneous treatment timing. **Covariates and bad controls.** On the panel lane a covariate is read at each cell's base period (the observed period preceding the cohort's first treatment for post-treatment cells), never at :math:`t`. A time-varying covariate that treatment can affect (a "bad control", Caetano, Callaway, Payne & Sant'Anna 2026) conditioned this way therefore computes the paper's Proposition 3 estimand - parallel trends given the PRE-treatment bad control (Approach 1) - not the biased "include the bad control" contrast; passing the pre-treatment value is the user's responsibility. On the repeated-cross-section lane covariates are read on the observation's own row, so a time-varying bad control there IS :math:`X_t` and Approach 1 does not apply. For the paper's covariate-unconfoundedness approach with extra covariates :math:`W`, use :class:`~diff_diff.DMLDiD` with ``fit(..., bad_control=, bad_control_covariates=)``. .. autoclass:: diff_diff.CallawaySantAnna :no-index: :members: :undoc-members: :show-inheritance: :inherited-members: .. rubric:: Methods .. autosummary:: ~CallawaySantAnna.fit ~CallawaySantAnna.get_params ~CallawaySantAnna.set_params CallawaySantAnnaResults ----------------------- Results container for Callaway-Sant'Anna estimation. .. autoclass:: diff_diff.CallawaySantAnnaResults :no-index: :members: :undoc-members: :show-inheritance: .. rubric:: Methods .. autosummary:: ~CallawaySantAnnaResults.aggregate ~CallawaySantAnnaResults.summary ~CallawaySantAnnaResults.to_dataframe ``aggregate()`` levels: ``'simple'``, ``'event_study'``, ``'group'``, and ``'total'`` (3.10) - the estimator-owned total incremental outcome (``C x overall`` over the finite-masked complete-case support; panel non-survey fits only, consumed by :mod:`diff_diff.mmm` with no scale). GroupTimeEffect --------------- Container for individual group-time ATT(g,t) effects. .. autoclass:: diff_diff.GroupTimeEffect :no-index: :members: :undoc-members: :show-inheritance: .. module:: diff_diff.sun_abraham SunAbraham ---------- Sun & Abraham (2021) interaction-weighted estimator for staggered DiD. This estimator provides event-study coefficients using a saturated regression with cohort-by-relative-time interactions. It uses interaction-weighting to aggregate cohort-specific effects into event study estimates. **Key differences from Callaway-Sant'Anna:** - Uses regression-based approach rather than 2x2 DiD comparisons - Weights cohort-specific effects by share of each cohort in treated population - Can be more efficient when treatment effects are homogeneous - Running both provides a useful robustness check **Reference:** Sun, L., & Abraham, S. (2021). Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. *Journal of Econometrics*, 225(2), 175-199. .. autoclass:: diff_diff.SunAbraham :no-index: :members: :undoc-members: :show-inheritance: :inherited-members: .. rubric:: Methods .. autosummary:: ~SunAbraham.fit ~SunAbraham.get_params ~SunAbraham.set_params ~SunAbraham.summary ~SunAbraham.print_summary SunAbrahamResults ----------------- Results container for Sun-Abraham estimation. .. autoclass:: diff_diff.SunAbrahamResults :no-index: :members: :undoc-members: :show-inheritance: .. rubric:: Methods .. autosummary:: ~SunAbrahamResults.summary ~SunAbrahamResults.print_summary ~SunAbrahamResults.to_dataframe SABootstrapResults ------------------ Bootstrap inference results for Sun-Abraham estimation. .. autoclass:: diff_diff.SABootstrapResults :no-index: :members: :undoc-members: :show-inheritance: