mbgcnbd.PlotTrackingCum | R Documentation |
Plots the actual and expected cumulative total repeat transactions by all customers for the calibration and holdout periods, and returns this comparison in a matrix.
mbgcnbd.PlotTrackingCum(
params,
T.cal,
T.tot,
actual.cu.tracking.data,
xlab = "Week",
ylab = "Cumulative Transactions",
xticklab = NULL,
title = "Tracking Cumulative Transactions",
ymax = NULL,
legend = c("Actual", "Model")
)
bgcnbd.PlotTrackingCum(
params,
T.cal,
T.tot,
actual.cu.tracking.data,
xlab = "Week",
ylab = "Cumulative Transactions",
xticklab = NULL,
title = "Tracking Cumulative Transactions",
ymax = NULL,
legend = c("Actual", "Model")
)
params |
A vector with model parameters |
T.cal |
A vector to represent customers' calibration period lengths. |
T.tot |
End of holdout period. Must be a single value, not a vector. |
actual.cu.tracking.data |
A vector containing the cumulative number of repeat transactions made by customers for each period in the total time period (both calibration and holdout periods). |
xlab |
Descriptive label for the x axis. |
ylab |
Descriptive label for the y 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. |
ymax |
Upper boundary for y axis. |
legend |
plot legend, defaults to 'Actual' and 'Model'. |
Note: Computational time increases with the number of unique values of
T.cal
.
Matrix containing actual and expected cumulative repeat transactions.
mbgcnbd.ExpectedCumulativeTransactions
## Not run:
data("groceryElog")
groceryElog <- groceryElog[groceryElog$date < "2006-06-30", ]
cbs <- elog2cbs(groceryElog, T.cal = "2006-04-30")
cum <- elog2cum(groceryElog)
params <- mbgcnbd.EstimateParameters(cbs, k = 2)
mbgcnbd.PlotTrackingCum(params, cbs$T.cal,
T.tot = max(cbs$T.cal + cbs$T.star), cum)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.