How to choose treatment prior types

Each treatment variable type (paid, organic, and non-media) has various prior type options. ROI and mROI priors can be used only with paid media. Contribution and coefficient priors can be used with any treatment type. Consider the following when deciding which prior type(s) to choose.

ROI priors are the default because they usually align best with prior knowledge, such as experiment results. This is usually the most intuitive option for setting reasonably well informed priors.

mROI priors are an alternative for users who want to impose a prior capable of shrinking the optimal budget allocation toward the historical budget allocation, thereby regularizing the recommended budget shifts. This can be accomplished by setting a common mROI prior mean on all channels and adjusting the standard deviation. The stronger the prior (smaller standard deviation), the closer the optimal allocation will get to historical. Note that optimization spend constraints offer another way to limit recommended budget shifts, which should obviate the need for mROI priors for most users. For more details, see subsection "Comparison of ROI and mROI priors for paid media".

Contribution priors are very similar to ROI priors for paid media. The only difference is that the ROI prior denominator is channel spend, whereas the contribution prior denominator is total observed outcome. This means that any contribution prior can be translated to an ROI prior, and any ROI prior can be translated to a contribution prior for paid media.

Coefficient priors are the more traditional parameterization for a linear regression model. In the context of MMM, the interpretation of a coefficient is somewhat abstract, which makes it difficult to set an informed prior. A particular coefficient value can imply significantly different ROI values for different paid media channels, since the ROI depends on the channel's execution distribution over geos and time periods, the estimates of the channel's adstock and diminishing returns parameters, and the channel's cost per media unit.

Organic media

Contribution priors are the default option because they are the most intuitive quantity for setting an informed prior. Some channels might be expected to have greater contributions than others, so consider customizing the prior distribution in a way that makes sense for your business and marketing tactics. A Beta distribution often makes sense because it is constrained to the interval zero to one.

Coefficient priors are the more traditional parameterization for a linear regression model. In the context of MMM, the interpretation of a coefficient is somewhat abstract, which makes it difficult to set an informed prior. A particular coefficient value can imply significantly different contribution values for different organic media channels, since the contribution depends on the channel's execution distribution over geos and time periods and the estimates of the channel's adstock and diminishing returns parameters.

Non-media treatments

Contribution priors are the default option because they are the most intuitive quantity for setting an informed prior. It is always a good idea to customize the prior distribution. Depending on each variable's specified baseline value, you might expect the contribution to be positive or negative, or the sign of the contribution might be unknown. For example, it may not be clear whether setting the price to a given baseline value would have a positive or negative impact on revenue. Or perhaps you have a prior expectation that price has a positive impact under one baseline price, but a negative impact under a different baseline price.

Coefficient priors are the more traditional parameterization for a linear regression model. In the context of MMM, the interpretation of a coefficient is somewhat abstract, which makes it difficult to set an informed prior. A particular coefficient value can imply significantly different contribution values for different non-media treatment channels, since the contribution depends on the treatment's distribution of values over geos and time periods and the treatment's baseline treatment value.

Further considerations

Customize contribution priors for non-media treatments

The default contribution prior is a Truncated Normal distribution, which allows both positive and negative values. You can set treatment-specific parameters on the Truncated Normal distribution to shift probability mass toward positive or negative values. For example, the following code snippet assigns a symmetrically truncated Normal(0, 0.1) distribution on the first treatment, a positive truncated HalfNormal(0, 0.2) distribution on the second treatment, and a negative truncated HalfNormal(0, 0.1) distribution on the third treatment.

PriorDistribution(
    contribution_n=tfp.distributions.TruncatedNormal(
        loc=[0, 0, 0],
        scale=[0.1, 0.2, 0.1],
        low=[-1, 0, -1],
        high=[1, 1, 0],
    )
)

Alternatively, you could use a scaled Beta distribution to specify a positive distribution for some treatments and a negative distribution for other treatments. For example, the following code snippet would assign a Beta(1, 49) prior on the first treatment and a negative Beta(1, 99) prior on the second treatment.

