BTYD2.4.3 package

Implementing BTYD Models with the Log Sum Exp Patch

bgbb.PosteriorMeanTransactionRate

BG/BB Posterior Mean Transaction Rate

bgbb.rf.matrix.DERT

BG/BB Discounted Expected Residual Transactions using a recency-freque...

bgbb.rf.matrix.LL

BG/BB Log-Likelihood using a recency-frequency matrix

bgbb.rf.matrix.PosteriorMeanDropoutRate

BG/BB Posterior Mean Dropout Rate using a recency-frequency matrix

bgbb.rf.matrix.PosteriorMeanTransactionRate

BG/BB Posterior Mean Transaction Rate using a recency-frequency matrix

bgnbd.cbs.LL

BG/NBD Log-Likelihood Wrapper

bgnbd.ConditionalExpectedTransactions

BG/NBD Conditional Expected Transactions

bgbb.PosteriorMeanLmProductMoment

BG/BB Posterior Mean (l,m)th Product Moment

addLogs

Add Logs

bgbb.ConditionalExpectedTransactions

BG/BB Conditional Expected Transactions

bgbb.DERT

BG/BB Discounted Expected Residual Transactions

bgbb.EstimateParameters

BG/BB Parameter estimation

bgbb.Expectation

BG/BB Expectation

bgbb.HeatmapHoldoutExpectedTrans

BG/BB Heatmap of Holdout Period Expected Transactions

bgbb.LL

BG/BB Log-Likelihood

bgbb.PAlive

BG/BB P(Alive)

bgbb.PlotDropoutRateHeterogeneity

BG/BB Plot Dropout Rate Heterogeneity

bgbb.PlotFrequencyInCalibration

BG/BB Plot Frequency in Calibration Period

bgbb.PlotFrequencyInHoldout

BG/BB Plot Frequency in Holdout

bgbb.PlotFreqVsConditionalExpectedFrequency

BG/BB Plot Frequency vs Conditional Expected Frequency

bgbb.PlotRecVsConditionalExpectedFrequency

BG/BB Plot Recency vs Conditional Expected Frequency

bgbb.PlotTrackingCum

BG/BB Tracking Cumulative Transactions Plot

bgbb.PlotTrackingInc

BG/BB Tracking Incremental Transactions Plot

bgbb.PlotTransactionRateHeterogeneity

BG/BB Plot Transaction Rate Heterogeneity

bgbb.pmf.General

BG/BB General Probability Mass Function

bgbb.pmf

BG/BB Probability Mass Function

bgbb.PosteriorMeanDropoutRate

BG/BB Posterior Mean Dropout Rate

bgnbd.EstimateParameters

BG/NBD Parameter Estimation

bgnbd.Expectation

BG/NBD Expectation

bgnbd.ExpectedCumulativeTransactions

BG/NBD Expected Cumulative Transactions

bgnbd.generalParams

Define general parameters

bgnbd.LL

BG/NBD Log-Likelihood

bgnbd.PAlive

BG/NBD P(Alive)

bgnbd.PlotDropoutRateHeterogeneity

BG/NBD Plot Dropout Probability Heterogeneity

bgnbd.PlotFrequencyInCalibration

BG/NBD Plot Frequency in Calibration Period

bgnbd.PlotFreqVsConditionalExpectedFrequency

BG/NBD Plot Frequency vs. Conditional Expected Frequency

bgnbd.PlotRecVsConditionalExpectedFrequency

BG/NBD Plot Actual vs. Conditional Expected Frequency by Recency

bgnbd.PlotTrackingCum

BG/NBD Tracking Cumulative Transactions Plot

bgnbd.PlotTrackingInc

BG/NBD Tracking Incremental Transactions Comparison

bgnbd.PlotTransactionRateHeterogeneity

BG/NBD Plot Transaction Rate Heterogeneity

bgnbd.pmf.General

Generalized BG/NBD Probability Mass Function

bgnbd.pmf

BG/NBD Probability Mass Function

BTYD-package

