Description Usage Arguments Details Value References Examples
Uses BG/NBD model parameters and a customer's past transaction behavior to return the probability that they are still alive at the end of the calibration period.
1 | bgnbd.PAlive(params, x, t.x, T.cal)
|
params |
BG/NBD parameters - a vector with r, alpha, a, and b, in that order. r and alpha are unobserved parameters for the NBD transaction process. a and b are unobserved parameters for the Beta geometric dropout process. |
x |
number of repeat transactions in the calibration period T.cal, or a vector of transaction frequencies. |
t.x |
time of most recent repeat transaction, or a vector of recencies. |
T.cal |
length of calibration period, or a vector of calibration period lengths. |
P(Alive | X=x, t.x, T.cal, r, alpha, a, b)
x, t.x, and T.cal may be vectors. The standard rules for vector operations apply - if they are not of the same length, shorter vectors will be recycled (start over at the first element) until they are as long as the longest vector. It is advisable to keep vectors to the same length and to use single values for parameters that are to be the same for all calculations. If one of these parameters has a length greater than one, the output will be a vector of probabilities.
Probability that the customer is still alive at the end of the calibration period. If x, t.x, and/or T.cal has a length greater than one, then this will be a vector of probabilities (containing one element matching each element of the longest input vector).
Fader, Peter S.; Hardie, Bruce G.S.and Lee, Ka Lok. “Computing P(alive) Using the BG/NBD Model.” December. 2008. Web.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | params <- c(0.243, 4.414, 0.793, 2.426)
bgnbd.PAlive(params, x=23, t.x=39, T.cal=39)
# P(Alive) of a customer who has the same recency and total
# time observed.
bgnbd.PAlive(params, x=5:20, t.x=30, T.cal=39)
# Note the "increasing frequency paradox".
# To visualize the distribution of P(Alive) across customers:
data(cdnowSummary)
cbs <- cdnowSummary$cbs
params <- bgnbd.EstimateParameters(cbs, par.start = c(0.243, 4.414, 0.793, 2.426))
p.alives <- bgnbd.PAlive(params, cbs[,"x"], cbs[,"t.x"], cbs[,"T.cal"])
plot(density(p.alives))
|
Loading required package: hypergeo
[1] 0.9685555
[1] 0.7056268 0.6870911 0.6638662 0.6365456 0.6056145 0.5715517 0.5348848
[8] 0.4962125 0.4562051 0.4155845 0.3750919 0.3354462 0.2973031 0.2612190
[15] 0.2276261 0.1968204
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.