cleverly.sensitivity.EValue#
- class cleverly.sensitivity.EValue(estimand: str, scale: str, risk_ratio: float, risk_ratio_ci: tuple[float, float], point: float, limit: float, approximate: bool, note: str = '', source_estimand: str | None = None, truncated_bound: float | None = None, support: Support = Support(label='experimental', reason='This estimate was built outside a classified fit.', evidence=(), row=None, limits=()))[source]#
E-values for a point estimate and the confidence limit nearest the null.
- Parameters:
- estimand
str Alias of the estimand this row describes.
- scale
str Scale the estimate was reported on before conversion.
- risk_ratio
float The estimate expressed as a risk ratio.
- risk_ratio_ci
tupleoffloat That ratio’s confidence interval. A converted lower bound below zero is outside the risk-ratio parameter space. The report truncates it at zero, records the untruncated value in
truncated_bound, and says so innote.- point
float Equal-strength threshold for the confounder’s treatment and outcome associations on the risk-ratio scale to explain the point estimate away. Unequal association strengths can trade off.
- limit
float The equal-strength threshold to move the confidence limit to the null.
- approximatebool
Whether reaching the risk-ratio scale needed an approximate conversion.
- note
str Explanation of that conversion, when one was used.
- source_estimand
strorNone Reported source alias, which can differ from a derived output alias.
- truncated_bound
floatorNone The converted lower bound before truncation, when the report truncated one.
Nonewhenrisk_ratio_cireports the conversion unchanged.- support
Support The support of the source estimate, combined with the derived ratio’s when the row derives one. An E-value built outside a classified fit is experimental.
- estimand
Methods#
- EValue.summary() str[source]#
Return a printable summary.
- Returns:
strA printable report, one line per reported quantity.
- EValue.to_dict() dict[str, float | str | bool | None][source]#
Return a JSON-compatible representation.
truncated_boundcarries the untruncated lower bound, so a caller who reads only this mapping still sees thatrr_ci_loweris a boundary value rather than a converted confidence limit.- Returns:
dictA JSON-compatible mapping of every reported field.
Attributes#
- EValue.support: Support = Support(label='experimental', reason='This estimate was built outside a classified fit.', evidence=(), row=None, limits=())#