mcmc.PActive: Calculates P(active) based on drawn future transactions.

View source: R/mcmc.R

mcmc.PActiveR 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)

mplatzer/BTYDplus documentation built on April 9, 2024, 3:11 a.m.