Skip to content
Development documentation. The PyPI package predates these APIs. Install from GitHub instead: pip install 'increment @ git+https://github.com/kylejcaron/increment.git' Keep any extras requested by the guide, such as increment[dashboard].

Designs

Design

No docstring.

Randomized

A randomized assignment with a named control arm.

Observational

A non-randomized comparison identified via an explicit adjustment set.

Encouragement

A randomized encouragement: assignment is random, uptake is chosen.

Identifies ITT and compliance without an exclusion declaration; LATE requires it. one_sided declares control cannot take up (the estimator hard-errors on any control uptake). min_first_stage_z gates LATE emission - below it, only ITT and compliance are reported.

UptakeSpec

The binary uptake fact of an encouragement design.

fact names the uptake event (0/1 column on the dataframe path, overridable via uptake=); window_days=None means ever-took-up, else uptake freezes to the first window_days days after exposure.

ExclusionRestriction

Explicit acknowledgment that assignment moves the outcome only through uptake. Untestable from data, so it must be declared, like Observational.adjustment: assumptions stay visible, never implicit.

AdjustmentSet

Covariates declared sufficient to identify treatment effect in an observational comparison; a declaration, not a validation - callers must argue elsewhere that it satisfies conditional ignorability.

missing controls null/NaN handling: "refuse" (default) raises; "impute-indicator" pooled-mean imputes with a balanced indicator; "pattern" fits propensity per missingness pattern; "complete-case" keeps fully-observed units only; "allow" passes NaN to explicit NaN-native learners.