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.

Adstock function

The Adstock function is defined as follows:

$$ \text{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:

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

Where:

  • \(x \geq 0\)

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

  • \(\text{slope} > 0\) is a parameter that controls the function shape:

    • \(\text{slope} \leq 1\) corresponds to a concave shape
    • \(\text{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} \text{Hill}(\text{Adstock}(x_t,x_{t-1},\cdots,x_{t-L};\ \alpha_m) ;ec_m, \text{slope}_m)\).