cleverly.sensitivity.RobustnessValue#

class cleverly.sensitivity.RobustnessValue(values: Mapping[str, Any], *, estimand: str, psi: float, rho: float, level: float, null_hypothesis: float, refusal: MechanismRefusal | None = None)[source]#

The confounding strength that would move an estimate to its null.

A dict with the keys robustness_value() documents ("rv", the limit value under its status name, "max_bias", and the keys a plug-in or descriptive bound adds), so value["rv"] and json.dumps(value) work as on any mapping. summary() prints what the numbers mean.

Parameters:
valuesmapping of str to Any

The keys and values, in order.

estimandstr

The estimand the values describe.

psifloat

Its reported estimate.

rhofloat

The alignment the values assume.

levelfloat

The coverage level of the confidence limit the limit value reads.

null_hypothesisfloat

The value the strengths are measured against.

refusalMechanismRefusal or None

Why the limit value is withheld, when an estimator rule withholds it.

Methods#

RobustnessValue.summary(*, detail: Detail = 'short') → Summary[source]#

Return the printed summary.

Parameters:
detail{“short”, “full”}

"full" adds the settings and the definitions of the strengths.

Returns:
Summary

A str that prints the values and how to read them.

Attributes#

RobustnessValue.estimand: str#
RobustnessValue.psi: float#
RobustnessValue.rho: float#
RobustnessValue.level: float#
RobustnessValue.null_hypothesis: float#
RobustnessValue.refusal: MechanismRefusal | None#