# using a model object
data = read_xcsv("https://raw.githubusercontent.com/paladinic/data/main/ecomm_data.csv")
dv = 'ecommerce'
ivs = c('christmas','black.friday')
trans_df = data.frame(
name = c('diminish', 'decay', 'hill', 'exp'),
ts = c(FALSE,TRUE,FALSE,FALSE),
func = c(
'linea::diminish(x,a)',
'linea::decay(x,a)',
"linea::hill_function(x,a,b,c)",
'(x^a)'
),
order = 1:4
) %>%
dplyr::mutate(offline_media = dplyr::if_else(condition = name == 'hill',
'(1,50),(1),(1,100)',
'')) %>%
dplyr::mutate(offline_media = dplyr::if_else(condition = name == 'decay',
'.1,.7 ',
offline_media)) %>%
dplyr::mutate(promo = '')
model = run_model(data = data,dv = dv,ivs = ivs, trans_df = trans_df)
combos = what_combo(model = model,trans_df = trans_df)
#using the trans_df, data, and dv
what_combo(trans_df = trans_df, data = data, dv = dv)
Run the code above in your browser using DataLab