mbgcnbd.PlotFrequencyInCalibration | R Documentation |
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.
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"
)
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. |
Calibration period repeat transaction frequency comparison matrix (actual vs. expected).
(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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.ijresmar.2020.09.002")}
## Not run:
data("groceryElog")
cbs <- elog2cbs(groceryElog)
params <- mbgcnbd.EstimateParameters(cbs)
mbgcnbd.PlotFrequencyInCalibration(params, cbs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.