This project was funded and sponsored by [Wharton Customer Analytics](...

dc.BuildCBSFromCBTAndDates

Build CBS matrix from CBT matrix

dc.BuildCBTFromElog

Build Customer-by-Time Matrix from Event Log

dc.check.model.params

Check model params

dc.compress.cbs

Compress Customer-by-Sufficient-Statistic (CBS) Matrix

dc.CreateFreqCBT

Create Frequency Customer-by-Time Matrix

dc.CreateReachCBT

Create Reach Customer-by-Time Matrix

dc.CreateSpendCBT

Create Spend Customer-by-Time Matrix

dc.CumulativeToIncremental

Cumulative to Incremental

dc.DissipateElog

Dissipate Event Log

dc.ElogToCbsCbt

Convert Event Log to CBS and CBT Matrices

dc.FilterCustByBirth

Filter Customer by Birth

dc.GetFirstPurchasePeriodsFromCBT

Get First Purchase Periods from Customer-by-Time Matrix

dc.GetLastPurchasePeriodsFromCBT

Get Last Purchase Periods from Customer-by-Time Matrix

dc.InputCheck

Check the inputs to functions that use this common pattern

dc.MakeRFmatrixCal

Make Calibration Period Recency-Frequency Matrix

dc.MakeRFmatrixHoldout

Make Holdout Period Recency-Frequency Matrix

dc.MakeRFmatrixSkeleton

Make Recency-Frequency Matrix Skeleton

dc.MergeCustomers

Merge Customers

dc.MergeTransactionsOnSameDate

Merge Transactions on Same Day

dc.PlotLogLikelihoodContour

Plot Log-Likelihood Contour

dc.PlotLogLikelihoodContours

Plot Log-Likelihood Contours

dc.ReadLines

Read Lines

dc.RemoveTimeBetween

Remove Time Between

dc.SplitUpElogForRepeatTrans

Split Up Event Log for Repeat Transactions

dc.WriteLine

Write Line

h2f1

Use Bruce Hardie's Gaussian hypergeometric implementation

pnbd.cbs.LL

Pareto/NBD Log-Likelihood

pnbd.ConditionalExpectedTransactions

Pareto/NBD Conditional Expected Transactions

pnbd.DERT

Pareto/NBD Discounted Expected Residual Transactions

pnbd.EstimateParameters

Pareto/NBD Parameter Estimation

pnbd.Expectation

Pareto/NBD Expectation

pnbd.ExpectedCumulativeTransactions

Pareto/NBD Expected Cumulative Transactions

pnbd.generalParams

Define general parameters

pnbd.LL

Pareto/NBD Log-Likelihood

pnbd.PAlive

Pareto/NBD P(Alive)

pnbd.Plot.DERT

Pareto/NBD Plot Discounted Expected Residual Transactions

pnbd.PlotDropoutRateHeterogeneity

Pareto/NBD Plot Dropout Rate Heterogeneity

pnbd.PlotFrequencyInCalibration

Pareto/NBD Plot Frequency in Calibration Period

pnbd.PlotFreqVsConditionalExpectedFrequency

Pareto/NBD Plot Frequency vs. Conditional Expected Frequency

pnbd.PlotRateHeterogeneity

Plot Pareto/NBD Rate Heterogeneity

pnbd.PlotRecVsConditionalExpectedFrequency

Pareto/NBD Plot Actual vs. Conditional Expected Frequency by Recency

pnbd.PlotTrackingCum

Pareto/NBD Tracking Cumulative Transactions Plot

pnbd.PlotTrackingInc

Pareto/NBD Tracking Incremental Transactions Comparison

pnbd.PlotTransactionRateHeterogeneity

Pareto/NBD Plot Transaction Rate Heterogeneity

pnbd.pmf.General

Generalized Pareto/NBD Probability Mass Function

pnbd.pmf

Pareto/NBD Probability Mass Function

spend.EstimateParameters

Spend Parameter Estimation

spend.expected.value

Conditional expected transaction value

spend.generalParams

Define general parameters

spend.LL

Spend Log-Likelihood

spend.marginal.likelihood

Gamma-gamma marginal likelihood

spend.plot.average.transaction.value

Plot Actual vs. Expected Average Transaction Value

subLogs

Subtract Logs

Functions for data preparation, parameter estimation, scoring, and plotting for the BG/BB (Fader, Hardie, and Shang 2010 <doi:10.1287/mksc.1100.0580>), BG/NBD (Fader, Hardie, and Lee 2005 <doi:10.1287/mksc.1040.0098>) and Pareto/NBD and Gamma/Gamma (Fader, Hardie, and Lee 2005 <doi:10.1509/jmkr.2005.42.4.415>) models.

  • Maintainer: Gabi Huiber
  • License: GPL-3
  • Last published: 2021-11-17