Transformations in MMM Modelling

Rhydham Gupta
6 min readMay 30, 2022

--

In MMM modeling, the variable transformations are very important both statistically and in Business points. In marketing, there are mainly three phenomena that need to be applied to the raw data series before fitting the model.

  • Carryover impact of the marketing — Well, we are humans and we all have memory which has some retention power. Any advertisement you see today will stay in your memory to some extent and based on that you can purchase the product
  • Diminishing returns of the marketing — It will not be like that you keep on spending money on advertising and you will keep getting more returns. At some point, all marketing reaches the saturation where the same increase in the spend doesn’t yield the same proportion of sales. Don’t worry if you don’t understand it now, we will understand it in detail in this article
  • Lag effect of the marketing — There is often a lag between your exposure to the advertisement and your purchasing of a product. You see a TV this week but based on that Ad you may buy the product next week.

To understand this better, let’s play with random data.

Adstock — The Carryover Impact

Firstly, let’s have a look at the formula —

At = Xt + adstock rate * At-1

Let’s create an Adstock series of the static series in excel.

Adstock transformation with formula
The plot of Adstock Transformed Series

Did you notice that —

  • After applying the adstock, the straight horizontal line (Series) becomes C-shaped
  • Secondly, more is the value of adstock, higher is the value of series

Now let’s look at the same adstock from decay point of view. After all it’s our moral duty to view all dimensions of the data.

What will curve look like, if you only take value in 1 month and see its impact in the following months — let’s see

Adstock decay data creation with formula
The plot of adstock decay

Did you observe that, lower is the value of adstock, more quickly it’s impact fade out. For e.g. for AD_10 series, the impact of Jan activity only last till the Feb and becomes negligible after that, on the other hand the impact of AD_70 series is visible even in the month of Oct.

Higher Adstock — More Retention Power — More you are increasing your series.

C-Curve and S-Curve— The Diminishing Return

Now you might be wondering why there are two curves in the dimishing return. Don’t worry I will explain both of them with examples.

But before that it is more important to understand their business reasoning. Let me first ask this question, there are two companies, one is new startup like Razorpay and other is well established organisation like paypal.

Razorpay is in a growing stage, it is quickly acquiring lot of new customers. People are very less aware about this company. Now when they increase their marketing spend, it’s impact on the revenue will be high because they are catching more eyeballs and they are slowly becoming the recognised brand. So if at Rs1 marketing spend they are earning 5X return, it is very much possible that if they increase the spend, same Rs1 marketing yield 7X return.

Whereas when this company will enter the stage of the paypal, increase in marketing spend by Rs1 will yield lesser returns.

Now if we consider it as two stages of the marketing, while S-Curve covers both the stages while the C-Curve only covers second stage of the marketing.

S-Curve vs C-Curve

C-Curve — Power Curve

Most popular curve for c-curve is power curve. Let’s see the formula

Pt = X^(power)

Let’s create the power series of a uniformly increase series.

Power transformation with formula
The plot of power transformed series

Hey, did you notice that at lower power series is achieving the saturation early. Saturation simply means that increase in x is yielding negligible or very low increase in the y. To have a better idea, let’s look at its slope. Slope is nothing but Increase in y/Increase in x

The plot of slope of power transformed series

S-Curve — Hill Function

S-curve is little more complex than the c-curve, because there are two parameters in the function, let’s see the formula

As you can see in the function, there are two parameter

Aplhacontrols the shape of the curve, higher value more s-shaped, lower value it becomes c-curve (we will see in example)

Gamma — controls the inflexion point.

Let’s create the uniformly increasing series and apply s-curve transformation.

S-CURVE transformation with formula
S-curve plot at Aplha = 4, Gamma = 0.4

Now let’s see how changing the aplha impacts the curve, keeping gamma constant.

S-curve plot at Aplha = 3, Gamma = 0.4
S-curve plot at Aplha = 1, Gamma = 0.4

Did you notice that, on reducing the apha from 4 to 1, it changes to c-curve shape.

Now keeping the Aplha constant let’s see the impact of changing gamma

S-curve plot at Aplha = 4, Gamma = 0.1

The inflexion point shifted to left on reducing the value of gamma.

Which one of the two, s-curve or c-curve is prefered in the modelling?

A general rule says to always use power curve in the modelling because it’s behaviour is more predictable and there is only 1 parameter to control.

But in some cases especially for the young companies, do the spend optimising using the S-curve (We will discuss the optimiser in some another article)

Lag — Delay effect

In marketing, delay in the exposure to Ad and taking an action of buying product is very common.

Let’s see the random series with lag effect.

Random Series and Lag transformed variables
The plot of the lag transformed series

Combing the Three — Adstock + Power + Lag = APL

One of the term you will hear a lot in MMM Modelling is APL transformed variables. When we apply all three effects on adstock, power and lag it becomes the APLed series which finally goes in the modelling.

Now in the model we check various ranges of APL combination and choose the one which gives us most significant variable and business in-line contribution. In another article, I will cover the depth of the modelling process and how do we select the best parameters for any variable.

Hope you now appreciate the different transformations and their need!

--

--

Rhydham Gupta
Rhydham Gupta

Written by Rhydham Gupta

I am a Data Scientist, I believe that observing and decoding data is an art. Same Data, Different Eyes Different Stories

No responses yet