mbgcnbd.GenerateData | R Documentation |
Simulate data according to (M)BG/CNBD-k model assumptions
mbgcnbd.GenerateData(n, T.cal, T.star = NULL, params, date.zero = "2000-01-01")
bgcnbd.GenerateData(n, T.cal, T.star = NULL, params, date.zero = "2000-01-01")
n |
Number of customers. |
T.cal |
Length of calibration period. If a vector is provided, then it
is assumed that customers have different 'birth' dates, i.e.
|
T.star |
Length of holdout period. This may be a vector. |
params |
A vector with model parameters |
date.zero |
Initial date for cohort start. Can be of class character, Date or POSIXt. |
List of length 2:
cbs |
A data.frame with a row for each customer and the summary statistic as columns. |
elog |
A data.frame with a row for each transaction, and columns |
(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")}
params <- c(k = 3, r = 0.85, alpha = 1.45, a = 0.79, b = 2.42)
data <- mbgcnbd.GenerateData(n = 200, T.cal = 24, T.star = 32, params)
# customer by sufficient summary statistic - one row per customer
head(data$cbs)
# event log - one row per event/transaction
head(data$elog)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.