mbgcnbd.cbs.LL: (M)BG/CNBD-k Log-Likelihood

Description Usage Arguments Value References

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

Description

Calculates the log-likelihood of the (M)BG/CNBD-k model.

Usage

1
2
3
4
5
6
7
mbgcnbd.cbs.LL(params, cal.cbs)

mbgcnbd.LL(params, x, t.x, T.cal, litt)

bgcnbd.cbs.LL(params, cal.cbs)

bgcnbd.LL(params, x, t.x, T.cal, litt)

Arguments

params

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

cal.cbs

Calibration period customer-by-sufficient-statistic (CBS) data.frame. It must contain a row for each customer, and columns x for frequency, t.x for recency , T.cal for the total time observed, as well as the sum over logarithmic intertransaction times litt. A correct format can be easily generated based on the complete event log of a customer cohort with elog2cbs.

x

frequency, i.e. number of re-purchases

t.x

recency, i.e. time elapsed from first purchase to last purchase

T.cal

total time of observation period

litt

sum of logarithmic interpurchase times

Value

For bgcnbd.cbs.LL, the total log-likelihood of the provided data. For bgcnbd.LL, a vector of log-likelihoods as long as the longest input vector (x, t.x, or T.cal).

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. doi: 10.1016/j.ijresmar.2020.09.002


BTYDplus documentation built on Jan. 21, 2021, 5:10 p.m.