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

Description Usage Arguments Details Value Examples

View source: R/mbg-cnbd-k.R

Description

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

Usage

1
2
3
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.

Details

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

Value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

## End(Not run)

BTYDplus documentation built on Jan. 21, 2021, 5:10 p.m.