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.3

License

GPL-3

Maintainer

Michael Platzer

Last Published

January 21st, 2021

Functions in BTYDplus (0.6.3)

bgcnbd.Expectation

BG/CNBD-k Expectation
bgcnbd.LL

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

Simulate data according to BG/CNBD-k model assumptions
bgcnbd.PAlive

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

BG/CNBD-k Conditional Expected Transactions
bgcnbd.EstimateParameters

Parameter Estimation for the BG/CNBD-k model
abe.mcmc.DrawParameters

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

BG/CNBD-k Expected Cumulative Transactions
abe.GenerateData

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

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

BG/CNBD-k Tracking Incremental Transactions Comparison
estimateRegularity

Estimate Regularity in Intertransaction Timings
bgcnbd.pmf

BG/CNBD-k Probability Mass Function
bgnbd.GenerateData

Simulate data according to BG/NBD model assumptions
elog2cbs

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

Calculate the log-likelihood of the Gamma/Gompertz/NBD model
ggnbd.ConditionalExpectedTransactions

Gamma/Gompertz/NBD Conditional Expected Transactions
ggnbd.EstimateParameters

Parameter Estimation for Gamma/Gompertz/NBD model
bgcnbd.PlotFrequencyInCalibration

BG/CNBD-k Plot Frequency in Calibration Period
bgcnbd.PlotTrackingCum

BG/CNBD-k Tracking Cumulative Transactions Plot
mbgcnbd.ExpectedCumulativeTransactions

MBG/CNBD-k Expected Cumulative Transactions
mbgcnbd.Expectation

MBG/CNBD-k Expectation
ggnbd.GenerateData

Simulate data according to Gamma/Gompertz/NBD model assumptions
mbgcnbd.ConditionalExpectedTransactions

MBG/CNBD-k Conditional Expected Transactions
mbgcnbd.LL

Calculate the log-likelihood of the MBG/CNBD-k model
ggnbd.PAlive

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

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

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

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

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

MBG/CNBD-k Tracking Incremental Transactions Comparison
mbgcnbd.PlotTrackingCum

MBG/CNBD-k Tracking Cumulative Transactions Plot
mbgnbd.GenerateData

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

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

MBG/CNBD-k Plot Frequency in Calibration Period
mbgnbd.LL

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

Parameter Estimation for the MBG/NBD model
mbgnbd.ConditionalExpectedTransactions

MBG/NBD Conditional Expected Transactions
mbgnbd.cbs.LL

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

MBG/CNBD-k Unconditional Probability Distribution of Transactions
mbgnbd.PAlive

MBG/NBD P(alive)
mcmc.DrawFutureTransactions

Samples number of future transactions based on drawn parameters
mbgnbd.pmf

MBG/NBD Unconditional Probability Distribution of Transactions
mcmc.PActive

Calculates P(active) based on drawn future transactions.
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.
mcmc.plotPActiveDiagnostic

Draw diagnostic plot to inspect error in P(active).
nbd.EstimateParameters

Parameter Estimation for the NBD model
mcmc.PAlive

Calculates P(alive) based on MCMC draws
nbd.GenerateData

Simulate data according to NBD model assumptions
pggg.GenerateData

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

Hierarchical Bayes implementation of Pareto/GGG
pggg.mcmc.plotRegularityRateHeterogeneity

Pareto/GGG Plot Regularity Rate Heterogeneity
nbd.LL

Calculate the log-likelihood of the NBD model
pnbd.mcmc.DrawParameters

Hierarchical Bayes variant of Pareto/NBD