Learn R Programming

ChannelAttribution (version 1.1)

markov_model: Markov Model for the online attribution problem

Description

Estimate a first-order Markov model from customer journey data.

Usage

markov_model(Dy, var_channel, var_conv, var_value, 
             nsim = 2e+06, n_boot = 1e+06, n_single_boot = 30, out_trans_matrx = 0)

Arguments

Dy
data.frame containing paths and conversions.
var_channel
name of the the column containing paths.
var_conv
name of the column containing total conversions.
var_value
name of the column containing total conversion value.
nsim
number of total simulations from transition matrix.
n_boot
number of bootstrap samples from the empirical distribution of the maxium number of steps between channels.
n_single_boot
dimension of the bootstrap sample.
out_trans_matrx
if set to 1 return the transition matrix between channels.

Value

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

Examples

Run this code
data(PathData) 

markov_model(Dy, "channel_path", "total_conversions", "total_conversion_value")

Run the code above in your browser using DataLab