mcmc.PActive {BTYDplus}R Documentation

Calculates P(active) based on drawn future transactions.

Description

Calculates P(active) based on drawn future transactions.

Usage

mcmc.PActive(xstar)

Arguments

xstar

Future transaction draws as returned by mcmc.DrawFutureTransactions.

Value

numeric A vector with the customers' probabilities of being active during the holdout period.

Examples

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)

[Package BTYDplus version 1.2.0 Index]