Description Usage Arguments Details Value References See Also Examples
Plots a heatmap based on the conditional expected holdout period frequency for each recency-frequency combination in the calibration period.
1 2 3 4 5 6 7 8 9 | bgbb.HeatmapHoldoutExpectedTrans(
params,
n.cal,
n.star,
xlab = "Recency",
ylab = "Frequency",
xticklab = NULL,
title = "Heatmap of Conditional Expected Transactions"
)
|
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.cal |
number of transaction opportunities in the calibration period. |
n.star |
number of transaction opportunities in the holdout period. |
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. |
E(X(n, n+n*) | alpha, beta, gamma, delta, x, t.x, n). This function requires the holdout period to immediately follow the calibration period.
A matrix containing the conditional expected transactions in the holdout period for each recency-frequency combination in the calibration period. The rows represent calibration period frequencies, and the columns represent calibration period recencies.
Fader, Peter S., Bruce G.S. Hardie, and Jen Shang. "Customer-Base Analysis in a Discrete-Time Noncontractual Setting." Marketing Science 29(6), pp. 1086-1108. 2010. INFORMS. Web.
bgbb.ConditionalExpectedTransactions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(donationsSummary)
rf.matrix <- donationsSummary$rf.matrix
# donationsSummary$rf.matrix already has appropriate column names
# starting-point parameters
startingparams <- c(1, 1, 0.5, 3)
# estimated parameters
est.params <- bgbb.EstimateParameters(rf.matrix, startingparams)
# Plot a heatmap of conditional expected transactions in
# a holdout period of 5 transaction opportunities, given
# that the calibration period consisted of 6 transaction
# opportunities.
bgbb.HeatmapHoldoutExpectedTrans(est.params, n.cal=6, n.star=5)
|
Loading required package: hypergeo
layout: widths = 0.05 4 , heights = 0.25 4 ; lmat=
[,1] [,2]
[1,] 0 3
[2,] 2 1
0 1 2 3 4 5 6
0 0.0728617 0.00000000 0.0000000 0.0000000 0.0000000 0.000000 0.000000
1 0.0000000 0.08569864 0.3142616 0.5939084 0.8394721 1.021772 1.147967
2 0.0000000 0.00000000 0.1191319 0.5361565 1.0576836 1.443129 1.668896
3 0.0000000 0.00000000 0.0000000 0.2236237 1.0346572 1.804798 2.189825
4 0.0000000 0.00000000 0.0000000 0.0000000 0.5832723 2.030136 2.710755
5 0.0000000 0.00000000 0.0000000 0.0000000 0.0000000 1.813105 3.231684
6 0.0000000 0.00000000 0.0000000 0.0000000 0.0000000 0.000000 3.752613
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.