estimateRegularity {BTYDplus}R Documentation

Estimate Regularity in Intertransaction Timings

Description

The models (M)BG/CNBD-k and Pareto/GGG are capable of leveraging regularity within transaction timings for improving forecast accuracy. This method provides a quick check for the degree of regularity in the event timings. A return value of close to 1 supports the assumption of exponentially distributed intertransaction times, whereas values significantly larger than 1 reveal the presence of regularity.

Usage

estimateRegularity(
  elog,
  method = "wheat",
  plot = FALSE,
  title = "",
  min = NULL
)

Arguments

elog

Event log, a data.frame with columns cust and transaction time t or date

method

Either wheat, mle, mle-minka, mle-thom or cv.

plot

If TRUE then an additional diagnostic plot is provided.

title

Plot title.

min

Minimum number of intertransaction times per customer. Customers with less than min intertransactions are not considered. Defaults to 2 for method 'wheat', and to 10 otherwise.

Details

Estimation is either done by 1) assuming the same degree of regularity across all customers (Wheat & Morrison (1990) via method = "wheat"), or 2) by estimating regularity for each customer separately, as the shape parameter of a fitted gamma distribution, and then return the median across estimates. The latter methods, though, require sufficient (>=min) transactions per customer.

Wheat & Morrison (1990)'s method calculates for each customer a statistic M based on her last two number of intertransaction times as ITT_1 / (ITT_1 + ITT_2). That measure is known to follow a Beta(k, k) distribution, and k can be estimated as (1-4*Var(M))/(8*Var(M)). The corresponding diagnostic plot (plot = TRUE) shows the actual distribution of M vs. the theoretical distribution for k = 1 and k = 2.

Value

Estimated real-valued regularity parameter.

References

Wheat, Rita D., and Donald G. Morrison. "Estimating purchase regularity with two interpurchase times." Journal of Marketing Research (1990): 87-93.

Dunn, Richard, Steven Reader, and Neil Wrigley. 'An investigation of the assumptions of the NBD model' Applied Statistics (1983): 249-259.

Wu, Couchen, and H-L. Chen. 'A consumer purchasing model with learning and departure behaviour.' Journal of the Operational Research Society (2000): 583-591.

https://tminka.github.io/papers/minka-gamma.pdf

Examples

data("groceryElog")
estimateRegularity(groceryElog, plot = TRUE, method = 'wheat')
estimateRegularity(groceryElog, plot = TRUE, method = 'mle-minka')
estimateRegularity(groceryElog, plot = TRUE, method = 'mle-thom')
estimateRegularity(groceryElog, plot = TRUE, method = 'cv')

[Package BTYDplus version 1.2.0 Index]