cleverly.RegimeContrast#
- class cleverly.RegimeContrast(regimens: Any, reference: str | None = None, horizons: Sequence[int] | None = None)[source]#
Compare each declared regimen against one reference regimen.
- Parameters:
- regimens
Any Point-treatment interventions or longitudinal regimens. On a point-treatment design, a sequence of treatment levels and regimes, such as
(0, Static(1)).CausalStudy.identifyrefuses aShiftor anIncrementalhere.- reference
strorNone Reference regimen label.
Noneuses the first regimen.- horizonssequence
ofintorNone Follow-up times to report for a longitudinal outcome.
- regimens
See also
RegimeMeanThe regimen means this contrast is taken between.
ATEThe same comparison when treatment is given once.
cleverly.LongitudinalTreatmentThe design a regimen is declared against.
Examples
Two static longitudinal regimens, compared against never treating:
>>> from cleverly import RegimeContrast >>> estimand = RegimeContrast( ... regimens={"always": 1, "never": 0}, reference="never" ... ) >>> estimand.reference 'never'