The marketing mix modeling library

Everything I'd want a new marketing scientist to read, use and download: how MMM works, how to check it, how to turn it into a budget decision, and an honest look at every library and vendor.

Mike Taylor By Mike Taylor · 61 guides · 53 free downloads

Marketing mix modeling (MMM) is a statistical model of how your sales respond to marketing and everything else going on in the business, used to decide where the next dollar of budget should go. It's an old technique that has come back into fashion because it doesn't need to track individual users, which matters a lot more since Apple, the browsers and the regulators made user-level tracking unreliable. I've built these models for companies like Monzo Bank, Booking.com and The AA, and I've taught the method to a lot of marketers, and in my experience the hard part is rarely the regression. It's knowing which question you're asking, whether the data can answer it, and how much to trust the answer.

This library is organised around that. Every guide has something you can use: a calculator, a simulator you can break, a template, a dataset or working code. The numbers in the widgets are invented or yours, and each page says which. If you're new to the topic, the reading path below is the order I'd go in.

Start here

Ten guides, in order, that take you from "what is this?" to a budget recommendation you can defend.

  1. Step 1 What is MMM? Marketing mix modeling estimates how much each marketing channel, and everything else that moves sales, contributed to your results, using only aggregate data over time. Here's how it works end to end, with a model you can fit in your browser.
  2. Step 2 Incrementality Every impact claim has a missing half: what would have happened anyway. Here's how to define incrementality, calculate iROAS, and see why the ad platform's number is usually the optimistic one.
  3. Step 3 Measurement plan The most expensive mistake in marketing mix modeling happens before any data is pulled: nobody agreed what decision the model is for. A one-page brief and a simple measurement plan fix that.
  4. Step 4 Data requirements Most marketing mix models fail at the data, not the maths. Here's what to collect, how much history is enough, why spend variation matters more than row count, and how to audit a messy handoff before you fit anything.
  5. Step 5 Adstock Adstock is how a marketing mix model lets this week's ads keep working next week. The idea is simple; the conventions, the shapes and the estimation are where people trip up.
  6. Step 6 Saturation curves A saturation curve is how a marketing mix model says that spend has diminishing returns. The family you pick and the range of spend you've actually observed decide more of your budget recommendation than most people realize.
  7. Step 7 Model validation A marketing mix model that fits last year's sales beautifully can still give you the wrong budget. Validation means checking prediction, stability and causal credibility separately, because they fail separately.
  8. Step 8 MMM calibration A lift test is the best evidence you'll get about one channel, and a marketing mix model is the best view you'll get of all of them. Calibration is how you combine the two without letting a precise answer to the wrong question take over.
  9. Step 9 Budget allocation A budget allocator moves money to wherever the next dollar buys the most. The maths is the easy part; the hard part is knowing which curves and constraints to trust.
  10. Step 10 Presenting results Most MMM readouts end with a decomposition chart and a table of ROIs, and then nothing happens. A useful presentation leads with the decision, shows the range, and tells people exactly what would make you change your mind.

Foundations

What marketing mix modeling is, what it is for, and how it compares with the other ways of measuring marketing.

What is MMM? Marketing mix modeling (MMM) uses regression on weekly sales and spend to estimate what each channel adds. How it works, what you get, its limits, how to start. Includes: CSV Media mix modeling Media mix modeling is marketing mix modeling focused on paid media. What the two terms mean, where each is used, and why a media-only model can overstate ROI. MMM example A worked marketing mix modeling example: write the brief, audit messy weekly data, challenge the model review, compute the economics, write the decision memo. Includes: ZIP History of MMM The history of marketing mix modeling: Borden's marketing mix, early lag models, Broadbent's adstock, scanner data, Google's 2017 papers, Robyn and Meridian. MMM vs attribution How multi-touch attribution works (last click to Shapley and Markov), what ATT and cookie loss broke, how MMM differs, and how to use both with experiments. Includes: XLSX Measurement framework A practical marketing measurement framework: which decisions need MMM, experiments, attribution or brand tracking, plus cadence, owners and disagreements. Includes: XLSX Marketing econometrics Econometric modeling in marketing explained: time series regression, stationarity, autocorrelation, log-log elasticities, and how it relates to Bayesian MMM. Includes: PY, CSV Causal inference Causal inference for marketers in plain English: counterfactuals, confounding, reverse causality, experiments, DAGs and where marketing mix modeling fits. Includes: PY Data requirements Marketing mix modeling data: the outcome, media and control variables you need, weekly vs daily, how much history is enough and why variation matters. Includes: XLSX, ZIP, CSV

