nbd.ConditionalExpectedTransactions: NBD Conditional Expected Transactions

Description Usage Arguments Value Examples

View source: R/nbd.R

Description

Uses NBD 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

1
nbd.ConditionalExpectedTransactions(params, T.star, x, T.cal)

Arguments

params

NBD parameters - a vector with r and alpha, 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.cal

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

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.

Examples

1
2
3
4
5
data("groceryElog")
cbs <- elog2cbs(groceryElog, T.cal = "2006-12-31")
params <- nbd.EstimateParameters(cbs)
xstar.est <- nbd.ConditionalExpectedTransactions(params, cbs$T.star, cbs$x, cbs$T.cal)
sum(xstar.est) # expected total number of transactions during holdout

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