diff --git a/diff_diff/bacon.py b/diff_diff/bacon.py index 1ef55b7d..90438a9f 100644 --- a/diff_diff/bacon.py +++ b/diff_diff/bacon.py @@ -402,6 +402,7 @@ def __init__(self, weights: str = "approximate"): ---------- weights : str, default="approximate" Weight calculation method: + - "approximate": Fast simplified formula (default) - "exact": Variance-based weights from Goodman-Bacon (2021) """ diff --git a/diff_diff/chaisemartin_dhaultfoeuille_results.py b/diff_diff/chaisemartin_dhaultfoeuille_results.py index 8c6dd470..b19a3bfe 100644 --- a/diff_diff/chaisemartin_dhaultfoeuille_results.py +++ b/diff_diff/chaisemartin_dhaultfoeuille_results.py @@ -893,7 +893,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - cv_label = f"CV (SE/|{overall_row_label}|):" + cv_label = f"CV (SE/abs({overall_row_label})):" lines.append(f"{cv_label:<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/continuous_did_results.py b/diff_diff/continuous_did_results.py index 623937b6..f60ea5ea 100644 --- a/diff_diff/continuous_did_results.py +++ b/diff_diff/continuous_did_results.py @@ -276,7 +276,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/efficient_did_results.py b/diff_diff/efficient_did_results.py index 6a393e7f..6ca90c17 100644 --- a/diff_diff/efficient_did_results.py +++ b/diff_diff/efficient_did_results.py @@ -260,7 +260,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/imputation_results.py b/diff_diff/imputation_results.py index 03689c1f..a9e8a0ca 100644 --- a/diff_diff/imputation_results.py +++ b/diff_diff/imputation_results.py @@ -255,7 +255,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/results.py b/diff_diff/results.py index e2270184..d7f4a3d8 100644 --- a/diff_diff/results.py +++ b/diff_diff/results.py @@ -249,7 +249,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") # Add significance codes lines.extend( @@ -656,7 +656,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") # Add significance codes lines.extend( @@ -1052,7 +1052,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") # Show top unit weights if self.unit_weights: diff --git a/diff_diff/stacked_did_results.py b/diff_diff/stacked_did_results.py index 6f1a6f02..e6a38e6e 100644 --- a/diff_diff/stacked_did_results.py +++ b/diff_diff/stacked_did_results.py @@ -212,7 +212,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/staggered_results.py b/diff_diff/staggered_results.py index d9d14250..02b2cabd 100644 --- a/diff_diff/staggered_results.py +++ b/diff_diff/staggered_results.py @@ -234,7 +234,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/staggered_triple_diff_results.py b/diff_diff/staggered_triple_diff_results.py index 29859169..be653e8b 100644 --- a/diff_diff/staggered_triple_diff_results.py +++ b/diff_diff/staggered_triple_diff_results.py @@ -196,7 +196,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/sun_abraham.py b/diff_diff/sun_abraham.py index 3b999957..c33569e6 100644 --- a/diff_diff/sun_abraham.py +++ b/diff_diff/sun_abraham.py @@ -190,7 +190,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/diff_diff/trop_results.py b/diff_diff/trop_results.py index 2d3d8535..45e54bd1 100644 --- a/diff_diff/trop_results.py +++ b/diff_diff/trop_results.py @@ -236,7 +236,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") # Add significance codes lines.extend( diff --git a/diff_diff/two_stage_results.py b/diff_diff/two_stage_results.py index 4563907b..591f0cd1 100644 --- a/diff_diff/two_stage_results.py +++ b/diff_diff/two_stage_results.py @@ -253,7 +253,7 @@ def summary(self, alpha: Optional[float] = None) -> str: cv = self.coef_var if np.isfinite(cv): - lines.append(f"{'CV (SE/|ATT|):':<25} {cv:>10.4f}") + lines.append(f"{'CV (SE/abs(ATT)):':<25} {cv:>10.4f}") lines.append("") diff --git a/docs/tutorials/18_geo_experiments.ipynb b/docs/tutorials/18_geo_experiments.ipynb index d2ff8098..129b0a03 100644 --- a/docs/tutorials/18_geo_experiments.ipynb +++ b/docs/tutorials/18_geo_experiments.ipynb @@ -500,7 +500,7 @@ "---------------------------------------------------------------------------\n", "\n", "95% Confidence Interval: [297.5213, 326.1858]\n", - "CV (SE/|ATT|): 0.0234\n", + "CV (SE/abs(ATT)): 0.0234\n", "\n", "---------------------------------------------------------------------------\n", " Top Unit Weights (Synthetic Control) \n",