Explanation: Model Components
This page explains how AMMM decomposes the KPI into baseline, media, and control components, and how uncertainty propagates through those components.
Component Identity
Section titled “Component Identity”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 Contribution
Section titled “Baseline Contribution”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.
Media Contribution
Section titled “Media Contribution”Each channel contribution combines:
- Carryover (adstock): lagged persistence of media effect.
- Saturation: diminishing marginal returns at higher spend.
- Channel coefficient: scale of incremental response.
This structure supports spend-response curves used later in 60_response_curves/ and 70_optimisation/.
Control Variable Contribution
Section titled “Control Variable Contribution”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.
Reconstruction Identity
Section titled “Reconstruction Identity”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.
Uncertainty Propagation
Section titled “Uncertainty Propagation”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.
Key Artefacts (V2)
Section titled “Key Artefacts (V2)”| Artefact | Stage folder | Purpose |
|---|---|---|
20_model_fit/model_summary.csv | 20_model_fit/ | Posterior summaries (including HDI, ESS, R-hat). |
20_model_fit/model_trace.png | 20_model_fit/ | Chain behaviour and mixing diagnostics. |
40_decomposition/all_decomp.csv | 40_decomposition/ | Time-indexed component decomposition. |
40_decomposition/waterfall_plot_components_decomposition.png | 40_decomposition/ | Component add-up visualisation for average prediction. |
40_decomposition/waterfall_decomposition_data.csv | 40_decomposition/ | Tabular data behind the waterfall view. |
Related reading: