Package: BTYD 2.4.3

BTYD: Implementing BTYD Models with the Log Sum Exp Patch

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.

Authors:Lukasz Dziurzynski [aut], Edward Wadsworth [aut], Peter Fader [ctb], Elea McDonnell Feit [ctb], Daniel McCarthy [aut, ctb], Bruce Hardie [ctb], Arun Gopalakrishnan [ctb], Eric Schwartz [ctb], Yao Zhang [ctb], Gabi Huiber [ctb, cre]

BTYD_2.4.3.tar.gz
BTYD_2.4.3.zip(r-4.5)BTYD_2.4.3.zip(r-4.4)BTYD_2.4.3.zip(r-4.3)
BTYD_2.4.3.tgz(r-4.4-any)BTYD_2.4.3.tgz(r-4.3-any)
BTYD_2.4.3.tar.gz(r-4.5-noble)BTYD_2.4.3.tar.gz(r-4.4-noble)
BTYD_2.4.3.tgz(r-4.4-emscripten)BTYD_2.4.3.tgz(r-4.3-emscripten)
BTYD.pdf |BTYD.html
BTYD/json (API)
NEWS

# Install 'BTYD' in R:
install.packages('BTYD', repos = c('https://ghuiber.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ghuiber/btyd/issues

Datasets:

On CRAN:

6.03 score 7 stars 1 packages 103 scripts 563 downloads 93 exports 27 dependencies

Last updated 3 years agofrom:317b09e4ae. Checks:OK: 1 ERROR: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 21 2024
R-4.5-winERRORNov 21 2024
R-4.5-linuxERRORNov 21 2024
R-4.4-winERRORNov 21 2024
R-4.4-macERRORNov 21 2024
R-4.3-winERRORNov 21 2024
R-4.3-macERRORNov 21 2024

Exports:bgbb.ConditionalExpectedTransactionsbgbb.DERTbgbb.EstimateParametersbgbb.Expectationbgbb.HeatmapHoldoutExpectedTransbgbb.LLbgbb.PAlivebgbb.PlotDropoutRateHeterogeneitybgbb.PlotFrequencyInCalibrationbgbb.PlotFrequencyInHoldoutbgbb.PlotFreqVsConditionalExpectedFrequencybgbb.PlotRecVsConditionalExpectedFrequencybgbb.PlotTrackingCumbgbb.PlotTrackingIncbgbb.PlotTransactionRateHeterogeneitybgbb.pmfbgbb.pmf.Generalbgbb.PosteriorMeanDropoutRatebgbb.PosteriorMeanLmProductMomentbgbb.PosteriorMeanTransactionRatebgbb.rf.matrix.DERTbgbb.rf.matrix.LLbgbb.rf.matrix.PosteriorMeanDropoutRatebgbb.rf.matrix.PosteriorMeanTransactionRatebgnbd.cbs.LLbgnbd.ConditionalExpectedTransactionsbgnbd.EstimateParametersbgnbd.Expectationbgnbd.ExpectedCumulativeTransactionsbgnbd.generalParamsbgnbd.LLbgnbd.PAlivebgnbd.PlotDropoutRateHeterogeneitybgnbd.PlotFrequencyInCalibrationbgnbd.PlotFreqVsConditionalExpectedFrequencybgnbd.PlotRecVsConditionalExpectedFrequencybgnbd.PlotTrackingCumbgnbd.PlotTrackingIncbgnbd.PlotTransactionRateHeterogeneitybgnbd.pmfbgnbd.pmf.Generaldc.BuildCBSFromCBTAndDatesdc.BuildCBTFromElogdc.check.model.paramsdc.compress.cbsdc.CreateFreqCBTdc.CreateReachCBTdc.CreateSpendCBTdc.CumulativeToIncrementaldc.DissipateElogdc.ElogToCbsCbtdc.FilterCustByBirthdc.GetFirstPurchasePeriodsFromCBTdc.GetLastPurchasePeriodsFromCBTdc.InputCheckdc.MakeRFmatrixCaldc.MakeRFmatrixHoldoutdc.MakeRFmatrixSkeletondc.MergeCustomersdc.MergeTransactionsOnSameDatedc.PlotLogLikelihoodContourdc.PlotLogLikelihoodContoursdc.ReadLinesdc.RemoveTimeBetweendc.SplitUpElogForRepeatTransdc.WriteLineh2f1pnbd.cbs.LLpnbd.ConditionalExpectedTransactionspnbd.DERTpnbd.EstimateParameterspnbd.Expectationpnbd.ExpectedCumulativeTransactionspnbd.generalParamspnbd.LLpnbd.PAlivepnbd.Plot.DERTpnbd.PlotDropoutRateHeterogeneitypnbd.PlotFrequencyInCalibrationpnbd.PlotFreqVsConditionalExpectedFrequencypnbd.PlotRateHeterogeneitypnbd.PlotRecVsConditionalExpectedFrequencypnbd.PlotTrackingCumpnbd.PlotTrackingIncpnbd.PlotTransactionRateHeterogeneitypnbd.pmfpnbd.pmf.Generalspend.EstimateParametersspend.expected.valuespend.generalParamsspend.LLspend.marginal.likelihoodspend.plot.average.transaction.value

Dependencies:clicontfracdeSolvedplyrellipticfansigenericsgluehypergeolatticelifecyclemagrittrMASSMatrixnloptrnumDerivoptimxpillarpkgconfigpracmaR6rlangtibbletidyselectutf8vctrswithr

Buy 'Til You Die - A Walkthrough

Rendered fromBTYD-walkthrough.Rnwusingknitr::knitron Nov 21 2024.

Last update: 2021-11-16
Started: 2020-11-08

Readme and manuals

Help Manual

Help pageTopics
This project was funded and sponsored by Wharton Customer Analytics.BTYD-package BTYD
Add LogsaddLogs
BG/BB Conditional Expected Transactionsbgbb.ConditionalExpectedTransactions
BG/BB Discounted Expected Residual Transactionsbgbb.DERT
BG/BB Parameter estimationbgbb.EstimateParameters
BG/BB Expectationbgbb.Expectation
BG/BB Heatmap of Holdout Period Expected Transactionsbgbb.HeatmapHoldoutExpectedTrans
BG/BB Log-Likelihoodbgbb.LL
BG/BB P(Alive)bgbb.PAlive
BG/BB Plot Dropout Rate Heterogeneitybgbb.PlotDropoutRateHeterogeneity
BG/BB Plot Frequency in Calibration Periodbgbb.PlotFrequencyInCalibration
BG/BB Plot Frequency in Holdoutbgbb.PlotFrequencyInHoldout
BG/BB Plot Frequency vs Conditional Expected Frequencybgbb.PlotFreqVsConditionalExpectedFrequency
BG/BB Plot Recency vs Conditional Expected Frequencybgbb.PlotRecVsConditionalExpectedFrequency
BG/BB Tracking Cumulative Transactions Plotbgbb.PlotTrackingCum
BG/BB Tracking Incremental Transactions Plotbgbb.PlotTrackingInc
BG/BB Plot Transaction Rate Heterogeneitybgbb.PlotTransactionRateHeterogeneity
BG/BB Probability Mass Functionbgbb.pmf
BG/BB General Probability Mass Functionbgbb.pmf.General
BG/BB Posterior Mean Dropout Ratebgbb.PosteriorMeanDropoutRate
BG/BB Posterior Mean (l,m)th Product Momentbgbb.PosteriorMeanLmProductMoment
BG/BB Posterior Mean Transaction Ratebgbb.PosteriorMeanTransactionRate
BG/BB Discounted Expected Residual Transactions using a recency-frequency matrixbgbb.rf.matrix.DERT
BG/BB Log-Likelihood using a recency-frequency matrixbgbb.rf.matrix.LL
BG/BB Posterior Mean Dropout Rate using a recency-frequency matrixbgbb.rf.matrix.PosteriorMeanDropoutRate
BG/BB Posterior Mean Transaction Rate using a recency-frequency matrixbgbb.rf.matrix.PosteriorMeanTransactionRate
BG/NBD Log-Likelihood Wrapperbgnbd.cbs.LL
BG/NBD Conditional Expected Transactionsbgnbd.ConditionalExpectedTransactions
BG/NBD Parameter Estimationbgnbd.EstimateParameters
BG/NBD Expectationbgnbd.Expectation
BG/NBD Expected Cumulative Transactionsbgnbd.ExpectedCumulativeTransactions
Define general parametersbgnbd.generalParams
BG/NBD Log-Likelihoodbgnbd.LL
BG/NBD P(Alive)bgnbd.PAlive
BG/NBD Plot Dropout Probability Heterogeneitybgnbd.PlotDropoutRateHeterogeneity
BG/NBD Plot Frequency in Calibration Periodbgnbd.PlotFrequencyInCalibration
BG/NBD Plot Frequency vs. Conditional Expected Frequencybgnbd.PlotFreqVsConditionalExpectedFrequency
BG/NBD Plot Actual vs. Conditional Expected Frequency by Recencybgnbd.PlotRecVsConditionalExpectedFrequency
BG/NBD Tracking Cumulative Transactions Plotbgnbd.PlotTrackingCum
BG/NBD Tracking Incremental Transactions Comparisonbgnbd.PlotTrackingInc
BG/NBD Plot Transaction Rate Heterogeneitybgnbd.PlotTransactionRateHeterogeneity
BG/NBD Probability Mass Functionbgnbd.pmf
Generalized BG/NBD Probability Mass Functionbgnbd.pmf.General
CDNOW event log datacdnowElog
CDNOW repeat transaction data summarycdnowSummary
Build CBS matrix from CBT matrixdc.BuildCBSFromCBTAndDates
Build Customer-by-Time Matrix from Event Logdc.BuildCBTFromElog
Check model paramsdc.check.model.params
Compress Customer-by-Sufficient-Statistic (CBS) Matrixdc.compress.cbs
Create Frequency Customer-by-Time Matrixdc.CreateFreqCBT
Create Reach Customer-by-Time Matrixdc.CreateReachCBT
Create Spend Customer-by-Time Matrixdc.CreateSpendCBT
Cumulative to Incrementaldc.CumulativeToIncremental
Dissipate Event Logdc.DissipateElog
Convert Event Log to CBS and CBT Matricesdc.ElogToCbsCbt
Filter Customer by Birthdc.FilterCustByBirth
Get First Purchase Periods from Customer-by-Time Matrixdc.GetFirstPurchasePeriodsFromCBT
Get Last Purchase Periods from Customer-by-Time Matrixdc.GetLastPurchasePeriodsFromCBT
Check the inputs to functions that use this common patterndc.InputCheck
Make Calibration Period Recency-Frequency Matrixdc.MakeRFmatrixCal
Make Holdout Period Recency-Frequency Matrixdc.MakeRFmatrixHoldout
Make Recency-Frequency Matrix Skeletondc.MakeRFmatrixSkeleton
Merge Customersdc.MergeCustomers
Merge Transactions on Same Daydc.MergeTransactionsOnSameDate
Plot Log-Likelihood Contourdc.PlotLogLikelihoodContour
Plot Log-Likelihood Contoursdc.PlotLogLikelihoodContours
Read Linesdc.ReadLines
Remove Time Betweendc.RemoveTimeBetween
Split Up Event Log for Repeat Transactionsdc.SplitUpElogForRepeatTrans
Write Linedc.WriteLine
Discrete simulated annual event log datadiscreteSimElog
Discrete donation data summarydonationsSummary
Use Bruce Hardie's Gaussian hypergeometric implementationh2f1
Pareto/NBD Log-Likelihoodpnbd.cbs.LL
Pareto/NBD Conditional Expected Transactionspnbd.ConditionalExpectedTransactions
Pareto/NBD Discounted Expected Residual Transactionspnbd.DERT
Pareto/NBD Parameter Estimationpnbd.EstimateParameters
Pareto/NBD Expectationpnbd.Expectation
Pareto/NBD Expected Cumulative Transactionspnbd.ExpectedCumulativeTransactions
Define general parameterspnbd.generalParams
Pareto/NBD Log-Likelihoodpnbd.LL
Pareto/NBD P(Alive)pnbd.PAlive
Pareto/NBD Plot Discounted Expected Residual Transactionspnbd.Plot.DERT
Pareto/NBD Plot Dropout Rate Heterogeneitypnbd.PlotDropoutRateHeterogeneity
Pareto/NBD Plot Frequency in Calibration Periodpnbd.PlotFrequencyInCalibration
Pareto/NBD Plot Frequency vs. Conditional Expected Frequencypnbd.PlotFreqVsConditionalExpectedFrequency
Plot Pareto/NBD Rate Heterogeneitypnbd.PlotRateHeterogeneity
Pareto/NBD Plot Actual vs. Conditional Expected Frequency by Recencypnbd.PlotRecVsConditionalExpectedFrequency
Pareto/NBD Tracking Cumulative Transactions Plotpnbd.PlotTrackingCum
Pareto/NBD Tracking Incremental Transactions Comparisonpnbd.PlotTrackingInc
Pareto/NBD Plot Transaction Rate Heterogeneitypnbd.PlotTransactionRateHeterogeneity
Pareto/NBD Probability Mass Functionpnbd.pmf
Generalized Pareto/NBD Probability Mass Functionpnbd.pmf.General
Spend Parameter Estimationspend.EstimateParameters
Conditional expected transaction valuespend.expected.value
Define general parametersspend.generalParams
Spend Log-Likelihoodspend.LL
Gamma-gamma marginal likelihoodspend.marginal.likelihood
Plot Actual vs. Expected Average Transaction Valuespend.plot.average.transaction.value
Subtract LogssubLogs