EventAdditiveEffect.incrementality_spec#
- EventAdditiveEffect.incrementality_spec()[source]#
Opt this effect in to spend-counterfactual incrementality analysis.
Incrementalityperturbschannel_dataand reads the resulting change in the linear predictor. An effect that depends onchannel_data– a funnel mediator, say – carries part of that change, and is only included in the increment if it returns a spec here.The default returns
None, which is correct for every effect whose contribution does not depend onchannel_data: such an effect belongs to the baseline, is unaffected by the counterfactual, and is skipped without ever consulting this method. An effect that does depend onchannel_dataand returnsNoneraisesNotImplementedErrorrather than being silently dropped from the increment.Opting in costs one line –
return IncrementalitySpec()– because the spec’s fields are overrides for quantities that are otherwise measured from the graph.- Returns:
IncrementalitySpecorNoneNoneto opt out.
See also
IncrementalitySpecWhat has to be declared, and why.