cleverly.datasets.make_binary_outcome#
- cleverly.datasets.make_binary_outcome(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 known risks, risk ratio and odds ratio.
Note that the marginal risk ratio reported in
truthis the marginal one – a ratio of standardised risks – not the conditional odds ratio in the structural logistic model. They differ, and conflating them is a common source of apparent “bias” that is really a different estimand.- Parameters:
- Returns: