transition_matrix: Transition matrix.

Description Usage Arguments Value Author(s) Examples

View source: R/ChannelAttribution.R

Description

Estimate a k-order transition matrix from customer journey data.

Usage

1
2
transition_matrix(Data, var_path, var_conv, var_null, order=1, sep=">", 
                  flg_equal=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 paths that do not lead to conversions.

order

Markov Model order.

sep

separator between the channels.

flg_equal

if TRUE, transitions from a channel to itself will be considered.

Value

An object of class List containing a dataframe with channel names and a dataframe with the estimated transition matrix.

Author(s)

Davide Altomare (info@channelattribution.net).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

library(ChannelAttribution)

data(PathData) 

transition_matrix(Data, var_path="path", var_conv="total_conversions",
                  var_null="total_null", order=1, sep=">", flg_equal=TRUE)

transition_matrix(Data, var_path="path", var_conv="total_conversions",
                  var_null="total_null", order=3, sep=">", flg_equal=TRUE)


## End(Not run)

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