Learn R Programming

BTYDplus (version 0.7.2)

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.

See Also

bgcnbd.ExpectedCumulativeTransactions

Examples

Run this code
# NOT RUN {
cbs <- cdnow.sample()$cbs
params <- mbgcnbd.EstimateParameters(cbs)
# 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.
mbgcnbd.ExpectedCumulativeTransactions(params, T.cal = cbs$T.cal, T.tot = 78, n.periods.final = 78)
# }

Run the code above in your browser using DataLab