pnbd.DERT {BTYD}R Documentation

Pareto/NBD Discounted Expected Residual Transactions


Calculates the discounted expected residual transactions of a customer, given their behavior during the calibration period.


pnbd.DERT(params, x, t.x,, d, hardie = TRUE)



Pareto/NBD parameters - a vector with r, alpha, s, and beta, in that order. r and alpha are unobserved parameters for the NBD transaction process. s and beta are unobserved parameters for the Pareto (exponential gamma) dropout process.


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


time of most recent repeat transaction, or a vector of recencies.

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


the discount rate to be used. Make sure that it matches up with your chosen time period (do not use an annual rate for monthly data, for example).


if TRUE, use h2f1 instead of hypergeo.


DERT(d | r, alpha, s, beta, X = x, t.x,

x, t.x, may be vectors. The standard rules for vector operations apply


The number of discounted expected residual transactions for a customer with a particular purchase pattern during the calibration period.


Fader, Peter S., Bruce G.S. Hardie, and Ka L. Lee. "RFM and CLV: Using Iso-Value Curves for Customer Base Analysis." Journal of Marketing Research Vol.42, pp.415-430. November. 2005.

See equation 2.

Note that this paper refers to what this package is calling discounted expected residual transactions (DERT) simply as discounted expected transactions (DET).


# elog <- dc.ReadLines(system.file("data/cdnowElog.csv", package="BTYD2"),2,3)
# elog[, 'date'] <- as.Date(elog[, 'date'], format = '%Y%m%d')
# <- dc.ElogToCbsCbt(elog)$cal$cbs
# params <- pnbd.EstimateParameters(, hardie = TRUE)
params <- c(0.5629966, 12.5590370, 0.4081095, 10.5148048)

# 15% compounded annually has been converted to 0.0027 compounded continuously,
# as we are dealing with weekly data and not annual data.
d <- 0.0027

# calculate the discounted expected residual transactions of a customer
# who made 7 transactions in a calibration period that was 77.86
# weeks long, with the last transaction occurring at the end of
# the 35th week.
          x = 7, 
          t.x = 35, 
 = 77.86, 
          hardie = TRUE)

# We can also use vectors to compute DERT for several customers:
          x = 1:10, 
          t.x = 30, 
 = 77.86, 
          hardie = TRUE)

[Package BTYD version 2.4.3 Index]