Skip to content

Commit 831dcb8

Browse files
committed
check for successful sensitivity when generating plot for RV
1 parent 5aa1f5d commit 831dcb8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doubleml/did/did_multi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,10 @@ def plot_effects(
10441044
if result_type not in ["effect", "rv", "est_bounds", "ci_bounds"]:
10451045
raise ValueError("result_type must be either 'effect', 'rv', 'est_bounds' or 'ci_bounds'.")
10461046

1047+
if result_type != "effect" and self._framework.sensitivity_params is None:
1048+
raise ValueError(f"result_type='{result_type}' requires sensitivity analysis. "
1049+
"Please call sensitivity_analysis() first.")
1050+
10471051
df = self._create_ci_dataframe(level=level, joint=joint)
10481052

10491053
# Set default y_label and title based on result_type

0 commit comments

Comments
 (0)