ehrapy.tools.CausalEstimate#

class ehrapy.tools.CausalEstimate(method, treatment, outcome, value, se=None, ci_lower=None, ci_upper=None, n=None, params=<factory>)[source]#

Result of a causal effect estimation.

Attributes table#

ci_lower

Lower bound of the (typically 95%) confidence interval, when available.

ci_upper

Upper bound of the (typically 95%) confidence interval, when available.

n

Number of observations used to compute the estimate.

se

Standard error of the estimate, when available.

method

Name of the estimator that produced this estimate.

treatment

Treatment variable name.

outcome

Outcome variable name.

value

Point estimate of the average treatment effect (ATE).

params

Estimator-specific metadata such as fitted propensity scores or effective sample size.

Methods table#

summary()

Return a multi-line human-readable summary of the estimate.

Attributes#

CausalEstimate.ci_lower: float | None = None#

Lower bound of the (typically 95%) confidence interval, when available.

CausalEstimate.ci_upper: float | None = None#

Upper bound of the (typically 95%) confidence interval, when available.

CausalEstimate.n: int | None = None#

Number of observations used to compute the estimate.

CausalEstimate.se: float | None = None#

Standard error of the estimate, when available.

CausalEstimate.method: str#

Name of the estimator that produced this estimate.

CausalEstimate.treatment: str#

Treatment variable name.

CausalEstimate.outcome: str#

Outcome variable name.

CausalEstimate.value: float#

Point estimate of the average treatment effect (ATE).

CausalEstimate.params: dict[str, Any]#

Estimator-specific metadata such as fitted propensity scores or effective sample size.

Methods#

CausalEstimate.summary()[source]#

Return a multi-line human-readable summary of the estimate.

Return type:

str