cleverly.datasets.make_missing_outcome_binary#

cleverly.datasets.make_missing_outcome_binary(n: int = 1000, *, seed: int | Generator | None = None, backend: Literal['pandas', 'polars'] | str | None = None) → tuple[Any, dict[str, float]][source]#

A binary outcome with outcomes missing at random given (A, W).

Parameters:
nint

Number of observations.

seedint, Generator, or None

Seed or NumPy random generator.

backend{“pandas”, “polars”, “pyarrow”} or None, default=None

Dataframe backend. None uses pandas when installed, then the first available backend.

Returns:
dataframe

Simulated observations with a binary outcome that holds missing values.

truthdict of str to float

Exact causal parameters for the data-generating process.