Learn R Programming

BTYDplus (version 1.2.0)

mbgcnbd.ExpectedCumulativeTransactions: (M)BG/CNBD-k Expected Cumulative Transactions

Description

Calculates the expected cumulative total repeat transactions by all customers for the calibration and holdout periods.

Usage

mbgcnbd.ExpectedCumulativeTransactions(params, T.cal, T.tot, n.periods.final)

bgcnbd.ExpectedCumulativeTransactions(params, T.cal, T.tot, n.periods.final)

Arguments

params

A vector with model parameters k, r, alpha, a and b, in that order.

T.cal

A vector to represent customers' calibration period lengths.

T.tot

End of holdout period. Must be a single value, not a vector.

n.periods.final

Number of time periods in the calibration and holdout periods.

Value

Vector of length n.periods.final with expected cumulative total repeat transactions by all customers.

Details

Note: Computational time increases with the number of unique values of T.cal.

Examples

Run this code
# NOT RUN {
data("groceryElog")
cbs <- elog2cbs(groceryElog)
params <- mbgcnbd.EstimateParameters(cbs, k = 2)
# Returns a vector containing expected cumulative repeat transactions for 104
# weeks, with every eigth week being reported.
mbgcnbd.ExpectedCumulativeTransactions(params,
  T.cal = cbs$T.cal,
  T.tot = 104,
  n.periods.final = 104 / 8)
# }

Run the code above in your browser using DataLab