CATE¶
- class pqp.identification.CATE(outcome, treatment_condition, control_condition, subpopulation)¶
Bases:
ATE
Causal estimand for the conditional average treatment effect
To define the conditional average treatment effect, it’s necessary to specify what is meant by treatment and control in this context, and you need to specify the subpopulation in which to measure the effect. You can do this by passing either a
dict
or a list ofStatisticalEvent
objects to each of thetreatment_condition
andcontrol_condition
arguments. If adict
is passed, the keys must beVariable
orstring
, and the values must not beVariable
. If alist
is passed, it must contain only instances ofStatisticalEvent
.Example
>>> # treatment condition is x = 1, control condition is x = 0 in both of these >> # in both, we are measuring the effect in the subpopulation where z = 1 >>> CATE(outcome, treatment_condition={"x": 1}, control_condition={"x": 0}, subpopulation={"z": 1}) >>> CATE( ... outcome, ... treatment_condition=[EqualityEvent("x", 1)], ... control_condition=[EqualityEvent("x", 0)], ... subpopulation=[EqualityEvent("z", 1)] ... ) >>> >>> # treatment condition is x = 1 and y = "red", control condition is x = 0 and y = "blue" >>> # we are measuring the effect in the subpopulation where z = 1 >>> CATE( ... outcome, ... treatment_condition={"x": 1, y: "red"}, ... control_condition={"x": 0, y: "blue"}, ... subpopulation={"z": 1} ... )
- Parameters:
outcome (
Variable
) – the outcome variabletreatment_condition (
dict
orlist
) – the treatment conditioncontrol_condition (
dict
orlist
) – the control conditionsubpopulation (
dict
orlist
) – the subpopulation in which to measure the effect
Methods Summary
Derive the expression for the causal estimand
Methods Documentation
- expression()¶
Derive the expression for the causal estimand
- Returns:
the expression for the causal estimand
- Return type:
AbstractExpression