The standard Meridian model is a geo-level hierarchical model with non-linear parametric transformations on the media variables. Random coefficients account for heterogeneity across geographical regions.
We recommend using geo-level data as it provides more reliable estimation. A national model, essentially a single-geo model, is available for cases where geo-level data is unavailable.
The Meridian model is an extension of Bayesian models previously proposed (Jin et al. 2017 and Sun et al. 2017). Extensions include the use of reach and frequency data (Zhang et al. 2023), the inclusion of time-varying intercept terms to model trend and seasonality (related to trend and seasonality modeling by Ng et al. 2021) and the addition of non-media treatments and organic media variables.
The model is represented as follows:
Basic details
The basic details are:
Index variables, as defined in Input data:
- \(g=1,\ldots,G\) indexes the geographical units
- \(t=1,\ldots,T\) indexes the time units
- \(i=1,\ldots,N_C\) indexes the control variables
- \(i=1,\ldots,N_N\) indexes the non-media treatments
- \(i=1,\ldots,N_M\) indexes the paid media channels without reach and frequency data
- \(i=1,\ldots, N_{OM}\) indexes the organic media channels without reach and frequency data
- \(i=1,\ldots,N_{RF}\) indexes the paid media channels with reach and frequency data
- \(i=1,\ldots, N_{ORF}\) indexes the organic media channels with reach and frequency data
\(\tau_b = 0\) for identifiability for some baseline geo \(b\). Any geo can be set as the baseline using the
baseline_group
argument.\(\{q_{t-s}\}^L_{s=0}\) denotes the vector \((q_t, q_{t-1}, \ldots, q_{t-L})\). This notation is used to denote Adstock function input values.
The integer value \(L\) is the media maximum lag duration, such as the maximum media effect duration. This parameter can be set using the
max_lag
argument.Note the following about the \(\text{Hill}()\) and \(\text{Adstock}()\) functions. For more information, see Media saturation and lagging.
$$ \text{Adstock} \left( \left\{ q_{t-s} \right\}^L_{s=0},\ \alpha \right) = \dfrac{\sum\limits^{L}_{s=0}\ \alpha^s q_{t-s} }{\sum\limits^L_{s=0}\ \alpha^s} $$Where:
- \(q>0,\ 0 \leq \alpha \leq 1\)
- \(\alpha \) is the geometric decay rate.
$$ \text{Hill} \left( q, ec, \text{slope} \right) = \left( 1 + \left( \dfrac{q}{ec} \right)^{- \text{slope} } \right)^{-1} $$Where:
- \(q>0,\ ec>0,\ \text{slope} > 0\)
- \(ec, \text{slope}\) are Hill function shape and slope parameters.
The \(\text{HillAdstock}()\) function depends on the
hill_before_adstock
argument.- If the default
hill_before_adstock = False
, then \(\text{HillAdstock}(q;\ \alpha, ec, \text{slope}) = \text{Hill}(\text{Adstock}(q;\ \alpha);\ ec, \text{slope})\) - If
hill_before_adstock = True
, then \(\text{HillAdstock}(q;\ \alpha, ec, \text{slope}) = \text{Adstock}(\text{Hill}(q;\ ec, \text{slope}); \alpha)\)
- If the default
\( \mu_t \) parameters
The \(\mu_t\) parameters are time-varying intercepts that contribute a trend and seasonality component to the model:
\(\mu_t\) are determined by a series of
knot
parameters \(b_1,b_2,\dots,b_K\), where \(K\) is a user-specified number.The knots are located at time points between \(1\) and \(T\), and the knot positions are specified by the
knots
argument.You can specify a list of knot locations, or just the number of knots.
If the number of knots is specified, then knots are evenly spaced with two of the knots at the endpoints \(t=1\) and \(t=T\).
When there are multiple geos (\(G>1\)), the default places a knot at each time point \(t=1,2,\dots,T\).
When \(G=1\) (such as a national-level model), the default is a single knot, which is effectively a common intercept across all time periods.
The \(\mu_t\) values are a weighted average of the two closest neighboring knots. For any \(t\), define:
\(b_0(t)=\max\{b_k:b_k\leq t\}\) and \(b_1(t)=\min\{b_k:b_k \geq t\}\)
\(w_0(t)=\ \dfrac{b_1(t)-t}{b_1(t)-b_0(t)}\)
\(\mu_t =\ w_0(t)b_0(t)\ +\ (1-w_0(t))b_1(t)\)
The knot values \(b_1,b_2,\dots,b_K\) have a user-specified prior distribution.
This methodology is based on Bayesian Time Varying Coefficient Model with Applications to Marketing Mix Modeling, with some key distinctions, including the use of a different weight function, distinct priors, the absence of autoregression, and the optional utilization of trigonometric basis functions.
For more information about setting knots, see How the knots
argument
works.
Other parameter distributions
Other parameter distributions are as follows:
Note that here Meridian parameterizes the Normal distribution in terms of its mean and standard deviation.
- \(\gamma_{g,i}^{[C]} \sim \text{Normal}(\gamma_i^{[C]},\xi_i^{[C]})\)
- \(\gamma_{g,i}^{[N]} \sim \text{Normal}(\gamma_i^{[N]},\xi_i^{[N]})\)
The \(\beta\) distributions depends on the
media_effects_dist
argument, as follows:- \(log(\beta_{g,i}^{[M]})\sim \text{Normal}( \beta_i^{[M]},\eta_i^{[M]})\)
- \(log(\beta_{g,i}^{[OM]})\sim \text{Normal}( \beta_{i}^{[OM]},\eta_{i}^{[OM]})\)
- \(log(\beta_{g,i}^{[RF]})\sim \text{Normal}( \beta_{i}^{[RF]},\eta_{i}^{[RF]})\)
\(log(\beta_{g,i}^{[ORF]})\sim \text{Normal}( \beta_{i}^{[ORF]},\eta_{i}^{[ORF]})\)
if
media_effects_dist = LOG_NORMAL
\(\beta_{g,i}^{[M]} \sim \text{Normal}( \beta_i^{[M]},\eta_i^{[M]})\)
\(\beta_{g,i}^{[OM]} \sim \text{Normal}( \beta_{i}^{[OM]},\eta_{i}^{[OM]})\)
\(\beta_{g,i}^{[RF]} \sim \text{Normal}( \beta_{i}^{[RF]},\eta_{i}^{[RF]})\)
\(\beta_{g,i}^{[ORF]} \sim \text{Normal}( \beta_{i}^{[ORF]},\eta_{i}^{[ORF]})\)
if
media_effects_dist = NORMAL
\(\epsilon_{g,t}\sim \text{Normal}(0,\sigma_g)\):
The residuals are independent of each other, all media and control variables, and all model parameters.
If
unique_sigma_for_each_geo = False
(which is the default), then \(\sigma_1=\sigma_2=\cdots=\sigma_G=\sigma\).
The remaining parameters all have user-specified prior distributions:
\( \{\gamma_i^{[C]}\}, \{\gamma_i^{[N]}\}, \{\xi_i^{[C]}\}, \{\xi_i^{[N]}\}, \)
\( \{\beta_i^{[M]}\}, \{ \beta_{i}^{[OM]} \}, \{ \beta_{i}^{[RF]} \}, \{ \beta_{i}^{[ORF]} \}, \)
\( \{\eta_i^{[M]}\}, \{ \eta_{i}^{[OM]} \}, \{\eta_{i}^{[RF]}\}, \{ \eta_{i}^{[ORF]} \}, \)
\( \{\alpha_i^{[M]}\}, \{ \alpha_{i}^{[OM]} \}, \{\alpha_{i}^{[RF]}\}, \{ \alpha_{i}^{[ORF]} \}, \)
\( \{ec_i^{[M]}\}, \{ ec_{i}^{[OM]} \}, \{ec_{i}^{[RF]}\}, \{ ec_{i}^{[ORF]} \}, \)
\( \{slope_i^{[M]}\}, \{ slope_{i}^{[OM]} \}, \{slope_{i}^{[RF]}\}, \{ slope_{i}^{[ORF]} \}, \)
\( \{\tau_g\}, \{\sigma_g\}. \)
You can change some aspects of the model specification, based on modeling options covered in the following sections: Media saturation and lagging, Reach and frequency, Paid search, and ROI priors for calibration. You can also customize the default prior distributions.