pnbd.pmf: Pareto/NBD Probability Mass Function

Description Usage Arguments Details Value References Examples

View source: R/pnbd.R

Description

Probability mass function for the Pareto/NBD.

Usage

1
pnbd.pmf(params, t, x, hardie = TRUE)

Arguments

params

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.

t

length end of time period for which probability is being computed. May also be a vector.

x

number of repeat transactions by a random customer in the period defined by t. May also be a vector.

hardie

if TRUE, have pnbd.pmf.General use h2f1 instead of hypergeo.

Details

P(X(t)=x | r, alpha, s, beta). Returns the probability that a customer makes x repeat transactions in the time interval (0, t].

Parameters t and x may be vectors. The standard rules for vector operations apply - if they are not of the same length, the shorter vector will be recycled (start over at the first element) until it is 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.

Value

Probability of X(t)=x conditional on model parameters. If t and/or x has a length greater than one, a vector of probabilities will be returned.

References

Fader, Peter S., and Bruce G.S. Hardie. “Deriving an Expression for P (X(t) = x) Under the Pareto/NBD Model.” Sept. 2006. Web. http://www.brucehardie.com/notes/012/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
params <- c(0.55, 10.56, 0.61, 11.64)
# probability that a customer will make 10 repeat transactions in the
# time interval (0,2]
pnbd.pmf(params, t=2, x=10, hardie = TRUE)
# probability that a customer will make no repeat transactions in the
# time interval (0,39]
pnbd.pmf(params, t=39, x=0, hardie = TRUE)

# Vectors may also be used as arguments:
pnbd.pmf(params = params, 
         t = 30, 
         x = 11:20, 
         hardie = TRUE)

BTYD documentation built on Nov. 18, 2021, 1:10 a.m.