bgbb.PlotTrackingInc {BTYD}R Documentation

BG/BB Tracking Incremental Transactions Plot


Plots the actual and expected incremental total repeat transactions by all customers for the calibration and holdout periods. Also returns a matrix of this comparison.


  xlab = "Time",
  ylab = "Transactions",
  xticklab = NULL,
  title = "Tracking Incremental Transactions"



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.


recency-frequency matrix. It must contain columns for frequency ("x"), recency ("t.x"), number of transaction opportunities in the calibration period (""), 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.

vector containing the incremental number of repeat transactions made by customers in all transaction opportunities (both calibration and holdout periods). Its unit of time should be the same as the units of the recency-frequency matrix used to estimate the model parameters.


descriptive label for the x axis.


descriptive label for the y axis.


vector containing a label for each tick mark on the x axis.


title placed on the top-center of the plot.


The holdout period should immediately follow the calibration period. This function assumes that all customers' calibration periods end on the same date, rather than starting on the same date (thus customers' birth periods are determined using max( - rather than assuming that they are all 0).


Matrix containing actual and expected incremental repeat transactions.


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.


# donationsSummary$rf.matrix already has appropriate column names
rf.matrix <- donationsSummary$rf.matrix

# starting-point parameters
startingparams <- c(1, 1, 0.5, 3)
# estimated parameters
est.params <- bgbb.EstimateParameters(rf.matrix, startingparams)

# get the annual repeat transactions <- donationsSummary$annual.trans

# Set appropriate x-axis
x.tickmarks <- c( "'96","'97","'98","'99","'00","'01","'02","'03","'04","'05","'06" )

# Plot actual vs. expected transactions. The calibration period was 6 periods long.
bgbb.PlotTrackingInc(est.params, rf.matrix,, xticklab=x.tickmarks)

[Package BTYD version 2.4.3 Index]