pnbd.mcmc.DrawParameters samples parameters via MCMC for a given CBS
matrix
pnbd.mcmc.DrawParameters(cal.cbs, mcmc = 2500, burnin = 500, thin = 50,
chains = 2, mc.cores = NULL, use_data_augmentation = TRUE,
param_init = NULL, trace = 100)data.frame with columns x, t.x, T.cal
number of MCMC steps
number of initial MCMC steps which are discarded
only every thin-th MCMC step will be returned
number of MCMC chains to be run
number of cores to use in parallel (Unix only); defaults to min(chains, detectCores())
determines MCMC method to be used
list of 2nd-level parameter start values
print logging step every trace iteration
2-element list:
method 1) If use_data_augmentation==TRUE MCMC scheme takes advantage of
conjugate priors for drawing lambda and mu, by augmentating the parameter space
with unobserved lifetime 'tau' and activity status 'z'. See technical appendix
to (Abe 2009).
method 2) If use_data_augmentation==FALSE then implementation follows
Shao-Hui Ma & Jin-Lan Liu paper
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4344404, i.e. no data
augmentation and draws on individual level need to be done via slice
sampling. As such it is 10x slower than method 1)
Estimating parameters via Pareto/NBD MCMC can be 10x slower than Pareto/NBD MLE, which itself can be 10x slower than BG/NBD. Both methods exhibit highly autocorrelated draws of r, alpha, s, beta and hence need to be run long, to generate 'enough' draws
Ma, Shao-Hui, and Jin-Lan Liu. 'The MCMC approach for solving the Pareto/NBD model and possible extensions.' Natural Computation, 2007. ICNC 2007. Third International Conference on. Vol. 2. IEEE, 2007. http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=4344404
Abe, Makoto. 'Counting your customers one by one: A hierarchical Bayes extension to the Pareto/NBD model.' Marketing Science 28.3 (2009): 541-553.