mbgcnbd.PlotFreqVsConditionalExpectedFrequency | R Documentation |
Plots the actual and conditional expected number transactions made by customers in the holdout period, binned according to calibration period frequencies, and returns this comparison in a matrix.
mbgcnbd.PlotFreqVsConditionalExpectedFrequency(
params,
T.star,
cal.cbs,
x.star,
censor,
xlab = "Calibration period transactions",
ylab = "Holdout period transactions",
xticklab = NULL,
title = "Conditional Expectation"
)
bgcnbd.PlotFreqVsConditionalExpectedFrequency(
params,
T.star,
cal.cbs,
x.star,
censor,
xlab = "Calibration period transactions",
ylab = "Holdout period transactions",
xticklab = NULL,
title = "Conditional Expectation"
)
params |
A vector with model parameters |
T.star |
Length of the holdout period. |
cal.cbs |
Calibration period CBS (customer by sufficient statistic). It must contain columns for frequency ('x'), recency ('t.x') and total time observed ('T.cal'). |
x.star |
Vector of transactions made by each customer in the holdout period. |
censor |
Cutoff point for number of transactions in plot. |
xlab |
Descriptive label for the x axis. |
ylab |
Descriptive label for the x axis. |
xticklab |
A vector containing a label for each tick mark on the x axis. |
title |
Title placed on the top-center of the plot. |
Holdout period transaction frequency comparison matrix (actual vs. expected).
bgcnbd.PlotFreqVsConditionalExpectedFrequency
## Not run:
data("groceryElog")
cbs <- elog2cbs(groceryElog, T.cal = "2006-09-30")
params <- mbgcnbd.EstimateParameters(cbs, k=2)
mbgcnbd.PlotFreqVsConditionalExpectedFrequency(params, T.star=52, cbs, cbs$x.star, censor=7)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.