diff_diff.SensitivityResults#

class diff_diff.SensitivityResults[source]#

Bases: object

Results 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

bounds#

List of (lb, ub) identified set bounds for each M.

Type:

List[Tuple[float, float]]

robust_cis#

List of (ci_lb, ci_ub) robust CIs for each M.

Type:

List[Tuple[float, float]]

breakdown_M#

Smallest M where robust CI includes zero.

Type:

float

method#

Type of restriction used.

Type:

str

original_estimate#

Original point estimate.

Type:

float

original_se#

Original standard error.

Type:

float

alpha#

Significance level.

Type:

float

Methods

__init__(M_values, bounds, robust_cis, ...)

plot([ax, show_bounds, show_ci, breakdown_line])

Plot sensitivity analysis results.

print_summary()

Print summary to stdout.

summary()

Generate formatted summary.

to_dataframe()

Convert to DataFrame with one row per M value.

Attributes

alpha

has_breakdown

Check if there is a finite breakdown value.

M_values

bounds

robust_cis

breakdown_M

method

original_estimate

original_se

__init__(M_values, bounds, robust_cis, breakdown_M, method, original_estimate, original_se, alpha=0.05)#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#