cleverly.sensitivity.SimulatedConfoundingCell#

class cleverly.sensitivity.SimulatedConfoundingCell(treatment_strength: float | tuple[float, ...], outcome_strength: float, estimate: float | None, displacement: float | None, induced_treatment_association: float | tuple[float | None, ...] | None = None, failure: ReplicationFailure | None = None, target_population_fraction: float | None = None)[source]#

Store one strength pair’s estimate or structured failure.

Parameters:
treatment_strengthfloat or tuple of float

Declared binary flip probability or continuous linear coefficient. A vector treatment has one per component, in the grid’s component order.

outcome_strengthfloat

Declared outcome perturbation strength.

estimatefloat or None

Refitted estimate. None when the cell failed.

displacementfloat or None

Refitted minus original value on the surface’s movement scale. None when the cell failed.

induced_treatment_associationfloat, tuple or None

Pearson correlation between the shared latent vector and the treatment of this cell, one per component of a vector treatment. It is measured within the selected baseline population under the fixed row weights. Both treatment arms contribute even for ATT or ATC. The anchor cell reports the original treatment, which gives the null level of the same data. Every other cell reports the perturbed treatment. The value is None when that treatment has zero standard deviation, and when a cell failed before the surface built it.

failureReplicationFailure or None

Structured refit or replacement failure retained for this cell.

target_population_fractionfloat or None

Weighted fraction of the selected baseline population in the conditioning arm. ATT and ATC recompute this fraction after treatment replacement. Other targets report one. None means the perturbation failed before the fraction was computed.

Methods#

Attributes#

SimulatedConfoundingCell.failure: ReplicationFailure | None = None#
SimulatedConfoundingCell.induced_treatment_association: float | tuple[float | None, ...] | None = None#
SimulatedConfoundingCell.target_population_fraction: float | None = None#
SimulatedConfoundingCell.treatment_strength: float | tuple[float, ...]#
SimulatedConfoundingCell.outcome_strength: float#
SimulatedConfoundingCell.estimate: float | None#
SimulatedConfoundingCell.displacement: float | None#