Learn R Programming

⚠️There's a newer version (1.2.0) of this package.Take me there.

BTYDplus

Extension to R package BTYD.

Installation

devtools::install_github("mplatzer/BTYDplus", dependencies=TRUE)
library(BTYDplus)
demo(package="BTYDplus")
demo("cdnow")

BTYD Models

These R source files extend the functionality of the BTYD package by providing functions for parameter estimation and scoring for NBD, G/G/NBD, BG/NBD, CBG/NBD and CBG/CNBD-k models.

  • NBD (MLE) - Ehrenberg, Asc. "The Pattern of Consumer Purchases." Quantitative techniques in marketing analysis: text and readings (1962): 355.

  • Gamma/Gompertz/NBD (MLE) - Bemmaor, Albert C., and Nicolas Glady. "Modeling Purchasing Behavior with Sudden Death: A Flexible Customer Lifetime Model." Management Science 58.5 (2012): 1012-1021.

  • MBG/NBD (MLE) - Batislam, E.P., M. Denizel, A. Filiztekin. 2007. Empirical validation and comparison of models for customer base analysis. International Journal of Research in Marketing 24(3) 201–209.

  • MBG/CNBD-k (MLE) - Platzer, Michael, and Thomas Reutterer. forthcoming...

  • Pareto/NBD (HB) - 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.

  • Pareto/NBD variant (HB) - Abe, Makoto. "Counting your customers one by one: A hierarchical Bayes extension to the Pareto/NBD model." Marketing Science 28.3 (2009): 541-553.

  • Pareto/GGG (HB) - Platzer, Michael, and Thomas Reutterer. forthcoming...

Copy Link

Version

Install

install.packages('BTYDplus')

Monthly Downloads

139

Version

0.5.0

License

GPL-3

Maintainer

Michael Platzer

Last Published

January 21st, 2021

Functions in BTYDplus (0.5.0)

ggnbd.EstimateParameters

Parameter Estimation for Gamma/Gompertz/NBD model
ggnbd.ConditionalExpectedTransactions

Gamma/Gompertz/NBD Conditional Expected Transactions
ggnbd.cbs.LL

Calculate the log-likelihood of the Gamma/Gompertz/NBD model
abe.mcmc.DrawParameters

HB Pareto/NBD variant as described in Abe (2009)
bgnbd.GenerateData

Simulate data according to BG/NBD model assumptions
ggnbd.GenerateData

Simulate data according to Gamma/Gompertz/NBD model assumptions
abe.GenerateData

Generate artificial data which follows Abe's Pareto/NBD model variant.
ggnbd.LL

Calculate the log-likelihood of the Gamma/Gompertz/NBD model
estimateRegularity

Estimate Regularity in Intertransaction Timings
elog2cbs

Faster implementation of BTYD::dc.ElogToCbsCbt that also returns summary statistic for estimating regularity
ggnbd.PAlive

Gamma/Gompertz/NBD P(alive)
mbgcnbd.cbs.LL

Calculate the log-likelihood of the MBG/CNBD-k model
mbgnbd.cbs.LL

Calculates the log-likelihood of the MBG/NBD model
mbgcnbd.Px

CBD/CNBD-k Unconditional Probability Distribution of Transactions
mbgnbd.ConditionalExpectedTransactions

MBG/NBD Conditional Expected Transactions
mbgcnbd.GenerateData

Simulate data according to MBG/CNBD-k model assumptions
mbgcnbd.LL

Calculate the log-likelihood of the MBG/CNBD-k model
mbgcnbd.ConditionalExpectedTransactions

CBD/CNBD-k Conditional Expected Transactions
mbgcnbd.PAlive

MBG/CNBD-k P(alive)
mbgcnbd.EstimateParameters

Parameter Estimation for the MBG/CNBD-k model
mcmc.setBurnin

(Re-)set burnin of MCMC chains.
mbgnbd.GenerateData

Simulate data according to MBG/NBD model assumptions
mbgnbd.EstimateParameters

Parameter Estimation for the MBG/NBD model
mcmc.DrawFutureTransactions

Samples number of future transactions based on drawn parameters
nbd.cbs.LL

Calculate the log-likelihood of the NBD model
mcmc.plotPActiveDiagnostic

Draw diagnostic plot to inspect error in P(active).
mcmc.PAlive

Calculates P(alive) based on MCMC draws
mcmc.PActive

Calculates P(active) based on drawn future transactions.
mbgnbd.PAlive

MBG/NBD P(alive)
mbgnbd.LL

Calculates the log-likelihood of the MBG/NBD model
nbd.GenerateData

Simulate data according to NBD model assumptions
pggg.mcmc.plotRegularityRateHeterogeneity

Pareto/GGG Plot Regularity Rate Heterogeneity
nbd.LL

Calculate the log-likelihood of the NBD model
pggg.GenerateData

Generate artificial data which follows Pareto/GGG model assumptions
pggg.mcmc.DrawParameters

Hierarchical Bayes implementation of Pareto/GGG
pnbd.mcmc.DrawParameters

Hierarchical Bayes variant of Pareto/NBD
nbd.ConditionalExpectedTransactions

NBD Conditional Expected Transactions
nbd.EstimateParameters

Parameter Estimation for the NBD model