Learn R Programming

BTYDplus (version 0.7.2)

bgcnbd.ConditionalExpectedTransactions: BG/CNBD-k Conditional Expected Transactions

Description

Uses BG/CNBD-k model parameters and a customer's past transaction behavior to return the number of transactions they are expected to make in a given time period.

Usage

bgcnbd.ConditionalExpectedTransactions(params, T.star, x, t.x, T.cal,
  dropout_at_zero = FALSE)

Arguments

params

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

T.star

length of time for which we are calculating the expected number of transactions.

x

number of repeat transactions in the calibration period T.cal, or a vector of calibration period frequencies.

t.x

recency, i.e. length between first and last transaction during calibration period.

T.cal

length of calibration period, or a vector of calibration period lengths.

dropout_at_zero

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

Value

Number of transactions a customer is expected to make in a time period of length t, conditional on their past behavior. If any of the input parameters has a length greater than 1, this will be a vector of expected number of transactions.

References

Platzer Michael, and Thomas Reutterer (forthcoming)

See Also

bgcnbd.EstimateParameters

Examples

Run this code
# NOT RUN {
cbs <- cdnow.sample()$cbs # load CDNow summary data
params <- bgcnbd.EstimateParameters(cbs)
xstar.est <- bgcnbd.ConditionalExpectedTransactions(params, cbs$T.star, cbs$x, cbs$t.x, cbs$T.cal)
sum(xstar.est) # expected total number of transactions during holdout
# }

Run the code above in your browser using DataLab