generate_classic_rct_26
A pre-configured classic RCT dataset with 3 binary confounders.
n=10000, split=0.5, outcome is conversion (binary). Baseline control p=0.10
and treatment p=0.11 are set on the log-odds scale (X=0), so marginal rates
and ATE can differ once covariate effects are included. Includes a
deterministic user_id column.
Parameters
- seed (
int) – Random seed. - add_pre (
bool) – Whether to generate a pre-period covariate ('y_pre') and include prognostic signal from X. - beta_y (
array - like) – Linear coefficients for confounders in the outcome model. - outcome_depends_on_x (
bool) – Whether to add default effects for confounders if beta_y is None. - include_oracle (
bool) – Whether to include oracle ground-truth columns like 'cate', 'propensity', etc. - return_causal_data (
bool) – Whether to return a CausalData object. - n (
int) – Number of samples. - split (
float) – Proportion of samples assigned to the treatment group. - outcome_params (
dict) – Binary outcome parameters, e.g. {"p": {"A": 0.10, "B": 0.11}}. - add_ancillary (
bool) – Whether to add standard ancillary columns (age, platform, etc.). - deterministic_ids (
bool) – Whether to generate deterministic user IDs. - **kwargs – Additional arguments passed to
generate_classic_rct.
Returns
CausalData or DataFrame–