MMM.effective_carryover_lags#

MMM.effective_carryover_lags()[source]#

Periods over which a change in spend can still move the response.

The model’s own adstock.l_max bounds the direct path, but an effect that chains a further adstock behind it – a funnel mediator, say – keeps moving for longer, and declares how much longer through incrementality_spec().additional_carryover_lags. That declaration already sizes the incrementality module’s evaluation windows; sizing the optimization window from l_max alone truncates the same tail, so the objective undercounts the carry-over every plan produces.

Declarations only, never a probe: this runs at model-build time, where measuring reach is neither available nor affordable. An effect that declares nothing contributes nothing, which reproduces the previous behaviour rather than guessing on its behalf.

An effect that returns None to opt out is skipped. Anything an effect’s incrementality_spec raises propagates: it means the effect cannot answer a question about itself, and sizing the window from a swallowed error would truncate the tail exactly as before, with nothing to show why.

Returns:
int

adstock.l_max plus the widest additional carryover declared by any registered effect.