cleverly.sensitivity.SensitivityElements#

class cleverly.sensitivity.SensitivityElements(estimand: str, sigma2: float, nu2: float, max_bias: float, psi_sigma2: ndarray[tuple[Any, ...], dtype[float64]], psi_nu2: ndarray[tuple[Any, ...], dtype[float64]] | None, psi_max_bias: ndarray[tuple[Any, ...], dtype[float64]] | None, riesz_representer: ndarray[tuple[Any, ...], dtype[float64]], nu2_estimator: str)[source]#

The ingredients of the bias bound for one estimand.

Parameters:
estimandstr

Alias of the estimand these elements describe.

sigma2float

\(E[(Y - \bar Q^*(A, W))^2]\), the residual outcome variance.

nu2float

\(E[\alpha(A, W)^2]\), the second moment of the Riesz representer.

max_biasfloat

\(\sqrt{\sigma^2 \nu^2}\), the bias scale. The bound multiplies it by |rho| sqrt(cf_y cf_d / (1 - cf_d)), which can exceed 1, so it is not the largest bias. The name follows DoubleML.

psi_sigma2ndarray

Influence curve of sigma2.

psi_nu2ndarray or None

Influence curve of nu2 under the doubly robust estimator: the score of Lemma 3 of Chernozhukov et al. (2026), plus the influence of the conditioning share for the ATT and the ATC. None under the plug-in estimator, whose curve no derivation in a source this package cites gives (docs/roadmap.md F26).

psi_max_biasndarray or None

Influence curve of max_bias, as in Theorem 4 of the same paper, so the bias-adjusted bounds get confidence limits rather than being treated as known constants. None under the plug-in estimator or when max_bias is zero.

riesz_representerndarray

(n,) values of \(\\alpha(A, W)\) for the targeted functional.

nu2_estimatorstr

Which estimator of nu2 produced these values.

Methods#

Attributes#

SensitivityElements.estimand: str#
SensitivityElements.sigma2: float#
SensitivityElements.nu2: float#
SensitivityElements.max_bias: float#
SensitivityElements.psi_sigma2: ndarray[tuple[Any, ...], dtype[float64]]#
SensitivityElements.psi_nu2: ndarray[tuple[Any, ...], dtype[float64]] | None#
SensitivityElements.psi_max_bias: ndarray[tuple[Any, ...], dtype[float64]] | None#
SensitivityElements.riesz_representer: ndarray[tuple[Any, ...], dtype[float64]]#
SensitivityElements.nu2_estimator: str#