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. - Hoppe, Daniel, and Udo Wagner. "Customer base analysis: The case for a central variant of the Betageometric/NBD Model." Marketing Journal of Research and Management 3.2 (2007): 75-90.

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

  • 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. - Conoor, Sandeep S. Customer-base analysis in noncontractual settings. Diss. NORTHWESTERN UNIVERSITY, 2010.

  • 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.6.4

License

GPL-3

Maintainer

Michael Platzer

Last Published

January 21st, 2021

Functions in BTYDplus (0.6.4)

bgcnbd.cbs.LL

Calculate the log-likelihood of the BG/CNBD-k model
abe.GenerateData

Generate artificial data which follows Abe's Pareto/NBD model variant.
bgcnbd.GenerateData

Simulate data according to BG/CNBD-k model assumptions
abe.mcmc.DrawParameters

HB Pareto/NBD variant as described in Abe (2009)
bgcnbd.LL

Calculate the log-likelihood of the BG/CNBD-k model
bgcnbd.ConditionalExpectedTransactions

BG/CNBD-k Conditional Expected Transactions
bgcnbd.PAlive

BG/CNBD-k P(alive)
bgcnbd.EstimateParameters

Parameter Estimation for the BG/CNBD-k model
bgcnbd.ExpectedCumulativeTransactions

BG/CNBD-k Expected Cumulative Transactions
bgcnbd.Expectation

BG/CNBD-k Expectation
estimateRegularity

Estimate Regularity in Intertransaction Timings
bgcnbd.pmf

BG/CNBD-k Probability Mass Function
bgcnbd.PlotFrequencyInCalibration

BG/CNBD-k Plot Frequency in Calibration Period
ggnbd.ConditionalExpectedTransactions

Gamma/Gompertz/NBD Conditional Expected Transactions
ggnbd.EstimateParameters

Parameter Estimation for Gamma/Gompertz/NBD model
bgnbd.GenerateData

Simulate data according to BG/NBD model assumptions
ggnbd.cbs.LL

Calculate the log-likelihood of the Gamma/Gompertz/NBD model
bgcnbd.PlotTrackingCum

BG/CNBD-k Tracking Cumulative Transactions Plot
elog2cbs

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

BG/CNBD-k Tracking Incremental Transactions Comparison
ggnbd.GenerateData

Simulate data according to Gamma/Gompertz/NBD model assumptions
ggnbd.LL

Calculate the log-likelihood of the Gamma/Gompertz/NBD model
mbgcnbd.GenerateData

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

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

MBG/CNBD-k Expected Cumulative Transactions
mbgcnbd.Expectation

MBG/CNBD-k Expectation
mbgnbd.EstimateParameters

Parameter Estimation for the MBG/NBD model
ggnbd.PAlive

Gamma/Gompertz/NBD P(alive)
mbgnbd.ConditionalExpectedTransactions

MBG/NBD Conditional Expected Transactions
mbgcnbd.cbs.LL

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

Simulate data according to MBG/NBD model assumptions
mbgcnbd.PAlive

MBG/CNBD-k P(alive)
mbgnbd.LL

Calculate the log-likelihood of the MBG/NBD model
mbgnbd.pmf

MBG/NBD Unconditional Probability Distribution of Transactions
mbgnbd.PAlive

MBG/NBD P(alive)
mbgcnbd.PlotFrequencyInCalibration

MBG/CNBD-k Plot Frequency in Calibration Period
nbd.GenerateData

Simulate data according to NBD model assumptions
nbd.LL

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

Samples number of future transactions based on drawn parameters
mcmc.PActive

Calculates P(active) based on drawn future transactions.
nbd.EstimateParameters

Parameter Estimation for the NBD model
nbd.ConditionalExpectedTransactions

NBD Conditional Expected Transactions
nbd.cbs.LL

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

(Re-)set burnin of MCMC chains.
mbgnbd.cbs.LL

Calculate the log-likelihood of the MBG/NBD model
mbgcnbd.pmf

MBG/CNBD-k Unconditional Probability Distribution of Transactions
mbgcnbd.ConditionalExpectedTransactions

MBG/CNBD-k Conditional Expected Transactions
pggg.GenerateData

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

Hierarchical Bayes implementation of Pareto/GGG
mbgcnbd.EstimateParameters

Parameter Estimation for the MBG/CNBD-k model
mbgcnbd.PlotTrackingCum

MBG/CNBD-k Tracking Cumulative Transactions Plot
mbgcnbd.PlotTrackingInc

MBG/CNBD-k Tracking Incremental Transactions Comparison
pnbd.mcmc.DrawParameters

Hierarchical Bayes variant of Pareto/NBD
pggg.mcmc.plotRegularityRateHeterogeneity

Pareto/GGG Plot Regularity Rate Heterogeneity
mcmc.plotPActiveDiagnostic

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

Calculates P(alive) based on MCMC draws