mcmc.PActive | R Documentation |
Calculates P(active) based on drawn future transactions.
mcmc.PActive(xstar)
xstar |
Future transaction draws as returned by
|
numeric A vector with the customers' probabilities of being active during the holdout period.
data("groceryElog")
cbs <- elog2cbs(groceryElog, T.cal = "2006-12-31")
param.draws <- pnbd.mcmc.DrawParameters(cbs,
mcmc = 100, burnin = 50, thin = 10, chains = 1) # short MCMC to run demo fast
xstar.draws <- mcmc.DrawFutureTransactions(cbs, param.draws)
cbs$pactive <- mcmc.PActive(xstar.draws)
head(cbs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.