diff_diff.SensitivityResults
- class diff_diff.SensitivityResults[source]
Bases:
objectResults from sensitivity analysis over a grid of M values.
Contains bounds and confidence intervals for each M value, plus the breakdown value.
- M_values
Grid of M parameter values.
- Type:
np.ndarray
- __init__(M_values, bounds, robust_cis, breakdown_M, method, original_estimate, original_se, alpha=0.05)
Methods
__init__(M_values, bounds, robust_cis, ...)plot([ax, show_bounds, show_ci, breakdown_line])Plot sensitivity analysis results.
Print summary to stdout.
summary()Generate formatted summary.
Convert to DataFrame with one row per M value.
Attributes
Check if there is a finite breakdown value.
- plot(ax=None, show_bounds=True, show_ci=True, breakdown_line=True, **kwargs)[source]
Plot sensitivity analysis results.
- Parameters:
ax (matplotlib.axes.Axes, optional) – Axes to plot on. If None, creates new figure.
show_bounds (bool) – Whether to show identified set bounds.
show_ci (bool) – Whether to show confidence intervals.
breakdown_line (bool) – Whether to show vertical line at breakdown value.
**kwargs – Additional arguments passed to plotting functions.
- Returns:
ax – The axes with the plot.
- Return type:
matplotlib.axes.Axes
- __init__(M_values, bounds, robust_cis, breakdown_M, method, original_estimate, original_se, alpha=0.05)