Usage
bgbb.PlotFreqVsConditionalExpectedFrequency(params, n.star, rf.matrix, x.star, trunc = NULL, xlab = "Calibration period transactions", ylab = "Holdout period transactions", xticklab = NULL, title = "Conditional Expectation")
Arguments
params
BG/BB parameters - a vector with alpha, beta, gamma, and delta, in that order. Alpha and beta are unobserved parameters for the beta-Bernoulli transaction process. Gamma and delta are unobserved parameters for the beta-geometric dropout process.
n.star
number of transaction opportunities in the holdout period.
rf.matrix
recency-frequency matrix. It must contain columns for frequency ("x"), recency ("t.x"), number of transaction opportunities in the calibration period ("n.cal"), and the number of customers with this combination of recency, frequency and transaction opportunities in the calibration period ("custs"). Note that recency must be the time between the start of the calibration period and the customer's last transaction, not the time between the customer's last transaction and the end of the calibration period.
x.star
a vector containing the number of transactions made in the holdout period by the groups of customers with the same recency and frequency in the calibration period. It must be in the same order as the rf.matrix.
trunc
optional integer used to truncate the plot. In the plot, all
calibration period frequencies above the truncation number will be
removed. If the truncation number is greater than the maximum
frequency, R will warn you and change it to the maximum frequency.
xlab
descriptive label for the x axis.
ylab
descriptive label for the y axis.
xticklab
vector containing a label for each tick mark on the x axis.
title
title placed on the top-center of the plot.