Harlan D. Harris, PhD
August 20th, 2015
Seen purchase yet? Depends on time since intervention, A/B, and maybe seasonality!
purch_time <- function(t, intv) {
prob <- .5 *
# seasonality
(dnorm(t, mean=50, sd=20)*20+1) *
# intervention
ifelse(intv=='A', 1.4, 1)
ifelse(runif(length(intv)) < prob,
rnbinom(length(intv), size=1, prob=.05),
Inf)
}
Model to fit (incomplete!):
purchase ~ interventionAvsB + s(elapsed_time)
Estimates of purchase probability (in 30 ticks) with each treatment
Estimates that A is better == Probability of choosing A