View source: R/pareto-ggg-mcmc.R
pggg.plotRegularityRateHeterogeneity | R Documentation |
Plots and returns the estimated gamma distribution of k (customers' regularity in interpurchase times).
pggg.plotRegularityRateHeterogeneity(
draws,
xmax = NULL,
fn = NULL,
title = "Distribution of Regularity Rate k"
)
draws |
MCMC draws as returned by |
xmax |
Upper bound for x-scale. |
fn |
Optional function to summarize individual-level draws for k, e.g. 'mean'. |
title |
Plot title. |
Platzer, M., & Reutterer, T. (2016). Ticking away the moments: Timing regularity helps to better predict customer activity. Marketing Science, 35(5), 779-799. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1287/mksc.2015.0963")}
data("groceryElog")
cbs <- elog2cbs(groceryElog, T.cal = "2006-12-31")
param.draws <- pggg.mcmc.DrawParameters(cbs,
mcmc = 20, burnin = 10, thin = 2, chains = 1) # short MCMC to run demo fast
pggg.plotRegularityRateHeterogeneity(param.draws)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.