PriorDistribution(
    contribution_n=tfp.distributions.TransformedDistribution(
        tfp.distributions.Beta([1, 1], [49, 99]),
        tfp.bijectors.Scale([1, -1]),
    )
)

Comparison of ROI and mROI priors priors for paid media

mROI priors are an alternative to ROI priors for paid media channels. The mROI of a channel is defined as the expected return on one additional monetary unit of spend. The additional monetary unit is allocated across geographic regions and time periods by scaling up the reach, holding the average frequency fixed.

The choice between ROI and mROI priors has important implications, particularly if your goal is to create prior parity across channels. Both ROI and mROI have a prior distribution. If the ROI prior is specified, then an mROI prior is induced. If the mROI prior is specified, then an ROI prior is induced. An induced prior does not belong to a parametric family, and it is typically not independent of other model parameters. The exact distribution of an induced prior depends on a channel's media execution distribution across geographic regions and time periods. Importantly, even if a common ROI (mROI) prior is used for all channels, the induced mROI (ROI) prior will still differ by channel.

When the Hill function is concave, for example when its slope parameter equals one (the default assumption), channels without R&F data will always have a higher overall ROI than their marginal ROI. If you use an ROI prior, the induced marginal ROI prior distribution will be strictly less for a non-R&F channel. Conversely, if you use a marginal ROI prior , the induced ROI prior will be strictly greater for a non-R&F channel.

For reach and frequency channels, the marginal ROI by reach equals the ROI. This is because the marginal ROI prior is applied to the marginal ROI by reach (the next monetary unit spent increases the reach without changing the average frequency). Under the Meridian model specification, media effects are linear in reach. Therefore, the choice between an ROI and a marginal ROI prior parameterization has no impact on the prior for reach and frequency channels. However, the choice between ROI and marginal ROI parameterization will still effect posterior inference for reach and frequency channels because:

  • The prior choice for other channels affects the model fit and posterior results for the reach and frequency channels.
  • The default ROI and mROI prior distributions differ.

If you are interested in examining the induced prior for a particular model, you can obtain this by calling sample_prior, followed by a call to the Analyzer class's roi or marginal_roi method with the argument use_posterior=False.

Reasons to choose ROI priors:

  • A common ROI prior can be used for all channels to create prior ROI parity. As the prior strength increases (standard deviation decreases), posterior ROI distributions will shrink toward a common value.
  • Channel-specific ROI priors can be used to incorporate prior knowledge, such as experiment results.
  • Although ROI priors don't control optimization budget shifts as well as mROI priors, optimization spend constraints can be used to limit the amount of budget shift proposed for any given channel.

Reasons to choose mROI priors:

  • A common mROI can be used for all channels to create prior mROI parity. As the prior strength increases, posterior mROI values will shrink toward a common value.
  • Prior mROI parity generally results in less significant optimization budget shifts:
    • If the same mROI prior is used for all channels, then the prior optimal budget allocation will equal historical.
    • As the prior strength increases, posterior optimal budget allocation will shrink toward historical.
    • Despite the use of strong mROI priors, a channel with reach and frequency data might still receive a significant positive spend shift in optimization, if we also use that channel's optimal rather than historical frequency. The mROI prior is applied to the mROI under historical frequency, which is always less than the mROI under optimal frequency. By default, budget optimization is run under optimal frequency, but the optimization method contains a boolean argument use_optimal_freq which can be used to set whether optimization is run under optimal or historical frequency.

It's important to keep in mind that mROI differs across time windows, so if your optimization time window does not align with the time window of the mROI prior, then the mROI priors might not regularize optimization budget shifts as intended. You can adjust the time window of your optimization using the selected_time argument of BudgetOptimizer.optimize(). You can adjust the time window of your mROI prior using the roi_calibration_period and rf_roi_calibration_period arguments of ModelSpec. By default, both time windows will be set to the full modeling time window.