pggg.GenerateData {BTYDplus}R Documentation

Simulate data according to Pareto/GGG model assumptions

Description

Simulate data according to Pareto/GGG model assumptions

Usage

pggg.GenerateData(n, T.cal, T.star, params, date.zero = "2000-01-01")

Arguments

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. max(T.cal)-T.cal.

T.star

Length of holdout period. This may be a vector.

params

A list of model parameters r, alpha, s, beta, t and gamma.

date.zero

Initial date for cohort start. Can be of class character, Date or POSIXt.

Value

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 cust, date and t.

References

Platzer, M., & Reutterer, T. (2016). Ticking away the moments: Timing regularity helps to better predict customer activity. Marketing Science, 35(5), 779-799. doi: 10.1287/mksc.2015.0963

Examples

params <- list(t = 4.5, gamma = 1.5, r = 5, alpha = 10, s = 0.8, beta = 12)
data <- pggg.GenerateData(n = 200, T.cal = 32, T.star = 32, params)
cbs <- data$cbs  # customer by sufficient summary statistic - one row per customer
elog <- data$elog  # Event log - one row per event/purchase

[Package BTYDplus version 1.2.0 Index]