missing log log transformation for mmm_decompose_contrib() #47
-
Hey Sibyl. First of all, thank for sharing such an awesome repository, its helping me a great deal to learn more about attribution models and stan. I do have a question regarding the predictions you make in the function mentioned (mmm_decompose_contrib()). Shouldn't it apply the mean_log1p_transform() instead of just mean center? My understanding is that if the betas were estimated in a log log model, you would want to apply the betas over the log X media and controls, else they would be misaligned in scale. Does this makes sense to you? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Formula 1: y = b0 * x1^b1 You can apply the coefficients to the log-log model, but it just won't do anything for you. |
Beta Was this translation helpful? Give feedback.
Formula 1: y = b0 * x1^b1
Formula 2: log y = log b0 + b1 * log x1
The two formulas are equivalent. Though the coefficients are inferred from Formula 2, it's okay to plug them into both formulas. In order to get the actual contribution, we need to plug them into Formula 1. See this section for details:
https://github.com/sibylhe/mmm_stan#decompose-sales-to-media-channels-contribution
You can apply the coefficients to the log-log model, but it just won't do anything for you.