Skip to main content
Version: 3.20.1

mmm_attribution

mmm_attribution estimates attribution from aggregated marketing signals. The function requires a D_variables table with variable, channel, measure, and prior_weight, so signals measured on different scales can be compared more realistically. prior_weight: business weight assigned to each raw signal. A common way to estimate it is conversions / touchpoints or conversions / cost, but it can also be set from domain knowledge or historical benchmarks. Use the parameters below to select the model, lag depth, diagnostics, and runtime options.

PARAMETERTYPEDEFAULTDESCRIPTION
Datadata.frame / tablerequiredAggregated dataset containing a timestamp column, the target column, and the marketing or business signal columns used for attribution.
D_variablesdata.frame / tablerequiredMapping table with one row per input signal. It must contain variable, channel, measure, and prior_weight. prior_weight is the business weight assigned to each raw signal. A common way to estimate it is conversions / touchpoints or conversions / cost, but it can also be set from domain knowledge or historical benchmarks.
targetstringrequiredName of the target column in Data. The target must exist in Data and must not be included in D_variables.
modelstring"linear"Attribution engine. Allowed values are "linear", "reward", and "copula".
max_pinteger12Maximum lag depth considered when evaluating the relationship between input signals and the target.
nsiminteger1000Simulation parameter used by model components that require simulation, kept for API consistency.
seedinteger1234567Random seed used for reproducible results where random or simulation-based components are involved.
return_diagnosticsboolFalseIf True, returns additional diagnostic tables useful to inspect signal weights, scoring, saturation, and attribution shares.
verboseinteger / bool1Controls runtime logging. Use 0 or False to reduce printed output.
ncoreinteger1Number of cores used by supported computation steps.
passwordstringoptionalChannelAttributionPro license token.

Example structure for D_variables:

variablechannelmeasureprior_weight
google_clicksgoogle_adsclicks0.25
google_impressionsgoogle_adsimpressions0.015
facebook_impressionsfacebook_adsimpressions0.015
email_clicksemailclicks0.30
direct_searchesdirectsearches0.50