Join the newly launched
Discord community for real-time discussions, peer support, and direct interaction with the Meridian team!
Default prior parameterizations
Stay organized with collections
Save and categorize content based on your preferences.
Meridian offers multiple ways to parameterize the causal effect of each
treatment variable on the KPI. We refer to each option as different
model parameterizations. In Bayesian inference, a prior must be set on the
parameters of the model. So the model parameterization determines what precisely
one is setting a prior on.
The prior type can be specified for each treatment type. The
ModelSpec
contains
arguments media_prior_type
, rf_prior_type
, organic_media_prior_type
,
organic_rf_prior_type
, and non_media_treatments_prior_type
, which allow
you to specify whether a prior is placed on ROI, mROI, contribution, or the
coefficient mean. (ROI and mROI priors are only available for paid media.)
The
PriorDistribution
object has an argument for each combination of treatment type and prior type.
For each treatment type, only the argument corresponding to the selected prior
type is used. The others are ignored. For example, the arguments corresponding
to non-R&F paid media are roi_m
, mroi_m
, contribution_m
, and beta_m
. If
media_prior_type
is 'roi'
, then roi_m
is used and the others are ignored.
Each model parameterization has a different default prior distribution. The
following tables summarize the default priors under each model parameterization.
The following table summarizes the model parameterization and default priors for
the causal effect of paid media on the KPI. These vary based on the
media_prior_type
and rf_prior_type
arguments in ModelSpec
. The model
parameterization and default priors also depend on whether
outcome is revenue. Outcome is revenue when
either the KPI is revenue or when revenue_per_kpi
is passed to InputData
.
Outcome is not revenue ("non-revenue") when the KPI is not revenue and
revenue_per_kpi
is not passed to InputData
. The table also includes a column
indicating the corresponding parameter in the PriorDistribution
container that
allows one to customize the prior.
Model Type |
Default Prior |
media_prior_type/rf_prior_type |
Outcome |
Prior Type |
Parameter in PriorDistribution |
'roi' (default) |
Revenue |
ROI |
roi_m , roi_rf |
'roi' (default) |
Non-revenue |
Total paid media contribution |
roi_m , roi_rf |
'mroi' |
Revenue |
mROI |
mroi_m , mroi_rf |
'mroi' |
Non-revenue |
No default, must set custom |
mroi_m , mroi_rf |
'contribution' |
Revenue |
Contribution |
contribution_m , contribution_rf |
'contribution' |
Non-revenue |
Contribution |
contribution_m , contribution_rf |
'coefficient' |
Revenue |
Coefficient |
beta_m , beta_rf |
'coefficient' |
Non-revenue |
Coefficient |
beta_m , beta_rf |
The distribution used as the default prior for each model parameterization is
summarized in
Default prior distributions.
Under each scenario listed in the table, set a custom prior using the
appropriate PriorDistribution
parameter indicated in the table. When setting a
custom prior, it's important to understand what you are setting a custom prior
on. For more on the definition of ROI, mROI, and Contribution see ROI, mROI,
and Contribution parameterizations.
For more on the definition of a coefficient, see the model
specification. For more on the total paid
media contribution prior, see Custom total paid media contribution
prior.
The default prior for treatment effects of organic media is specified by the
organic_media_prior_type
and organic_rf_prior_type
arguments. The options
are 'contribution'
and 'coefficient'
, with 'contribution'
being the
default. If contribution priors are used, then a prior distribution is specified
on the
contribution_om
and contribution_orf
parameters. If coefficient priors are used, then a prior distribution is
specified on the
beta_om
and beta_orf
parameters.
The default prior for treatment effects of non-media_treatments is specified by
the non_media_treatments_prior_type
argument. The options are 'contribution'
and 'coefficient'
, with 'contribution'
being the default regardless of
whether the outcome is revenue. If contribution priors are used, then a prior
distribution is specified on the
contribution_n
parameter. If coefficient priors are used, then a prior distribution is
specified on the
gamma_n
parameter.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-11 UTC."],[[["\u003cp\u003eMeridian allows for different model parameterizations to analyze the causal effect of treatment variables on the KPI, influencing the prior settings in Bayesian inference.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epaid_media_prior_type\u003c/code\u003e argument in \u003ccode\u003eModelSpec\u003c/code\u003e determines whether the prior is set on ROI, mROI, or the coefficient (\u003ccode\u003ebeta_m\u003c/code\u003e), impacting the active parameters in \u003ccode\u003ePriorDistribution\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDefault priors for paid media's causal effect vary based on the \u003ccode\u003epaid_media_prior_type\u003c/code\u003e and whether the outcome is in terms of revenue or not, while specific \u003ccode\u003ePriorDistribution\u003c/code\u003e parameters (\u003ccode\u003eroi_m\u003c/code\u003e, \u003ccode\u003emroi_m\u003c/code\u003e, \u003ccode\u003ebeta_m\u003c/code\u003e, etc.) allow customization.\u003c/p\u003e\n"],["\u003cp\u003eOrganic media and non-media treatment prior parameters (\u003ccode\u003ebeta_om\u003c/code\u003e, \u003ccode\u003ebeta_orf\u003c/code\u003e, and \u003ccode\u003egamma_n\u003c/code\u003e) are independent of the \u003ccode\u003epaid_media_prior_type\u003c/code\u003e setting and the revenue status of the KPI.\u003c/p\u003e\n"],["\u003cp\u003eThe table indicates the relationship between the \u003ccode\u003epaid_media_prior_type\u003c/code\u003e, the type of outcome, the Prior Type, and the corresponding parameter that must be customized in \u003ccode\u003ePriorDistribution\u003c/code\u003e.\u003c/p\u003e\n"]]],["Meridian allows setting priors for causal effects using `ModelSpec`'s `paid_media_prior_type`, choosing between ROI, mROI, or coefficient (beta_m). The `PriorDistribution` object defines these priors via `roi_m`, `mroi_m`, `beta_m` (for paid media), or `beta_om`/`beta_orf`(organic) or `gamma_n` (non-media). Default priors depend on `paid_media_prior_type` and whether the outcome is revenue-based, for example, 'roi' type for revenue default to ROI. Users can set custom priors with the corresponding parameters in `PriorDistribution`.\n"],null,["Meridian offers multiple ways to parameterize the causal effect of each\ntreatment variable on the KPI. We refer to each option as different\n*model parameterizations*. In Bayesian inference, a prior must be set on the\nparameters of the model. So the model parameterization determines what precisely\none is setting a prior on.\n\nThe prior type can be specified for each treatment type. The\n[`ModelSpec`](/meridian/reference/api/meridian/model/spec/ModelSpec) contains\narguments `media_prior_type`, `rf_prior_type`, `organic_media_prior_type`,\n`organic_rf_prior_type`, and `non_media_treatments_prior_type`, which allow\nyou to specify whether a prior is placed on ROI, mROI, contribution, or the\ncoefficient mean. (ROI and mROI priors are only available for paid media.)\n\nThe\n[`PriorDistribution`](/meridian/reference/api/meridian/model/prior_distribution/PriorDistribution)\nobject has an argument for each combination of treatment type and prior type.\nFor each treatment type, only the argument corresponding to the selected prior\ntype is used. The others are ignored. For example, the arguments corresponding\nto non-R\\&F paid media are `roi_m`, `mroi_m`, `contribution_m`, and `beta_m`. If\n`media_prior_type` is `'roi'`, then `roi_m` is used and the others are ignored.\n\nEach model parameterization has a different default prior distribution. The\nfollowing tables summarize the default priors under each model parameterization.\n\nPaid media\n\nThe following table summarizes the model parameterization and default priors for\nthe causal effect of paid media on the KPI. These vary based on the\n`media_prior_type` and `rf_prior_type` arguments in `ModelSpec`. The model\nparameterization and default priors also depend on whether\n[outcome](/meridian/docs/basics/glossary) is revenue. Outcome is revenue when\neither the KPI is revenue or when `revenue_per_kpi` is passed to `InputData`.\nOutcome is not revenue (\"non-revenue\") when the KPI is not revenue and\n`revenue_per_kpi` is not passed to `InputData`. The table also includes a column\nindicating the corresponding parameter in the `PriorDistribution` container that\nallows one to customize the prior.\n\n| Model Type || Default Prior ||\n| `media_prior_type/rf_prior_type` | Outcome | Prior Type | Parameter in `PriorDistribution` |\n|----------------------------------|-------------|-------------------------------|-------------------------------------|\n| `'roi'` (default) | Revenue | ROI | `roi_m`, `roi_rf` |\n| `'roi'` (default) | Non-revenue | Total paid media contribution | `roi_m`, `roi_rf` |\n| `'mroi'` | Revenue | mROI | `mroi_m`, `mroi_rf` |\n| `'mroi'` | Non-revenue | No default, must set custom | `mroi_m`, `mroi_rf` |\n| `'contribution'` | Revenue | Contribution | `contribution_m`, `contribution_rf` |\n| `'contribution'` | Non-revenue | Contribution | `contribution_m`, `contribution_rf` |\n| `'coefficient'` | Revenue | Coefficient | `beta_m`, `beta_rf` |\n| `'coefficient'` | Non-revenue | Coefficient | `beta_m`, `beta_rf` |\n\nThe distribution used as the default prior for each model parameterization is\nsummarized in\n[Default prior distributions](/meridian/docs/advanced-modeling/default-prior-distributions).\n\nUnder each scenario listed in the table, set a custom prior using the\nappropriate `PriorDistribution` parameter indicated in the table. When setting a\ncustom prior, it's important to understand what you are setting a custom prior\non. For more on the definition of ROI, mROI, and Contribution see [ROI, mROI,\nand Contribution parameterizations](/meridian/docs/basics/roi-mroi-contribution-parameterizations).\nFor more on the definition of a coefficient, see the [model\nspecification](/meridian/docs/basics/model-spec). For more on the total paid\nmedia contribution prior, see [Custom total paid media contribution\nprior](/meridian/docs/advanced-modeling/unknown-revenue-kpi-default#default-total-paid-media-contribution-prior).\n\nOrganic media\n\nThe default prior for treatment effects of organic media is specified by the\n`organic_media_prior_type` and `organic_rf_prior_type` arguments. The options\nare `'contribution'` and `'coefficient'`, with `'contribution'` being the\ndefault. If contribution priors are used, then a prior distribution is specified\non the\n[`contribution_om` and `contribution_orf`](/meridian/docs/advanced-modeling/default-prior-distributions#contribution_m_contribution_rf_contribution_om_and_contribution_orf)\nparameters. If coefficient priors are used, then a prior distribution is\nspecified on the\n[`beta_om` and `beta_orf`](/meridian/docs/advanced-modeling/default-prior-distributions#beta_m_beta_rf_beta_om_and_beta_orf)\nparameters.\n\nNon-media treatments\n\nThe default prior for treatment effects of non-media_treatments is specified by\nthe `non_media_treatments_prior_type` argument. The options are `'contribution'`\nand `'coefficient'`, with `'contribution'` being the default regardless of\nwhether the outcome is revenue. If contribution priors are used, then a prior\ndistribution is specified on the\n[`contribution_n`](/meridian/docs/advanced-modeling/default-prior-distributions#contribution_n)\nparameter. If coefficient priors are used, then a prior distribution is\nspecified on the\n[`gamma_n`](/meridian/docs/advanced-modeling/default-prior-distributions#gamma_c_and_gamma_n)\nparameter."]]