Learn R Programming

BTYDplus (version 0.7.2)

bgcnbd.pmf: BG/CNBD-k Probability Mass Function

Description

Uses BG/CNBD-k model parameters to return the probability distribution of purchase frequencies for a random customer in a given time period, i.e. P(X(t)=x|r,alpha,a,b)

Usage

bgcnbd.pmf(params, t, x, dropout_at_zero = FALSE)

Arguments

params

BG/CNBD-k parameters - a vector with k, r, alpha, a and b in that order.

t

length of time for which we are calculating the expected number of transactions.

x

number of transactions for which probability is calculated.

dropout_at_zero

Boolean; the mbg-methods are simple wrapper methods, which set this parameter to TRUE

Value

P(X(t)=x|r,alpha,a,b). If any of the input parameters has a length greater than 1, this will be a vector of expected number of transactions.

References

Platzer Michael, and Thomas Reutterer (forthcoming)

See Also

bgcnbd.Expectation

Examples

Run this code
# NOT RUN {
cbs <- cdnow.sample()$cbs # load CDNow summary data
params <- bgcnbd.EstimateParameters(cbs)
bgcnbd.pmf(params, t = 52, x = 0:6)
# }

Run the code above in your browser using DataLab