causalis.data_contracts.iv_causal_data.IVCausalDataIVCausalData
Bases: causalis.data_contracts.causaldata.CausalData
Container for instrumental variables causal inference datasets.
Extends :class:CausalData with exactly one instrument column. The stored
DataFrame is restricted to outcome, treatment, instrument, confounder, and
optional user_id columns.
Attributes
- dfpd.DataFrame
DataFrame restricted to the columns used by the IV analysis.
- treatment_namestr
Column name representing the endogenous treatment variable.
- outcome_namestr
Column name representing the outcome variable.
- instruments_namesList[str]
Name of the instrument column, stored as a single-item list.
- confounders_namesList[str]
Names of the confounder columns (may be empty).
- user_id_namestr, optional
Column name representing the unique identifier for each observation/user.
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.
Canonical target
causalis.data_contracts.iv_causal_data.IVCausalData
Sections