How the model works

Adstock, saturation, baselines, priors and the regression underneath, with the maths you can play with.

Confounding variables Confounding variables in marketing mix models: omitted variable bias, endogeneity, and how to choose controls by causal role, with an interactive causal graph. Includes: XLSX, CSV Multicollinearity Multicollinearity in marketing mix models: why correlated channels give a great fit but unstable ROIs, how to check VIF and condition numbers, and the fixes. Includes: PY, CSV Ridge regression Ridge regression for marketing mix models: the objective, why standardization matters, how Robyn picks lambda, the bias-variance trade-off, and its limits. Includes: IPYNB, CSV Adstock What adstock is, the geometric adstock formula (two conventions), half-life, delayed and Weibull adstock, how to estimate decay, plus a free Excel calculator. Includes: XLSX, PY, CSV Saturation curves What a saturation curve is, how the Hill function works (half-saturation and shape), logistic and exponential alternatives, and marginal vs average return. Reach and frequency What reach and frequency mean, where effective frequency and the three-exposure rule came from, reach curves, frequency caps, and how Meridian models R&F. Base sales What base sales are, how baseline vs incremental sales are split in marketing mix modeling and retail promotion analysis, and why base is not organic. Bayesian MMM Bayesian MMM explained: priors, likelihood and posterior for channel ROI, MCMC, credible intervals, prior predictive checks, experiment priors and geo models. Model validation How to validate a marketing mix model: in-sample vs holdout error, rolling-origin cross-validation, MAPE, NRMSE, DECOMP.RSSD, R², stability and experiments. Includes: CSV Model diagnostics MMM model diagnostics in practice: residuals over time, autocorrelation, Durbin-Watson, heteroskedasticity, structural breaks and outliers, and what each means.

Experiments and incrementality

Geo tests, holdouts, lift studies and the statistics you need to design them and calibrate a model with them.

Incrementality Incrementality is the share of sales that would not have happened without your marketing. Learn incremental lift, iROAS, and why platform ROAS overstates. Includes: XLSX Incrementality testing Incrementality testing compares a group that sees your marketing with one that doesn't. Pick a test type, design the holdout and read lift and iROAS honestly. Includes: XLSX, MD Lift studies A brand lift study surveys exposed and control groups; a conversion lift study counts their sales. How Meta and Google run them, ITT vs TOT, and their limits. Includes: MD MMM calibration MMM calibration uses lift test results to constrain a marketing mix model. How Robyn, Meridian and PyMC-Marketing do it, and how to match a test to the model. Includes: PY, CSV Geo lift testing How geo lift tests work: randomized vs matched markets, pre-periods, synthetic control and DiD, Meta's GeoLift R package, Google's methods and test design. Includes: CSV, PY Difference in differences Difference in differences for marketers: the formula, parallel trends, event-study plots, staggered rollouts, and a calculator for geo tests and launches. Includes: PY, CSV Synthetic control The synthetic control method explained: donor weights, pre-period fit, placebo tests, augmented synthetic control in GeoLift, and how CausalImpact compares. Includes: PY Statistical power Power analysis and sample size calculator for A/B and geo tests: statistical power, minimum detectable effect, and why a null result needs a precision story. Includes: XLSX

From model to decision

Budget allocation, marginal returns, profit, scenarios and how to tell a CFO what the model says.

Open-source libraries and code

Robyn, Meridian, PyMC-Marketing and the rest, plus Excel, Python and R walkthroughs you can run.

