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. (ConditionalExpectations are not working)

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

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Michael Platzer

Last Published

January 21st, 2021

Functions in BTYDplus (0.7.0)

bgcnbd.PAlive

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

Calculate the log-likelihood of the BG/CNBD-k model
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.ExpectedCumulativeTransactions

BG/CNBD-k Expected Cumulative Transactions
abe.mcmc.DrawParameters

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

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

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

BG/CNBD-k Conditional Expected Transactions
bgcnbd.Expectation

BG/CNBD-k Expectation
ggnbd.cbs.LL

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

Estimate Regularity in Intertransaction Timings
bgcnbd.PlotTrackingCum

BG/CNBD-k Tracking Cumulative Transactions Plot
bgcnbd.PlotFrequencyInCalibration

BG/CNBD-k Plot Frequency in Calibration Period
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.EstimateParameters

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

Gamma/Gompertz/NBD Conditional Expected Transactions
bgcnbd.pmf

BG/CNBD-k Probability Mass Function
bgcnbd.PlotTrackingInc

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

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

MBG/CNBD-k Expectation
mbgcnbd.GenerateData

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

MBG/CNBD-k Conditional Expected Transactions
mbgcnbd.cbs.LL

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

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

Gamma/Gompertz/NBD P(alive)
ggnbd.GenerateData

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

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

MBG/CNBD-k Expected Cumulative Transactions
mbgcnbd.pmf

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

MBG/CNBD-k Plot Frequency in Calibration Period
mbgcnbd.PAlive

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

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

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

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

MBG/NBD Conditional Expected Transactions
mbgnbd.LL

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

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

Parameter Estimation for the MBG/NBD model
mbgnbd.PAlive

MBG/NBD P(alive)
nbd.ConditionalExpectedTransactions

NBD Conditional Expected Transactions
mcmc.PActive

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

MBG/NBD Unconditional Probability Distribution of Transactions
mcmc.DrawFutureTransactions

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

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

(Re-)set burnin of MCMC chains.
nbd.EstimateParameters

Parameter Estimation for the NBD model
mcmc.PAlive

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

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

Simulate data according to NBD model assumptions
nbd.LL

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

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

Pareto/GGG Plot Regularity Rate Heterogeneity
pggg.mcmc.DrawParameters

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

Hierarchical Bayes variant of Pareto/NBD