mbgcnbd.pmf: (M)BG/CNBD-k Probability Mass Function

View source: R/mbg-cnbd-k.R

mbgcnbd.pmfR Documentation

(M)BG/CNBD-k Probability Mass Function

Description

Uses (M)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

mbgcnbd.pmf(params, t, x)

bgcnbd.pmf(params, t, x)

Arguments

params

A vector with model parameters k, r, alpha, a and b, in that order.

t

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

x

Number of repeat transactions for which probability is calculated. May also be a vector.

Value

P(X(t)=x|r,alpha,a,b). If either t or x is a vector, then the output will be a vector as well. If both are vectors, the output will be a matrix.

References

(M)BG/CNBD-k: Reutterer, T., Platzer, M., & Schroeder, N. (2020). Leveraging purchase regularity for predicting customer behavior the easy way. International Journal of Research in Marketing. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.ijresmar.2020.09.002")}

Examples

## Not run: 
data("groceryElog")
cbs <- elog2cbs(groceryElog)
params <- mbgcnbd.EstimateParameters(cbs)
mbgcnbd.pmf(params, t = 52, x = 0:6)
mbgcnbd.pmf(params, t = c(26, 52), x = 0:6)

## End(Not run)

mplatzer/BTYDplus documentation built on April 9, 2024, 3:11 a.m.