Skip to content

Halo Effect Modeling Notebook#2450

Draft
juanitorduz wants to merge 9 commits into
mainfrom
hallo-experiments
Draft

Halo Effect Modeling Notebook#2450
juanitorduz wants to merge 9 commits into
mainfrom
hallo-experiments

Conversation

@juanitorduz
Copy link
Copy Markdown
Collaborator

@juanitorduz juanitorduz commented Mar 27, 2026

Halo Effect modeling notebook with PyMC-Marketing and Mu (additive effects)


📚 Documentation preview 📚: https://pymc-marketing--2450.org.readthedocs.build/en/2450/

@juanitorduz juanitorduz self-assigned this Mar 27, 2026
@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@cursor
Copy link
Copy Markdown
Contributor

cursor Bot commented Mar 27, 2026

PR Summary

Low Risk
Low risk documentation-only change; main impact is added notebook content and (potentially) docs build time/size due to a new rendered example.

Overview
Adds a new MMM example notebook, docs/source/notebooks/mmm/mmm_halo.ipynb, demonstrating several approaches to modeling cross-product halo effects in multi-dimensional MMMs using synthetic data and comparing halo-aware variants against a baseline model.

Written by Cursor Bugbot for commit 353e552. This will update automatically on new commits. Configure here.

@github-actions github-actions Bot added docs Improvements or additions to documentation MMM labels Mar 27, 2026
@juanitorduz juanitorduz marked this pull request as draft March 27, 2026 09:50
@juanitorduz juanitorduz added this to the 1.0 milestone Mar 27, 2026
@juanitorduz juanitorduz removed this from the 1.0 milestone May 7, 2026
@Hendrik-86
Copy link
Copy Markdown

Hi Juan,
I went through code. I can follow your reasoning and your approaches (some way of coding it is new to me and I have to get used to it). Before I went through the code, I thought about how I would try to solve this. But in general, the problem of P^2 parameters that would need estimation (in a full cross-product halo effect analysis) is pretty tough to tackle. Here are my thoughts as they came up while reading your code:

a) Cannibalization: If the marketing spending on one product reduces sales of another product, this would not be covered forcing coefficients to be positive. This is in general something I do not like (because you could theorize this also across channels), forcing coefficients to be zero or positive with half-normal distribution priors. But I think this argument would be even more pronounced in the product dimension.

b) Product similarity: Maybe the (perceived) distance of products could be an explaining factor for either i) halo effects or ii) cannibalization effects. Identifying these could help reducing to "sustainable" amount of cross-product effects. So, something in between your "flagship-approach" and the full "spillover-matrix" approach. So a variable could also be fruitful for what I write in c).

c) Non-parametric estimation of heterogeneous effects: I recently explored the possibiltiy to use panel local projections (PLP) for marketing mix modeling (but in a different context than the halo use case, still working on a small conceptual white paper). Panel local projections have a long tradition in macroeconomics to estimate the effect of a macro "shock" (say, changes in government spending) on cross-sectional units, e.g. firms, households. It shares some features with vector autoregressions (VARs) but have some nicer properties. There is also work on Bayesian PLP, see: https://www.marcoschwarzbach.de/uploads/BayesianPanelLocalProjections.pdf.
Recently, there is more work on how to use PLP for heterogeneous treatment effects (See: https://www.bankofengland.co.uk/-/media/boe/files/working-paper/2024/how-do-firms-financial-conditions-influence-the-transmission-of-monetary-policy.pdf. If you compare formula (1) and (2) you understand what I'm thinking of. I do not claim this is the solution, I never estimated heterogeneous effects this way, but this could be an avenue.

d) Projections (related to c) ): This is a rather general comment and not directly connected to the halo-Notebook. I always felt uncomfortable with the "chaining" of the two transformations (adstock => saturation) as it is done in the Meridian and PyMC MMM models. For that reason, I was looking for an alternative. Local projections, i.e. estimating effects of time horizons t+h (h=0,1,2,3 etc.) seems to me like a natural way of disentagling the saturation estimation from the adstock estimations (this is not a panacea and has its own difficulties!, especially for longer time horizons h). The resulting impulse-responses are also a natural way in communicating adstock effects to stakeholders as this is quite intuitive to understand.

Happy to hear your thoughts or also discuss some details in a call!

@juanitorduz
Copy link
Copy Markdown
Collaborator Author

juanitorduz commented Jun 1, 2026

Thanks for the input @Hendrik-86 ! I will read the references :)

Point (a) is a fair point that is a clear limitation of this notebook (thanks for bringing this up). The current notebook assumes "the naive?" idea that the halo effects are overall positive.

In the meantime, note that you can turn on and off the adstock and saturation, see https://www.pymc-marketing.io/en/stable/api/generated/pymc_marketing.mmm.components.saturation.NoSaturation.html#pymc_marketing.mmm.components.saturation.NoSaturation :)

@Hendrik-86
Copy link
Copy Markdown

Thanks for the input @Hendrik-86 ! I will read the references :)

Point (a) is a fair point that is a clear limitation of this notebook (thanks fro brining this up)

In the meantime, note that you can turn on and off the adstock and saturation, see https://www.pymc-marketing.io/en/stable/api/generated/pymc_marketing.mmm.components.saturation.NoSaturation.html#pymc_marketing.mmm.components.saturation.NoSaturation :)

Than it would be even easier to apply together with PLP :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation MMM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants