markov_model {ChannelAttribution} | R Documentation |
Estimate a k-order Markov model from customer journey data.
markov_model(Data, var_path, var_conv, var_value=NULL, var_null=NULL, order=1, nsim=NULL, max_step=NULL, out_more=FALSE, sep=">", seed=NULL)
Data |
data.frame containing paths and conversions. |
var_path |
column name containing paths. |
var_conv |
column name containing total conversions. |
var_value |
column name containing total conversion value. |
var_null |
column name containing total paths that do not lead to conversions. |
order |
Markov Model order. |
nsim |
total simulations from transition matrix. |
max_step |
maximum number of steps for a single simulated path. |
out_more |
if TRUE returns the transition probabilities between channels and removal effects. |
sep |
separator between the channels. |
seed |
random seed. Giving to this parameter the same value over different runs guarantee that results will not vary. |
An object of class
data.frame
with the estimated number of conversions and the estimated conversion value attributed to each channel.
Davide Altomare (davide.altomare@gmail.com).
## Not run: library(ChannelAttribution) data(PathData) markov_model(Data, "path", "total_conversions") markov_model(Data, "path", "total_conversions", var_value="total_conversion_value") markov_model(Data,"path","total_conversions", var_value="total_conversion_value", var_null="total_null") markov_model(Data, "path", "total_conversions", var_value="total_conversion_value", var_null="total_null", out_more=TRUE) ## End(Not run)