Robyn Meta's Robyn MMM explained: ridge regression, Nevergrad search, NRMSE vs DECOMP.RSSD Pareto fronts, calibration, the budget allocator and an R walkthrough. Includes: R, CSV Google Meridian Google Meridian explained: the Bayesian geo-level model, ROI priors, reach and frequency, calibration, the budget optimizer, and a tested Python tutorial. Includes: PY, CSV PyMC-Marketing PyMC-Marketing explained: the 1.x MMM class, adstock and saturation defaults, lift-test calibration, budget optimization and a tested Python example. Includes: PY, CSV LightweightMMM LightweightMMM was Google's Bayesian MMM library in Python. It's now archived. How its models worked, the deprecation timeline, and a map to Meridian. Includes: PY, CSV Open-source MMM libraries Open source MMM tools compared as of October 2026: Robyn, Meridian, PyMC-Marketing, Orbit, LightweightMMM and the geo-test libraries, with a picker. Includes: CSV MMM in Python Marketing mix modeling in Python from scratch: adstock, Hill saturation, OLS, decomposition, ROI, response curves and budget reallocation, with a notebook. Includes: IPYNB, PY, CSV MMM in Excel How to build a marketing mix model in Excel or Google Sheets with adstock, LINEST, decomposition, ROI, response curves and Solver. Free working template. Includes: XLSX, CSV MMM in R How to build a marketing mix model in R with base R: adstock via stats::filter, Hill saturation, lm, optim for the parameters, ROI and budget. Free R script. Includes: R, CSV AI and MMM AI marketing mix modeling in October 2026: which MMM vendors ship LLM agents and MCP servers, where they help, where they fail, and how to review them. Includes: MD

Vendors and platforms

The companies selling MMM, incrementality testing and attribution, and how to choose between them.

Research and reading

The papers, books and ideas the field is built on, explained for people who have to use them.

MMM books The best marketing mix modeling books, annotated: market response models, how advertising works, Bayesian statistics and causal inference, with a path by role. MMM research papers The marketing mix modeling papers worth reading, from Broadbent's adstock to Google's Bayesian MMM series and 2026 work, each summarized with a verified link. Includes: BIB, CSV Jin et al. (2017) Jin et al. (2017), Google's Bayesian methods for media mix modeling with carryover and shape effects: delayed adstock, Hill curves, ROAS, priors and data needs. Includes: CSV, PY Chan & Perry (2017) Chan and Perry's 2017 Google paper on the challenges and opportunities in media mix modeling: thin data, selection bias, model uncertainty and the fixes. Includes: ZIP Geo-level hierarchical MMM Sun et al.'s 2017 paper on geo-level Bayesian hierarchical media mix modeling explained: why regional data helps, how partial pooling works and what it found. Includes: CSV Lewis & Rao (2015) Lewis and Rao's 2015 QJE paper on 25 ad experiments shows why ROI is so hard to measure: sales noise swamps ad effects. Calculate the sample size you'd need. Includes: XLSX Facebook RCTs vs observational Gordon, Zettelmeyer and colleagues compared Facebook lift experiments with observational methods. Why matching and ML overstate ad lift, and what to do. Includes: PY The Long and the Short of It The Long and the Short of It by Binet and Field (IPA, 2013): brand vs activation, the 60:40 rule and its refinements, excess share of voice and what MMM misses. Includes: XLSX

Templates, data and practice

Datasets, glossaries, interview questions, courses and templates to download.

Free downloads

Templates, datasets, notebooks and scripts from across the library. All free, no email required.

