Open-Source MMM Compared: Meridian, Robyn, PyMC-Marketing
A plain-language comparison of Google Meridian, Meta Robyn and PyMC-Marketing — plus the exact data you need before you run your first model.

If you want to run marketing mix modelling (MMM) — statistical modelling that estimates how much each marketing channel contributed to sales — without paying a vendor, there are three serious open-source options: Google Meridian, Meta Robyn and PyMC-Marketing. Meridian is the sensible default if you have geo-level data and spend heavily on search and video; Robyn gets you to a first answer fastest if your team works in R; PyMC-Marketing is the most flexible if you have a Python analyst comfortable with Bayesian statistics.
All three are free to download under permissive licences. The real cost is the two to three years of clean weekly data you need before any of them will tell you anything you can act on.
What MMM actually does (and what it doesn’t)
MMM looks at your weekly history — spend, impressions, price, promotions, seasonality, sales — and estimates how much of your sales each input drove. It does this without cookies, user IDs or any tracking, which is why it came back into fashion after Apple’s App Tracking Transparency and the slow decay of third-party cookies.
Two ideas do most of the work. Adstock (or carryover) says an ad seen this week can still cause a purchase in two weeks. Saturation says the tenth crore of spend on a channel buys less than the first. Every tool here models both.
What MMM does not do: tell you which creative won, attribute a specific order, or work on a channel you have never varied. If you spent the same ₹5 lakh a month on radio for three years, no model on earth can tell you what radio does.
The three tools at a glance
| Google Meridian | Meta Robyn | PyMC-Marketing | |
|---|---|---|---|
| Maintainer | Meta | PyMC Labs + open-source community | |
| Language | Python (TensorFlow Probability) | R (Python version in early development) | Python (PyMC) |
| Method | Bayesian hierarchical regression, MCMC sampling | Ridge regression with evolutionary hyperparameter search (Nevergrad) | Bayesian regression, fully configurable priors |
| Geo-level modelling | Built in and encouraged | Possible, but the default is national | Supported, you configure it |
| Experiment calibration | Yes — priors set from lift tests | Yes — calibration against experiment results | Yes — lift-test likelihood |
| Budget optimiser | Included | Included | Included |
| Typical run time | Minutes to hours; a GPU helps a lot | Minutes to a couple of hours (it fits thousands of candidate models) | Minutes to hours, depending on model size |
| Learning curve | Medium-high | Medium | High |
| Best for | Teams with regional data and heavy search/video spend | R shops that want a fast, opinionated first model | Teams that need to bend the model to an unusual business |
Documentation lives at developers.google.com/meridian, facebookexperimental.github.io/Robyn and pymc-marketing.io. Before you commit to any of them, open the GitHub repository and check the recent commit activity — open-source projects change pace, and you do not want to build a quarterly reporting habit on something that stopped moving.
Google Meridian
Meridian is Google’s replacement for its older LightweightMMM library, and it is built around two assumptions: that you have geo-level data, and that you care about channels where reach and frequency matter (YouTube, connected TV, display).
The geo-level part is the genuinely useful bit. If you can split spend and sales across 15 Indian states instead of one national line, a model with 150 weeks of history suddenly has far more variation to learn from. Meridian’s hierarchical structure lets each region have its own effect while borrowing strength from the national average — so a small market like the North East doesn’t produce a wild, unusable estimate.
Meridian also lets you feed in search query volume as a control variable and set priors directly from incrementality experiments. If you have run a geo lift test on YouTube, you can tell the model what that test found instead of hoping the regression rediscovers it.
The catch: it is a Bayesian model with real statistical choices to make, and the defaults will not suit every business. Budget a week of an analyst’s time just to understand the priors.
Meta Robyn
Robyn takes a different route. Instead of one Bayesian model, it fits thousands of ridge regressions with different adstock and saturation settings, then uses an evolutionary optimiser to search for models that balance two goals: fitting the data well and keeping business error low. You end up with a shortlist of candidate models to choose from.
That shortlist is Robyn’s best and worst feature. Best, because seeing five plausible models makes the uncertainty obvious in a way a single chart never does. Worst, because a junior analyst will simply pick the one with the flattering answer for the CMO’s favourite channel.
Robyn is R-based, which is fine if your analytics team already lives in R and a real obstacle if it doesn’t. It produces a dense one-page output with response curves, decomposition and budget allocation — good for a stakeholder meeting, dense for a first-timer.
PyMC-Marketing
PyMC-Marketing is a Python library that gives you Bayesian MMM as building blocks rather than a finished pipeline. You choose the adstock function, the saturation function, the priors, whether coefficients change over time, and how lift tests enter the model. It also ships customer lifetime value models, which is handy if you want media effects and retention analysis in one codebase.
Pick it when your business breaks the standard template: subscription revenue with long lags, a marketplace with two-sided spend, or a category where price moves more than media does. Skip it if nobody on the team can explain what a posterior distribution is — the flexibility that makes it powerful also makes it easy to build something confidently wrong.
The data you need before you start
This is where most small-team MMM projects die. Get this list assembled before you install anything.
- Weekly rows, not monthly. Aim for 104 weeks minimum, 156 is comfortable. Monthly data gives you 24–36 rows, which is not enough to estimate anything.
- One outcome column. Revenue, orders or qualified leads — pick one and keep the definition stable across the whole window.
- Spend per channel, per week. Split at the level you actually make decisions at. Six to ten channels is a healthy range; twenty channels on 104 weeks will produce nonsense.
- Impressions or clicks per channel. Spend alone confuses “we bought more” with “prices went up.”
- Price and promotion. Average selling price, discount depth, sale periods. Leave these out and your media effects will absorb every discount you ever ran.
- Seasonality and events. For India: Diwali, the big festive sale windows, IPL, exam and admission cycles, and monsoon effects for anything weather-sensitive.
- Experiment results. Any geo lift, conversion lift or holdout test you have run. These are the single highest-value input you can bring.
- Geo splits, if you can get them. Essential for Meridian’s strongest mode. In practice, national TV and national OOH buys often can’t be split cleanly, which is a real constraint for Indian brands with heavy offline media.
A blunt readiness test: if it would take you more than two days to produce a single spreadsheet with those columns, fix the data plumbing first. The model is the easy part.
What the output looks like: a worked example
Say a direct-to-consumer (D2C) brand spends ₹40 lakh a month. Illustrative model output — these numbers are made up to show the shape of the answer, not a benchmark:
| Channel | Monthly spend | Average ROI | Marginal ROI | Read |
|---|---|---|---|---|
| Google Search | ₹8,00,000 | 6.2x | 4.1x | Room to grow |
| Meta (FB + Instagram) | ₹14,00,000 | 3.4x | 1.9x | Near saturation — hold |
| YouTube | ₹6,00,000 | 2.1x | 2.0x | Flat curve — test a step up |
| Affiliate | ₹4,00,000 | 5.0x | 1.2x | Likely harvesting existing demand |
| Print + OOH | ₹8,00,000 | 1.4x | 1.3x | Reduce and reinvest |
The column that matters is marginal ROI — the return on the next rupee, not the average across all rupees spent. Meta’s 3.4x average looks great next to YouTube’s 2.1x, but the next ₹1 lakh into Meta returns less than the next ₹1 lakh into YouTube. Every one of these tools will draw that curve for you; most teams still make the decision off the average and get it backwards.
Common mistakes small teams make
- Too many channels, too little history. Roughly, keep the number of media variables under a tenth of your number of weeks.
- No experiment to anchor to. Run one geo holdout before you model. It converts the MMM from a guess into a calibrated guess.
- Comparing MMM to last-click and panicking. They measure different things. MMM will value upper-funnel media that last-click attribution shows as near-zero; that gap is the point, not a bug.
- Treating one run as truth. Refit quarterly. If a channel’s estimated ROI swings from 4x to 1x between refreshes, your model is unstable and you should say so out loud.
- Forgetting price and stock-outs. A month where you were out of stock looks exactly like a month where advertising failed.
- Skipping the sanity check. If the model says your ₹40,000-a-month influencer line drove 30% of revenue, the model is wrong, not the business.
What this means for you
- Choose by team, not by hype. R team → Robyn. Python team with geo data → Meridian. Python team with a strong statistician and an unusual business → PyMC-Marketing.
- Spend week one on data, not code. Build the 156-week spreadsheet first. Most projects fail here, and no tool fixes it.
- Run a geo holdout test now, even a small one. It is the cheapest way to make your eventual model credible.
- Report marginal ROI, not average ROI, in every budget conversation. It changes decisions; the average rarely does.
- Set a quarterly refresh cadence and track how much each channel’s estimate moves. Stability is the honest measure of whether you should trust it.
- Budget the real cost: roughly 4–8 weeks of one analyst’s time for a first credible model, plus modest cloud compute. The software is free; the labour isn’t.
Frequently asked questions
Is open-source MMM really free?
The software is free — Meridian, Robyn and PyMC-Marketing are all released under permissive open-source licences. The costs are analyst time (typically 4–8 weeks for a first usable model), cloud compute for the heavier Bayesian runs, and the ongoing work of refreshing the data every quarter. Commercial MMM vendors are mostly charging for that labour, not for the maths.
How much data do I need to run MMM?
Two years of weekly data is the practical minimum, and three years is comfortable. You need spend and impressions for each channel, your sales or lead outcome, price and promotion history, and seasonality markers. Crucially, your spend must have actually varied — a channel with a flat budget for two years cannot be measured.
Which is best for a small marketing team?
Robyn if you have an R analyst and want a defensible first answer in a few weeks. Meridian if you work in Python and can split your data by region or state. PyMC-Marketing only if someone on the team genuinely understands Bayesian modelling — it is the most powerful and the least forgiving of the three.
Does MMM replace attribution and incrementality testing?
No — they work together. Incrementality experiments measure one channel precisely but expensively; MMM covers every channel at once but with more uncertainty. The strongest setup uses experiment results to calibrate the MMM, which all three tools explicitly support. Attribution stays useful for day-to-day campaign optimisation, not for annual budget splits.
