# Media saturation and lagging

Typically the effect of a media channel on sales has a lagged effect that tapers off slowly over time. Meridian's model architecture is designed to capture this effect through a geometric decay Adstock function. For more information, see A Hierarchical Bayesian Approach to Improve Media Mix Models Using Category Data and Bayesian Methods for Media Mix Modeling with Carryover and Shape Effects.

The Adstock function is defined as follows:

$$AdStock(x_t, x_{t-1}, \cdots, x_{t-L};\ \alpha)\ = \dfrac{\sum\limits_{s=0}^L\ \alpha^sx_{t-s}} {\sum\limits _{s=0}^L\ \alpha^s}$$

Where:

• $$x_s \geq 0; s = t, t-1, \cdots, t-L$$

• $$\alpha\ \in\ [0, 1]$$ is the geometric decay rate

• $$L$$ is the maximum lag duration

It is also intuitive that as spending on a given media channel within any given time period increases, you eventually see diminishing marginal returns, for example, saturation. Meridian models this saturation effect through a two-parameter function known as the Hill function.

## Hill function

The Hill function is defined as follows:

$$Hill(x; ec, slope) = \frac{1}{1+\left( \frac{x}{ec} \right)^{-slope}}$$

Where:

• $$x \geq 0$$

• $$ec > 0$$ is the half saturation point, meaning that $$Hill(x=ec; ec, slope) = 0.5$$

• $$slope > 0$$ is a parameter that controls the function shape:

• $$slope \leq 1$$ corresponds to a concave shape
• $$slope > 1$$ corresponds to an S shaped function that is convex for $$x < ec$$ and concave for $$x > ec$$

Important: The model's estimation of the Hill function parameters is based on the observed range of media data. The fitted response curve can be extrapolated outside this range, but results based on extrapolation should be interpreted with an appropriate level of caution.

The Hill function can be applied either before or after the Adstock transformation, depending on the boolean hill_before_adstock argument of the ModelSpec. The default setting is hill_before_adstock = False, which makes the media effect of channel $$m$$ within geo $$g$$ and time period $$t$$ equal to $$\beta_{g,m} Hill(Adstock(x_t,x_{t-1},\cdots,x_{t-L};\ \alpha_m); ec_m, slope_m)$$.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]