csv MMM practice dataset (104 weeks, CSV) Synthetic weekly revenue, search, social and video spend and a promotion flag. The same data the in-page model fits. From: What is MMM? zip Northstar decision pack (zip) Brief, data dictionary, messy weekly inputs, source corrections, planning evidence, model review cards, memo template, rubric and answer key with a verification script. From: MMM example xlsx Attribution model comparison (Excel) Paste your own journey paths and see last click, first click, linear, time decay and position-based credit side by side, plus an incremental view. Live formulas, no macros. From: MMM vs attribution xlsx Measurement evidence register (Excel) Evidence register, disagreement log with automatic flags, a decision map and a 12-month cadence calendar. Example rows are invented. From: Measurement framework py Spurious regression check (Python) Reproduces the Granger and Newbold experiment, then screens your own weekly CSV for trending columns and relationships that vanish when you difference them. numpy only. From: Marketing econometrics py Confounding simulation (Python) Simulates demand-driven spend and compares naive, season-adjusted and randomized estimates of a known ad effect. numpy only. From: Causal inference xlsx MMM control variable audit (Excel) Answer four yes/no questions per candidate control; formulas suggest its causal role and whether to include it. From: Confounding variables py Multicollinearity check (Python) Correlation matrix, VIF and condition number for any CSV of model inputs; defaults to the practice dataset. From: Multicollinearity ipynb Ridge regression MMM notebook (Jupyter) numpy-only ridge MMM on the practice CSV: standardization, ridge trace, time-series cross-validation and OLS vs ridge contributions. From: Ridge regression xlsx Adstock calculator (Excel) Geometric (both conventions), delayed and Weibull CDF/PDF adstock on your own spend, with live formulas, half-life helpers and charts. No macros. From: Adstock py Adstock grid search (Python) Shows the raw practice data picks zero carryover, then plants a known one and tests how well a grid search recovers it. From: Adstock csv Holdout model comparison dataset (CSV) 32 invented observations with a train/holdout split, the known signal, and degree-3 and degree-14 predictions. From: Model validation xlsx MMM data template (Excel) Weekly data sheet with validation, a data dictionary, and a live audit: missing, duplicate and non-Monday weeks, blanks, zero-spend weeks, CV per channel, correlation matrix and rows per parameter. From: Data requirements xlsx Incrementality calculator (Excel) Platform ROAS vs iROAS from a holdout test, with a 95% interval, an incrementality factor and a chart. Live formulas, no macros. From: Incrementality xlsx Lift test results calculator (Excel) Relative lift with an interval, p-value, incremental conversions and iROAS with intervals. Live formulas, adjustable confidence level. From: Incrementality testing md Incrementality test brief (template) One-page brief to fill in before launch: decision, estimand, design, threats, and what you'll do with each possible result. From: Incrementality testing md Lift study readout (template) One page to record any Meta or Google lift study: what was compared, ITT or TOT, intervals, incrementality factor and the decision. From: Lift studies py Calibration inputs script (Python) Turns one lift test into a Robyn calibration_input row, a PyMC-Marketing lift test row and a Meridian LogNormal ROI prior, and compares it with your MMM. Runs on the practice CSV. From: MMM calibration csv Geo experiment dataset (CSV) 12 invented regions, six matched pairs, four weeks pre and four post, with answer-key columns for the media effect and a local promotion. From: Geo lift testing py Geo test analysis script (Python) Reproduces the before/after, difference-in-differences and known-effect answers, the pair-level check and a fixed-effects regression. pandas and numpy only. From: Geo lift testing py DiD and event-study script (Python) 2x2 DiD, two-way fixed effects with region-clustered standard errors, and an event-study regression. Runs on the geo dataset or your own panel. From: Difference in differences py Synthetic control script (Python) Constrained least squares weights (the same solver as the widget), lift estimate, equal-weight DiD comparison and a placebo-in-space test. Runs on a seeded example or your own wide CSV. From: Synthetic control xlsx Power and sample size calculator (Excel) Conversion-rate and geo test sheets with live formulas, an MDE-by-regions-and-weeks table and power curve charts. No macros. From: Statistical power xlsx Breakeven ROAS & contribution margin calculator (Excel) Unit economics to contribution margin, breakeven ROAS and CPA, target ROAS, and a profit-vs-spend table and chart. Live formulas, no macros. From: Breakeven ROAS xlsx Scenario and sensitivity workbook (Excel) Northstar's curves with live formulas: plan × multiplier × margin grid, one-at-a-time sensitivity table and a tornado-style chart. From: Scenario planning docx MMM decision memo template (Word) Seven-section memo with a review rubric and review conversation. Fill in the blanks, delete the hints. From: Presenting results md MMM decision memo template (Markdown) The same template as plain Markdown, for Notion, Google Docs, GitHub or a model repo. From: Presenting results docx MMM brief template (Word) The one-sentence brief plus ten sections with prompts, examples and a sign-off table. From: Measurement plan md MMM brief template (Markdown) The same brief as plain Markdown for Notion, Google Docs or a repository. From: Measurement plan xlsx Measurement plan template (Excel) Questions × methods × owner × cadence × decision threshold, with a method dropdown, overdue flags, an evidence register and a summary. From: Measurement plan xlsx Price elasticity calculator (Excel) Paste price and quantity; live SLOPE/STEYX formulas give the log-log elasticity, 95% CI, optimal price and a contribution curve. From: Price elasticity r Robyn quickstart script for the practice data (R) robyn_inputs, hyperparameters, robyn_run, robyn_outputs and robyn_allocator on the 104-week practice CSV. Written against Robyn 3.12.1's demo and source. From: Robyn py Meridian quickstart on the practice data (Python) National Meridian model with custom ROI priors, r-hat check, media summary and budget optimization. Tested with google-meridian 2.1.0 on CPU. From: Google Meridian py PyMC-Marketing quickstart on the practice data (Python) MMM with GeometricAdstock and LogisticSaturation, posterior media parameters, ROAS and a bounded budget optimization. Tested with pymc-marketing 1.3.0 on CPU. From: PyMC-Marketing ipynb MMM Python tutorial notebook The whole tutorial as a Jupyter notebook, already executed so you can compare your outputs. From: MMM in Python py MMM Python tutorial script The same code as one .py file with # %% cells for VS Code or Jupyter. From: MMM in Python xlsx MMM Excel template Live-formula MMM on the practice data: inputs, adstock, Hill saturation, LINEST, decomposition chart, ROI, response curves and a Solver-ready reallocation. From: MMM in Excel r MMM R tutorial script Base R only. Load and audit, adstock, Hill saturation, lm, optim, decomposition, ROI, response curves, reallocation and a holdout check. From: MMM in R csv MMM vendor directory, October 2026 (CSV) All 30 vendors with type, method, experiments, pricing, best fit, status and the source URL checked. From: MMM software xlsx MMM vendor evaluation scorecard (Excel) 17 questions to ask in a demo or RFP, weights you set, scores for three vendors, red flags and a chart. Live formulas. From: MMM software md First incrementality test plan (Markdown) Decision, route, design, power, risks and readout: the six sections to fill in before launching your first test. From: Incrementality testing tools csv DTC attribution tools feature matrix (CSV) Nine tools by ten features, with what each calls its MMM and the detail behind every cell. Checked 24 October 2026. From: Attribution tools vs MMM xlsx MMM build vs buy TCO workbook (Excel) The calculator's model with live formulas: inputs, cost per year for five years, a summary and a stacked chart. From: MMM cost: build vs buy md MMM prompt library (Markdown) The eight prompts from this page with placeholders for your business, outcome, channels and data. From: AI and MMM csv MMM interview questions (CSV for Anki or Quizlet) All 43 questions and model answers with categories, ready to import into a flashcard app. From: Interview questions bib MMM research bibliography (BibTeX) All 30 entries for Zotero, Mendeley or LaTeX, with links. From: MMM research papers csv MMM research bibliography (CSV) Authors, year, venue, link, topic tags, start-here flag, summary and why it matters. From: MMM research papers csv Jin et al. transforms, weekly series (CSV from the widget) The default 4-week burst run through delayed adstock and Hill in both orders. From: Jin et al. (2017) py Jin et al. (2017) transforms in Python Delayed and geometric adstock, Hill, both orders, and ROAS/mROAS by the paper's definitions, run on the practice CSV. From: Jin et al. (2017) xlsx Ad ROI experiment sample size calculator (Excel) Lewis and Rao's signal-to-noise arithmetic for your own numbers: lift needed, R², users per arm vs zero and vs a threshold, power at your audience size, and a log-scale curve. Live formulas. From: Lewis & Rao (2015) py Selection bias simulation (Python) Simulates test and control users with targeted ad delivery and compares the RCT lift with exposed vs unexposed and stratified propensity score matching. numpy only; runs in a few seconds. From: Facebook RCTs vs observational xlsx Share of voice and ESOV planner (Excel) SOV, ESOV, implied share change, spend to hold or grow share, a five-year projection and a brand/activation split check against the IPA benchmarks. Live formulas. From: The Long and the Short of It csv Northstar messy weekly inputs (CSV) The Northstar handoff file on its own, with four planted data problems to find before modeling. From: MMM datasets
Learn MMM by doing itThe Vexpower course walks through thirty lessons on one invented brand, with simulators, Python labs and a decision case you can defend.
See the course