The cross-validated error across the decay grid, with the minimum (filled)
and the one-standard-error choice (open) marked. A flat profile is the
finding: the data does not pin carryover down, however precise best
looks.
Arguments
- x
An object from
tune_carryover()ortune_carryover_joint().- truth
Optional known decay (a number, or for the joint version a vector named by channel), drawn as a muted reference line. Useful on simulated data.
- ...
Ignored.
Examples
set.seed(42)
spend <- pmax(0, rnorm(120, 500, 250))
kpi <- 200 + 0.5 * adstock_geometric(spend, decay = 0.7) + rnorm(120, sd = 30)
tuned <- tune_carryover(spend, kpi, decays = seq(0.05, 0.95, by = 0.05))
plot(tuned, truth = 0.7)