causalis.data_contracts.rct_estimates¶
Mapping of RCT outcome/arm estimates with a combined summary table.
Module Contents¶
Classes¶
Batch estimates, indexed by outcome and then active treatment arm. |
API¶
- class causalis.data_contracts.rct_estimates.RctEstimates¶
Bases:
dict[str,dict[str,causalis.data_contracts.causal_estimate.CausalEstimate]]Batch estimates, indexed by outcome and then active treatment arm.
Retains ordinary dictionary access, iteration, and items().
summarycombines the existing CausalEstimate summaries into a notebook-friendly table with one column per treatment-versus-control comparison. Values and confidence intervals use exactly the single-estimate formatting.Initialization
Initialize self. See help(type(self)) for accurate signature.
- summary(outcome: str | None = None, treatment: str | None = None) pandas.DataFrame¶
Summarize one outcome or all outcomes, optionally selecting an arm.
Rows are the fields from CausalEstimate.summary(). When
outcomeis specified, columns are comparison labels, e.g.variant_a vs control. Otherwise columns have two levels: outcome and comparison. Binary treatment comparisons use<treatment>=1 vs <treatment>=0. Unknown selectors raise ValueError. The returned table is independent of the stored estimates; no model fitting or inference is repeated.