How to simulate impact of different channel spends using an estimated MMM #1422
Unanswered
nheusch-se
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
using an estimated MMM, I'm conducting "what-if" analyses and got a little stuck on how to do it in pymc-marketing. I would really appreciate your help and thinking on this.
Let me outline what I'm after:
I have an MMM (estimated using data up to Nov 2024) and would like to know "what does the model think the difference in sales in December would have been if instead we had spent 0 on channel 1 in the 4 weeks of December".
If doing this with pen and paper I'd do the following:
Repeat this 1000 times.
This would give me 1000 estimates of the impact of setting the spend to 0. It is a distribution (i.e. 1000 estimates), because there is uncertainty about the parameters alpha, beta, lambda.
Is there any way to do this in pymc-marketing?
Here is what I'm doing so far, but it feels unfair to the model and gives me an excessive amount of uncertainty.
So far I'm using sample_posterior_predictive twice to estimate channel contributions for December, once using my actual channel spends and once using a copy of the data, where I set the channel spends for channel 1 to zero. I then extract the contributions for the channel and calculate their difference. However, this feels weird because I'm not comparing apples-to-apples.
This is a weird comparison, because for example channel_contribution_dec[0] and channel_contribution_dec_counterfactual[0] were estimated different sampled values of alpha, beta, lambda (as was probably every other pair channel_contribution_dec[k], channel_contribution_dec_counterfactual[k]). Hence, the difference between them hence does not only result from different channel spends, but also different parameter values for alpha, beta, lambda.
Thus, diff_due_to_channel1 gives me an excessively wide distribution. A quick fix might be to just sort channel_contribution_dec and channel_contribution_dec_counterfactual and then take their difference, but ideally I'd like to compare apples to apples, i.e. estimated channel contributions when alpha, beta, lambda are identical. (And do this for different values of alpha, beta, lambda).
Does this make sense to you and is there a way to do this? I'd really appreciate your help!!
Beta Was this translation helpful? Give feedback.
All reactions