@@ -465,8 +465,7 @@ cdid.fit(
465465 time: str,
466466 first_treat: str,
467467 dose: str, # Column with continuous treatment dose
468- covariates: list[str] = None,
469- aggregate: str = None, # None, "simple", "dose", "event_study"
468+ aggregate: str = None, # None, "dose", "eventstudy"
470469) -> ContinuousDiDResults
471470```
472471
@@ -580,7 +579,7 @@ TROP(
580579 method: str = "twostep", # "twostep" or "global" (or deprecated "joint")
581580 lambda_time_grid: list[float] = None, # Time weight decay grid [0, 0.1, 0.5, 1, 2, 5]
582581 lambda_unit_grid: list[float] = None, # Unit weight decay grid [0, 0.1, 0.5, 1, 2, 5]
583- lambda_nn_grid: list[float] = None, # Nuclear norm grid [0, 0.01, 0.1, 1]
582+ lambda_nn_grid: list[float] = None, # Nuclear norm grid [0, 0.01, 0.1, 1, 10 ]
584583 max_iter: int = 100,
585584 tol: float = 1e-6,
586585 alpha: float = 0.05,
@@ -595,7 +594,7 @@ TROP(
595594trop.fit(
596595 data: pd.DataFrame,
597596 outcome: str,
598- treatment: str, # Treatment indicator (0/1, can vary over time)
597+ treatment: str, # Absorbing-state treatment indicator (0/1). Must be 0 for all pre-treatment periods and 1 for treatment and post-treatment periods.
599598 unit: str,
600599 time: str,
601600) -> TROPResults
@@ -865,7 +864,7 @@ Individual 2x2 DiD comparison (used in BaconDecompositionResults).
865864
866865### Common Results Pattern for Staggered Estimators
867866
868- ImputationDiDResults, TwoStageDiDResults, StackedDiDResults, EfficientDiDResults, and ContinuousDiDResults all share a similar structure:
867+ ImputationDiDResults, TwoStageDiDResults, StackedDiDResults, and EfficientDiDResults share a similar structure:
869868
870869| Attribute | Type | Description |
871870|-----------|------|-------------|
@@ -886,6 +885,44 @@ Each event study effect dict contains: `effect`, `se`, `t_stat`, `p_value`, `con
886885
887886**Methods:** `summary()`, `print_summary()`, `to_dataframe()`
888887
888+ ### ContinuousDiDResults
889+
890+ | Attribute | Type | Description |
891+ |-----------|------|-------------|
892+ | `dose_response_att` | `DoseResponseCurve` | Dose-response curve for ATT |
893+ | `dose_response_acrt` | `DoseResponseCurve` | Dose-response curve for ACRT |
894+ | `overall_att` | `float` | Overall ATT |
895+ | `overall_att_se` | `float` | SE of overall ATT |
896+ | `overall_att_t_stat` | `float` | T-statistic for ATT |
897+ | `overall_att_p_value` | `float` | P-value for ATT |
898+ | `overall_att_conf_int` | `tuple[float, float]` | CI for ATT |
899+ | `overall_acrt` | `float` | Overall ACRT |
900+ | `overall_acrt_se` | `float` | SE of overall ACRT |
901+ | `overall_acrt_t_stat` | `float` | T-statistic for ACRT |
902+ | `overall_acrt_p_value` | `float` | P-value for ACRT |
903+ | `overall_acrt_conf_int` | `tuple[float, float]` | CI for ACRT |
904+ | `group_time_effects` | `dict[tuple, dict]` | Group-time level effects |
905+ | `dose_grid` | `np.ndarray` | Evaluation grid for dose-response |
906+ | `groups` | `list` | Treatment cohorts |
907+ | `time_periods` | `list` | All time periods |
908+ | `n_obs` | `int` | Number of observations |
909+ | `n_treated_units` | `int` | Treated units |
910+ | `n_control_units` | `int` | Control units |
911+ | `event_study_effects` | `dict[int, dict] or None` | Event study effects (if `aggregate="eventstudy"`) |
912+
913+ **DoseResponseCurve** sub-dataclass:
914+
915+ | Attribute | Type | Description |
916+ |-----------|------|-------------|
917+ | `dose_grid` | `np.ndarray` | Dose values |
918+ | `effects` | `np.ndarray` | Estimated effects at each dose |
919+ | `se` | `np.ndarray` | Standard errors |
920+ | `conf_int_lower` | `np.ndarray` | Lower CI bound |
921+ | `conf_int_upper` | `np.ndarray` | Upper CI bound |
922+ | `target` | `str` | `"att"` or `"acrt"` |
923+
924+ **Methods:** `summary()`, `print_summary()`, `to_dataframe()`
925+
889926### TROPResults
890927
891928| Attribute | Type | Description |
0 commit comments