Skip to contents

Carryover (adstock)

Spread each period’s media forward in time.

adstock_geometric()
Geometric adstock
adstock_weibull()
Weibull adstock
adstock_weights_delayed() adstock_delayed()
Delayed adstock
adstock_filter()
Adstock with an arbitrary kernel
adstock_weights()
Geometric adstock weights
adstock_weights_weibull()
Weibull adstock weights
adstock_state()
Terminal adstock state
adstock_steady_state()
Steady-state starting value for an adstock filter
decay_from_half_life() half_life() effective_window()
Carryover decay vocabulary

Saturation

Diminishing returns, and composing it with carryover.

Choosing carryover parameters

tune_carryover()
Select carryover parameters by cross-validation against a KPI
tune_carryover_joint()
Tune every channel's carryover jointly, inside one model
fit_ols() predict(<mm_ols>) print(<mm_ols>)
Default linear fitter for carryover tuning
rmse() mae()
Minimal error metrics

Diagnostics and reporting

Check the data first; turn a fitted model into a deliverable after.

diagnose_media()
Diagnose media data before modelling
contributions()
Decompose predicted KPI into channel contributions
roi() mroi()
Return on investment and marginal return
marginal_roi()
Average and marginal return by counterfactual simulation
response_curve() spend_for()
Response curve for a channel
block_bootstrap()
Moving block bootstrap for time-series statistics

Plots

A plot() method for each result, in one consistent style.

plot(<mm_carryover>) plot(<mm_carryover_joint>)
Plot a carryover cross-validation profile
plot(<mm_bootstrap>)
Plot bootstrap intervals
plot(<mm_contributions>)
Plot a contribution decomposition
plot(<mm_response_curve>)
Plot a response curve
plot(<mm_attribution>)
Plot attribution shares across rules
mm_palette()
The package's chart palette

tidymodels integration

step_adstock()
Adstock transformation as a recipe step
step_saturation()
Saturation transformation as a recipe step
carryover_decay() carryover_max_lag() saturation_half_max() saturation_shape()
Tuning parameters for media transforms

Journey construction

build_paths()
Build customer journeys from a raw event log
`[`(<mm_paths>)
Subset a journey table
as_channel_paths()
Export journeys in ChannelAttribution's format

Attribution

credit_linear() credit_first() credit_last() credit_position() credit_time_decay() credit_custom()
Assign conversion credit across a journey
markov_removal()
Markov-chain removal effects
attribute()
Attribute conversions to channels under several rules at once
attribution_spread()
How much does the answer depend on the rule?

Journey diagnostics

path_summary()
Journey table summary
path_lengths()
Journey length distribution
channel_positions()
Where each channel sits in the journey
assisted_conversions()
Assisted conversion matrix
top_paths()
Most common journeys
conversion_lag()
Conversion lag distribution
path_diagnostics()
Run every journey diagnostic at once

Data

mm_weekly
Synthetic weekly marketing mix panel
mm_events
Synthetic touchpoint event log

Package

mediamix mediamix-package
mediamix: media transforms and attribution path construction