facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.07k stars 322 forks source link

Share of Spend and Share of Effect definitions #935

Closed AdQ-MiguelMolina closed 2 months ago

AdQ-MiguelMolina commented 3 months ago

Introduction

Hello developers. I am new to Robyn, Marketing Mix Modelling and anything related to marketing in general. And I have been studying a couple of weeks about this concepts and specially how to apply Robyn to some real data.

Question

Given this I still have not found a solid definition for both concepts:

My guess

I have read that share of spends could be the next relation:

Given this definition I can assume the next:

On the other hand, I find no definition for share of effect.

By similarity with Share of Spend and given the ROAS in the same graphic I could assume that the formula for this parameter is the next:

I am not going to develop the process, but this would lead to the next formula:

Which if I understood correctly it should be something that Robyn would model.

Am i correct about it or my approach is wrong?

This also leads to Decomp.RSSD

Its definition in the documentation is the difference between Share of spends and Share of effect, defined also as business error, but given the previous definition of share of effect, the purpose would be to maximize this difference not minimize.

AdQ-MiguelMolina commented 3 months ago

Hello again developers. I have continued researching this amazing app and I have found the schema.R file, where every output column is explained.

I checked for the share of effect which indicates the next:

Checking the definition of xDecompPerc I see it is a normalized xDecomp, with the next formula:

This makes this term with values between 0 and 1, and the sum always equal one.

As long as the sum elements axis is the same as the xDecompAgg, wouldnt it make the sum(xDecomPerc)=1?

gufengzhou commented 2 months ago

sorry for the late reply. You're right about most things. Share of spend is a fact, given by the input data. Share of effect is modeled by Robyn. Decomp.RSSD is the objective function that aims at minimising the diff between both shares.

effect_share is only calculated among paid media variables, whereas xDecompPerc is for all variables.

AdQ-MiguelMolina commented 2 months ago

Hello, thanks for the answer.

I found out that share of effect is straight (effect_media)/(sum effect_media), which can be confirmed using the waterfall decomposition, summing the effect values of the media variables shown there and calculating the share of each variable, am I right?.

Reducing Robyn revenue formula to revenue = sum_i mediaVar_i + sum_j linearVar_j. Where mediaVar are the variables affected by adstock and saturation, and linearVar the ones that are not. xDecompPerc of mediaVar_1 is basically mediaVar_1/revenue, right?

This leads to more questions about how saturation and adstock are applied, and how carryover is defined, but I will leave them to new issues, since I prefer to at least try to find out by myself using the data, rather than just asking first.

Thanks again for the help.

gufengzhou commented 2 months ago

Reducing Robyn revenue formula to revenue = sum_i mediaVar_i + sum_j linearVar_j. Where mediaVar are the variables affected by adstock and saturation, and linearVar the ones that are not. xDecompPerc of mediaVar_1 is basically mediaVar_1/revenue, right?

yes. for understanding questions, probably our 2.8k member strong FB group is a better place. closing this now.