ROI priors

Meridian can be re-parameterized so the ROI of each channel is a model parameter. This lets you incorporate prior ROI information, such as incrementality experiments, industry benchmarks, or other domain knowledge. Alternatively, less informative priors can be used. ROI priors provide a way to treat all media channels equally. Additionally, ROI priors provide a way to apply equal regularization across channels in cases where regularization is needed to achieve better model convergence, or goodness of fit. For more information about this calibration method, see Media Mix Model Calibration with Bayesian Priors.

You have the option to either set prior distributions on the \(\text{ROI}_m\) parameters or the \(\beta_m\) parameters. The PriorDistribution object has arguments for both parameters, but only one will be used depending on the value of the boolean argument use_roi_prior in the ModelSpec. The re-parameterization is derived in the use case use_roi_prior=True (which is the default, and is strongly recommended).

For any media channel \(m\), the incremental sales driven by that channel is

$$ \begin{align} \text{IncrementalSales}_m &= \sum\limits_{g,t} u_{g,t}^{(y)} p_g s \beta_{g,m} \text{HillAdstock}\left( \{x_{g,t-\ell,m}\}_{\ell=0}^L;\ \alpha_m, ec_m, \text{slope}_m \right) \\ &= \sum\limits_{g,t}\beta_{g,m} M_{g,t,m}\ , \end{align} $$

where the term $M_{g,t,m}$ is defined as

$$ M_{g,t,m} =\ u_{g,t}^{(y)} p_g s \text{HillAdstock}\left( \{x_{g,t-\ell,m}\}_{\ell=0}^L;\ \alpha_m, ec_m, \text{slope}_m \right) \ , $$

and \(s = \sqrt{\frac{1}{GT-1} \sum\limits_{g,t} \left( y^\dagger_{g,t}-m \right)^2}\) is the standard deviation of the population-scaled KPI values as defined in Input data.

The relationship between $\beta_{g,m}$ and $\text{ROI}_m$ is given by the following equation:

$$ \begin{align*} \sum\limits_{g,t}\beta_{g,m} M_{g,t,m} &= \text{IncrementalSales}_m \\ &= \text{ROI}_m \cdot \text{Cost}_m \\ &= \text{ROI}_m \sum\limits_{g,t} \overset \sim x_{g,t,m} \ . \end{align*} $$

Now $\beta_{g,m}$ can be re-parameterized as

$$ \begin{align*} \beta_{g,m} &= \begin{cases} \text{exp}(\beta_m + \eta_m Z_{g,m}) &,\ \text{if}\ \texttt{media_effects_dist} = \texttt{LogNormal} \\ \beta_m + \eta_m Z_{g,m} &,\ \text{if}\ \texttt{media_effects_dist} = \texttt{Normal} \ , \end{cases} \end{align*} $$

where \(Z_{g,m}\) has a standard normal prior distribution that is independent of all other model parameters. Substituting this expression for \(\beta_{g,m}\) results in the following equation:

$$ \begin{align*} \beta_m &= \begin{cases} \text{log}\left( \text{ROI}_m\sum\limits_{g,t} \overset \sim x_{g,t,m} \right) - \text{log}\left( \sum\limits_{g,t}exp\left( \eta_m Z_{g,m} \right) M_{g,t,m}\right) &, \text{if}\ \texttt{media_effects_dist} = \texttt{LogNormal} \\ \dfrac{ \text{ROI}_m \sum\limits_{g,t} \overset \sim x_{g,t,m} - \eta_m \sum\limits_{g,t}Z_{g,m}M_{g,t,m} }{ \sum\limits_{g,t} M_{g,t,m} } &, \text{if}\ \texttt{media_effects_dist} = \texttt{Normal} \ . \end{cases} \\ \end{align*} $$

Therefore, $\beta_m$ is a function of \((\text{ROI}_m, \alpha_m, \text{slope}_m, ec_m, \{Z_{g,m}\}^G_{g=1})\). There is a one-to-one correspondence between $\beta_m$ and $\text{ROI}_m$ if all of the other values are fixed. As a result, the model can be re-parameterized using $\text{ROI}_m$ in place of $\beta_m$. Some important points to note:

  • Any user-specified prior distribution can be placed on the $\text{ROI}_m$ parameters.
  • Even though $\beta_m$ is no longer a model parameter, it can still be calculated for every Markov Chain Monte Carlo (MCMC) prior or posterior draw because it is a function of the other parameters.
  • When media_effects_dist = Normal, $\text{ROI}_m$ can take any value in \((-\infty, +\infty)\). When media_effects_dist = LogNormal, $\text{ROI}_m$ can take any value in \((0, +\infty)\).

Reparameterizing the model in terms of ROI only changes the model in terms of how the prior distributions are defined. When the ROI parameterization parameterization is used, independent prior distribution are placed on \((\text{ROI}_m, \alpha_m, \text{slope}_m, ec_m)\) rather than on \((\beta_m, \alpha_m, \text{slope}_m, ec_m)\). In both cases, the \(\{Z_{g,m}\}^G_{g=1}\) parameters are assigned standard normal priors that are independent of each other and all other model parameters. The ROI parameterization implicitly induces a prior distribution on the \(\beta_m\); however, this distribution is no longer independent of \((\alpha_m, \text{slope}_m, ec_m, \{Z_{g,m}\}^G_{g=1})\).

By default, Meridian defines the ROI prior numerator, $IncrementalSales_m$, as a sum taken over all geos and time periods. However, it can alternatively be defined as a sum over a subset of time periods using the roi_calibration_period and rf_roi_calibration_period arguments. There can be special cases where it is preferable to consider only a subset, for example, when calibrating the ROI prior with an experiment that covers a specific time window within the MMM modeling window. For more information, see section 3.4 in Media Mix Model Calibration with Bayesian Priors. In most cases, we recommend defining the prior over all time periods and using any available experiment results as one decision making factor within a more holistic strategy, as discussed in ROI priors and calibration.

The same re-parameterization can be done for channels with reach and frequency data by setting

$$ M_{g,t,n} = u_{g,t}^{(y)} p_g s \text{Adstock}\left( \left\{ r_{g,t-\ell,n} \cdot \text{Hill}\left( f_{g,t-\ell,n};\ ec^{(rf)}_n, \text{slope}^{(rf)}_n \right) \right\}^L_{\ell=0}\ ;\ \alpha^{(rf)}_n \right) \ . $$

Everything else is the same, so the derivation is not repeated.