Learn R Programming

BTYDplus (version 0.7.2)

estimateRegularity: Estimate Regularity in Intertransaction Timings

Description

Estimates degree of regularity of intertransaction timings of a customer cohort. This is done by 1) assuming same regularity across all customers (method = "wheat"), or 2) by estimating regularity for each customer seperately, as the shape parameter of a fitted gamma distribution, and then return the median across estimates; this requires sufficient (>=10) transactions per customer

Usage

estimateRegularity(elog, method = "wheat", plot = FALSE)

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 distribution of estimated regularity will be plotted.

Value

Estimated real-valued regularity parameter.

Details

This is done - by either assuming same regularity across all customers; this then only require three transactions per customer method: wheat - or by estimating regularity for each customer seperately (as the shape parameter of a fitted gamma distribution), and then return the median across estimates; this requires min. 10 transactions per customer methods: mle, mle-minka, mle-thom, cv

References

Wheat, Rita D., and Donald G. Morrison. 'Estimating purchase regularity with two interpurchase times.'

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.

http://research.microsoft.com/en-us/um/people/minka/papers/minka-gamma.pdf

Examples

Run this code
# NOT RUN {
elog <- cdnow.sample()$elog[, c("cust", "date")]
estimateRegularity(elog, plot = TRUE, method = 'wheat')
estimateRegularity(elog, plot = TRUE, method = 'mle-minka')
estimateRegularity(elog, plot = TRUE, method = 'mle-thom')
estimateRegularity(elog, plot = TRUE, method = 'cv')
# }

Run the code above in your browser using DataLab