auto_markov_model: Automatic Markov Model.

Description Usage Arguments Value Author(s) Examples

View source: R/ChannelAttribution.R

Description

Estimate a Markov model from customer journey data after automatically choosing a suitable order. It requires paths that do not lead to conversion as input.

Usage

1
2
3
4
5
auto_markov_model(Data, var_path, var_conv, var_null, var_value=NULL, 
             max_order=10, roc_npt=100, plot=FALSE, nsim_start=1e5, 
             max_step=NULL, out_more=FALSE, sep=">", 
             ncore=1, nfold=10, seed=0, conv_par=0.05, rate_step_sim=1.5, 
             verbose=TRUE)

Arguments

Data

data.frame containing customer journeys data.

var_path

column name containing paths.

var_conv

column name containing total conversions.

var_null

column name containing total paths that do not lead to conversions.

var_value

column name containing total conversion value.

max_order

maximum Markov Model order considered.

roc_npt

number of points used for approximating roc and auc.

plot

if TRUE, a plot with penalized auc with respect to order will be displayed.

nsim_start

minimum number of simulations used in computation.

max_step

maximum number of steps for a single simulated path. if NULL, it is the maximum number of steps found into Data.

out_more

if TRUE, transition probabilities between channels and removal effects will be shown.

sep

separator between the channels.

ncore

number of threads used in computation.

nfold

how many repetitions are used to verify if convergence is reached at each iteration.

seed

random seed. Giving this parameter the same value over different runs guarantees that results will not vary.

conv_par

convergence parameter for the algorithm. The estimation process ends when the percentage of variation of the results over different repetitions is less than convergence parameter.

rate_step_sim

number of simulations used at each iteration is equal to the number of simulations used at previous iteration multiplied by rate_step_sim.

verbose

if TRUE, additional information about process convergence will be shown.

Value

An object of class data.frame with the estimated number of conversions and the estimated conversion value attributed to each channel.

Author(s)

Davide Altomare (info@channelattribution.net).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 

library(ChannelAttribution)

data(PathData) 

auto_markov_model(Data, "path", "total_conversions", "total_null")


## End(Not run)

ChannelAttribution documentation built on July 27, 2020, 9:06 a.m.