pnbd.Plot.DERT {BTYD}R Documentation

Pareto/NBD Plot Discounted Expected Residual Transactions


Plots discounted expected residual transactions for different combinations of calibration period frequency and recency.


pnbd.Plot.DERT(params, x, t.x,, d, hardie = TRUE, type = "persp")



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.


must be either "persp" (perspective - 3 dimensional) or "contour". Determines the type of plot produced by this function.


The length of the calibration period must be a single value, not a vector.


A matrix with discounted expected residual transaction values for every combination of calibration period frequency x and calibration period recency t.x.


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.

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


# The RFM and CLV paper uses all 78 weeks of the cdnow data to
# estimate parameters. These parameters can be estimated as follows:
# 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
# pnbd.EstimateParameters(, hardie = TRUE)

# (The final function was run several times with its own output as
# input for starting parameters, to ensure that the result converged).

params <- c(0.5629966, 12.5590370, 0.4081095, 10.5148048)

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

pnbd.Plot.DERT(params = params, 
               x = 0:14, 
               t.x = 0:77, 
      = 77.86, 
               d = d, 
               hardie = TRUE, 
               type = "persp")
pnbd.Plot.DERT(params = params, 
               x = 0:14, 
               t.x = 0:77, 
      = 77.86, 
               d = d, 
               hardie = TRUE, 

[Package BTYD version 2.4.3 Index]