Skip to content

Explanation: Model Components

This page explains how AMMM decomposes the KPI into baseline, media, and control components, and how uncertainty propagates through those components.

AMMM uses an additive decomposition on the linear predictor:

$$ y_t = \mu_t + \varepsilon_t, \qquad \mu_t = b_t + \sum_{m=1}^{M} c_{m,t} + \sum_{k=1}^{K} u_{k,t} $$

Where:

  • $b_t$ is baseline structure (intercept plus configured baseline controls).
  • $c_{m,t}$ is channel $m$ contribution.
  • $u_{k,t}$ is non-media control contribution.

A useful media pipeline representation is:

$$ c_{m,t} = \beta_m,\mathrm{Sat}!\left(\mathrm{Adstock}(x_{m,t};\alpha_m);\lambda_m\right) $$

In V2 terminology, key posterior parameters include beta_channel, alpha, and lam.

Baseline captures expected KPI variation not attributed to paid media in that model specification. Depending on configuration, this may include:

  • intercept,
  • explicit controls (for example competitor, events, price, distribution),
  • optional seasonal/trend controls (including Prophet-derived components if enabled).

Interpret baseline as model-conditional: changing controls changes what is counted as baseline versus media.

Each channel contribution combines:

  1. Carryover (adstock): lagged persistence of media effect.
  2. Saturation: diminishing marginal returns at higher spend.
  3. Channel coefficient: scale of incremental response.

This structure supports spend-response curves used later in 60_response_curves/ and 70_optimisation/.

Control effects enter linearly through coefficients on extra_features_cols. They absorb variation that is not intended to be attributed to media.

Controls improve attribution only when they are conceptually justified and measured reliably. Poor controls can shift bias rather than remove it.

For a coherent decomposition, components should reconstruct model predictions:

$$ \hat{\mu}t \approx \hat{b}t + \sum_m \hat{c}{m,t} + \sum_k \hat{u}{k,t} $$

In practice, AMMM decomposition artefacts are built to satisfy this identity up to numerical tolerance.

Component estimates are posterior quantities, not fixed numbers. Interpretation should use posterior summaries (typically 94% HDI) rather than point estimates alone.

This applies to:

  • channel effects,
  • decomposition shares,
  • ROI and response curves,
  • optimisation outcomes built from fitted response surfaces.
ArtefactStage folderPurpose
20_model_fit/model_summary.csv20_model_fit/Posterior summaries (including HDI, ESS, R-hat).
20_model_fit/model_trace.png20_model_fit/Chain behaviour and mixing diagnostics.
40_decomposition/all_decomp.csv40_decomposition/Time-indexed component decomposition.
40_decomposition/waterfall_plot_components_decomposition.png40_decomposition/Component add-up visualisation for average prediction.
40_decomposition/waterfall_decomposition_data.csv40_decomposition/Tabular data behind the waterfall view.

Related reading: