# `causalis.data_contracts.causal_estimate`

## Module Contents

### Classes

`CausalEstimate` | Result container for causal effect estimates.

### API

class causalis.data_contracts.causal_estimate.CausalEstimate(/, **data: Any)

  Bases: `pydantic.BaseModel`

  Result container for causal effect estimates.

  Parameters

  estimand : str The estimand being estimated (e.g., ‘ATE’, ‘ATTE’, ‘CATE’). model : str The name of the model used for estimation. model_options : dict Options passed to the model. value : float The estimated absolute effect. ci_upper_absolute : float Upper bound of the absolute confidence interval. ci_lower_absolute : float Lower bound of the absolute confidence interval. value_relative : float, optional The estimated relative effect. ci_upper_relative : float, optional Upper bound of the relative confidence interval. ci_lower_relative : float, optional Lower bound of the relative confidence interval. alpha : float The significance level (e.g., 0.05). p_value : float, optional The p-value from the test. is_significant : bool Whether the result is statistically significant at alpha. n_treated : int Number of units in the treatment group. n_control : int Number of units in the control group. treatment_mean : float Mean outcome in the treatment group. control_mean : float Mean outcome in the control group. outcome : str The name of the outcome variable. treatment : str The name of the treatment variable. confounders : list of str, optional The names of the confounders used in the model. time : str The date when the estimate was created (YYYY-MM-DD). diagnostic_data : DiagnosticData, optional Additional diagnostic data_contracts.

  Initialization

  Create a new model by parsing and validating input data from keyword arguments.

  Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

  `self` is explicitly positional-only to allow `self` as a field name.

  model_config

    ‘ConfigDict(…)’

  estimand: str

    None

  model: str

    None

  model_options: Dict[str, Any]

    ‘Field(…)’

  value: float

    None

  ci_upper_absolute: float

    None

  ci_lower_absolute: float

    None

  value_relative: Optional[float]

    None

  ci_upper_relative: Optional[float]

    None

  ci_lower_relative: Optional[float]

    None

  alpha: float

    None

  p_value: Optional[float]

    None

  is_significant: bool

    None

  n_treated: int

    None

  n_control: int

    None

  treatment_mean: float

    None

  control_mean: float

    None

  outcome: str

    None

  treatment: str

    None

  confounders: List[str]

    ‘Field(…)’

  time: str

    ‘Field(…)’

  diagnostic_data: Optional[causalis.data_contracts.causal_diagnostic_data.DiagnosticData]

    None

  summary() → pandas.DataFrame

    Return a summary DataFrame of the results.

    Returns

    pd.DataFrame Summary DataFrame.