Learn R Programming

BTYDplus (version 0.7.2)

bgcnbd.ExpectedCumulativeTransactions: BG/CNBD-k Expected Cumulative Transactions

Description

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

Usage

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

Arguments

params

BG/CNBD-k parameters - a vector with k, r, alpha, a and b in that order.

T.cal

a vector to represent customers' calibration period lengths (in other words, the 'T.cal' column from a customer-by-sufficient-statistic matrix).

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.

dropout_at_zero

Boolean; the mbg-methods are simple wrapper methods, which set this parameter to TRUE

Value

Vector of expected cumulative total repeat transactions by all customers.

See Also

bgnbd.ExpectedCumulativeTransactions

Examples

Run this code
# NOT RUN {
cbs <- cdnow.sample()$cbs
params <- c(1, 0.243, 4.414, 0.793, 2.426)
# Returns a vector containing cumulative repeat transactions for 546 days.
# All parameters are in weeks; the calibration period lasted 39 weeks
# and the holdout period another 39.
bgcnbd.ExpectedCumulativeTransactions(params, T.cal = cbs$T.cal, T.tot = 78, n.periods.final = 78)
# }

Run the code above in your browser using DataLab