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](https://research.google/pubs/media-mix-model-calibration-with-bayesian-priors/).

Alternatively, Meridian can be re-parameterized so the mROI of each
channel is a model parameter. Regularizing the mROI to a common value across
channels has the effect of also regularizing the recommended budget shifts
obtained from budget optimization.

Finally, Meridian can be re-parameterized so contribution proportion
(total incremental outcome divided by total observed outcome) is a model
parameter. The only difference between contribution and ROI priors is the
denominator: the contribution prior denominator is total observed outcome,
whereas the ROI prior denominator is total channel spend.

The ROI, mROI, and contribution model re-parameterizations are derived as
follows.

## ROI

For any media channel \\(m\\), the incremental outcome driven by that channel is
$$ \\begin{align} \\text{IncrementalOutcome}_m \&= \\sum\\limits_{g,t} u_{g,t}\^{\[Y\]} L_g\^{\[Y\]-1} \\left(\\beta_{g,m} \\text{HillAdstock}\\left( \\{x_{g,t-\\ell,m}\\}_{\\ell=0}\^L;\\ \\alpha_m, ec_m, \\text{slope}_m \\right) \\right) \\\\ \&\\qquad - u_{g,t}\^{\[Y\]} L_g\^{\[Y\]-1} \\left(\\beta_{g,m} \\text{HillAdstock}\\left( \\{0 \\cdot x_{g,t-\\ell,m}\\}_{\\ell=0}\^L;\\ \\alpha_m, ec_m, \\text{slope}_m \\right) \\right)\\\\ \&= \\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](https://developers.google.com/meridian/docs/advanced-modeling/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{IncrementalOutcome}_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 random parameters
\\((\\text{ROI}_m, \\alpha_m, \\text{slope}_m, ec_m, \\{Z_{g,m}\\}\^G_{g=1})\\) and data
\\((s, u_{g,t}\^{\[Y\]}, \\{p_g\\}_{g=1}\^G, \\{x_{g,t,m}\\}_{g,t},
\\{\\overset \\sim x_{g,t,m}\\}_{g,t})\\). 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 is used, independent prior distributions 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,
$IncrementalOutcome_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` and `rf_roi_calibration` 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](https://research.google/pubs/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](https://developers.google.com/meridian/docs/advanced-modeling/roi-priors-and-calibration).

## Channels with reach and frequency data

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.

## Marginal ROI

Alternatively, a prior distribution can be specified for the marginal ROI
instead of the ROI.
$$ \\begin{alignat}{2} \\text{MarginalIncrementalOutcome}_m \&= \\sum\\limits_{g,t} u_{g,t}\^{\[Y\]} L_g\^{\[Y\]-1} \\left(\\beta_{g,m} \\text{HillAdstock}\\left( \\{1.01 \\cdot x_{g,t-\\ell,m}\\}_{\\ell=0}\^L;\\ \\alpha_m, ec_m, \\text{slope}_m \\right) \\right) \\\\ \&\\quad - \\sum\\limits_{g,t} u_{g,t}\^{\[Y\]} L_g\^{\[Y\]-1} \\left(\\beta_{g,m} \\text{HillAdstock}\\left(\\{x_{g,t-\\ell,m}\\}_{\\ell=0}\^L; \\ \\alpha_m, ec_m, \\text{slope}_m \\right)\\right) \\\\ \&= \\sum\\limits_{g,t} u_{g,t}\^{\[Y\]} p_g s \\beta_{g,m} \\biggl\\{ \\text{HillAdstock}\\left(\\{1.01 \\cdot x_{g,t-\\ell,m}\\}_{\\ell=0}\^L; \\ \\alpha_m, ec_m, \\text{slope}_m\\right) \\\\ \& \\hspace{8em} - \\text{HillAdstock}\\left(\\{x_{g,t-\\ell,m}\\}_{\\ell=0}\^L; \\ \\alpha_m, ec_m, \\text{slope}_m \\right) \\biggr\\} \\\\ \&= \\sum\\limits_{g,t}\\beta_{g,m} M_{g,t,m}\\ , \\end{alignat} $$

where the term $M_{g,t,m}$ is now defined as
$$ \\begin{align} M_{g,t,m} = u_{g,t}\^{\[Y\]} p_g s \\biggl\\{ \&\\text{HillAdstock}\\left(\\{1.01 \\cdot x_{g,t-\\ell,m}\\}_{\\ell=0}\^L; \\ \\alpha_m, ec_m, \\text{slope}_m \\right)\\\\ \&- \\text{HillAdstock}\\left( \\{x_{g,t-\\ell,m}\\}_{\\ell=0}\^L;\\ \\alpha_m, ec_m, \\text{slope}_m\\right) \\biggr\\} \\ . \\end{align} $$

The relationship between $\\beta_{g,m}$ and $\\text{MarginalROI}_m$ is given by
the following equation:
$$ \\begin{align\*} \\sum\\limits_{g,t}\\beta_{g,m} M_{g,t,m} \&= \\text{MarginalIncrementalOutcome}_m \\\\ \&= \\text{MarginalROI}_m \\cdot (0.01 \\cdot \\text{Cost}_m) \\\\ \&= \\text{MarginalROI}_m \\cdot (0.01 \\cdot \\sum\\limits_{g,t} \\overset \\sim x_{g,t,m}) \\ . \\end{align\*} $$

The previously stated equation for \\(\\beta_m\\) under ROI priors still holds
under marginal ROI priors if you do the following:

1. Use this alternative definition of \\(M_{g,t,m}\\), and
2. Replace \\(\\text{ROI}_m\\) with \\(0.01 \\cdot \\text{MarginalROI}_m\\).

## Contribution

The relationship between $\\beta_{g,m}$ and $\\text{Contribution}_m$ is given by
the following equation:
$$ \\begin{align\*} \\sum\\limits_{g,t}\\beta_{g,m} M_{g,t,m} \&= \\text{IncrementalOutcome}_m \\\\ \&= \\text{Contribution}_m \\cdot \\text{ObservedOutcome} \\\\ \&= \\text{Contribution}_m \\cdot \\sum\\limits_{g,t} \\overset \\sim y_{g,t} \\\\ \&= \\text{Contribution}_m \\cdot \\sum\\limits_{g,t} \\overset \\sim u\^{\[Y\]}_{g,t} \\cdot \\ddot{y}_{g,t}\\ . \\end{align\*} $$

Everything else is the same as for ROI priors.