Skip to main content

choose_order R Code

R

#Load library and data

library(ChannelAttributionPro)

data(PathData)

password="yourpassword"

#Choose the best Markov model using AUC reading data from a data.frame

res=choose_order(Data, var_path="path", var_conv="total_conversions",var_null="total_null",
plot=0, cha_sep=">",password=password)
print(res$suggested_order)

#Choose the best Markov model using AUC reading data from a file

res=choose_order(Data="Data.csv", var_path="path", var_conv="total_conversions",
var_null="total_null",
cha_sep=">", row_sep=";", plot=0, password=password)
print(res$suggested_order)

#choose the best Markov model using Area under Precision-Recall Curve

res=choose_order(Data="Data.csv", var_path="path", var_conv="total_conversions",
var_null="total_null",
cha_sep=">", row_sep=";", type='auc-prerec', plot=0, password=password)
print(res$suggested_order)