mbgcnbd.PlotFrequencyInCalibration {BTYDplus} | R Documentation |
(M)BG/CNBD-k Plot Frequency in Calibration Period
Description
Plots a histogram and returns a matrix comparing the actual and expected number of customers who made a certain number of repeat transactions in the calibration period, binned according to calibration period frequencies.
Usage
mbgcnbd.PlotFrequencyInCalibration(
params,
cal.cbs,
censor = 7,
xlab = "Calibration period transactions",
ylab = "Customers",
title = "Frequency of Repeat Transactions"
)
bgcnbd.PlotFrequencyInCalibration(
params,
cal.cbs,
censor = 7,
xlab = "Calibration period transactions",
ylab = "Customers",
title = "Frequency of Repeat Transactions"
)
Arguments
params |
A vector with model parameters |
cal.cbs |
Calibration period CBS (customer by sufficient statistic). It must contain columns for frequency ('x') and total time observed ('T.cal'). |
censor |
Cutoff point for number of transactions in plot. |
xlab |
Descriptive label for the x axis. |
ylab |
Descriptive label for the y axis. |
title |
Title placed on the top-center of the plot. |
Value
Calibration period repeat transaction frequency comparison matrix (actual vs. expected).
References
(M)BG/CNBD-k: Reutterer, T., Platzer, M., & Schroeder, N. (2020). Leveraging purchase regularity for predicting customer behavior the easy way. International Journal of Research in Marketing. doi: 10.1016/j.ijresmar.2020.09.002
Examples
## Not run:
data("groceryElog")
cbs <- elog2cbs(groceryElog)
params <- mbgcnbd.EstimateParameters(cbs)
mbgcnbd.PlotFrequencyInCalibration(params, cbs)
## End(Not run)