Concepts
Purpose
Give new DSAMbayes users a compact conceptual orientation before they move into tutorials, runner usage, or the workflow section.
This page is intentionally introductory. It does not try to be the full methodology guide for Bayesian MMM. For that, use Principled Bayesian Workflow.
What is DSAMbayes?
DSAMbayes is an R package for Bayesian marketing mix modelling built on Stan. It provides:
- an
lm()-style modelling interface for interactive work - model classes for single-series, hierarchical, and pooled MMM
- prior and boundary controls
- post-fit extraction, diagnostics, decomposition, and optimisation tooling
- a YAML/CLI runner for reproducible runs
The main practical difference from classical regression is that DSAMbayes works with a posterior distribution, not just a single fitted coefficient vector.
Why Bayesian MMM?
MMM datasets often have the exact features that make naive regression unstable:
- short time series
- overlapping media timing
- strong baseline structure
- uncertain functional form
- real business need for uncertainty-aware decisions
Bayesian modelling helps because it makes several things explicit:
- regularisation through priors
- structural constraints through boundaries
- uncertainty propagation into downstream outputs
- diagnostic gates rather than fit-statistic-only thinking
The DSAMbayes mental model
DSAMbayes should be thought of as a workflow, not just a fitter.
At a high level:
- specify the model and priors
- fit the model
- check whether the posterior computation is trustworthy
- check whether the fitted model is adequate for the data
- only then interpret decomposition, comparison, or optimisation outputs
That is the main philosophical shift from a simpler OLS-style workflow.
Model classes
DSAMbayes supports three main model classes.
BLM
Single-market Bayesian linear model.
Use when:
- you have one KPI series
- one market / brand / region is the modelling unit
- you want the simplest Bayesian MMM starting point
Hierarchical
Multi-group model with partial pooling.
Use when:
- you have panel data across markets, regions, or brands
- you want to borrow strength across groups while preserving group structure
Pooled
Single-market model with structured pooling across labelled media dimensions.
Use when:
- the outcome is one series
- the media structure has nested or repeated dimensions that should share information
For the detailed class contract, see Model Classes.
Interactive API vs runner
DSAMbayes has two main ways of working:
Interactive R API
Best when you want to prototype directly in R:
blm()set_prior()set_boundary()fit()get_posterior()
YAML / CLI runner
Best when you want reproducibility and staged artefacts:
validaterun- staged outputs under
results/
See Quickstart and Runner.
What this page does not try to teach
This page does not try to fully answer:
- how to choose priors
- which diagnostics matter most
- when business interpretation is allowed
Those are workflow questions, and they are handled in the dedicated methodology pages:
- What Principled Means
- Frequentist to Bayesian Translation
- Stage 2: Model and Priors
- Stage 4: Computation and Sampler
- Stage 5: Model Adequacy
Recommended next steps
- Quickstart to run the tool
- Your First BLM Model for the interactive API
- Principled Bayesian Workflow for the methodological spine