Learn R Programming

BTYDplus (version 0.7.2)

mbgcnbd.PlotFrequencyInCalibration: (M)BG/CNBD-k Plot Frequency in Calibration Period

Description

Plots a histogram and returns a matrix comparing the actual and expected number of customers who made a certain number of repeat transactions in the calibration period, binned according to calibration period frequencies.

Usage

mbgcnbd.PlotFrequencyInCalibration(params, cal.cbs, censor = 7,
  xlab = "Calibration period transactions", ylab = "Customers",
  title = "Frequency of Repeat Transactions")

bgcnbd.PlotFrequencyInCalibration(params, cal.cbs, censor = 7, xlab = "Calibration period transactions", ylab = "Customers", title = "Frequency of Repeat Transactions")

Arguments

params

A vector with model parameters k, r, alpha, a and b, in that order.

cal.cbs

calibration period CBS (customer by sufficient statistic). It must contain columns for frequency ('x') and total time observed ('T.cal').

censor

Cutoff point for number of transactions in plot.

xlab

Descriptive label for the x axis.

ylab

Descriptive label for the y axis.

title

Title placed on the top-center of the plot.

Value

Calibration period repeat transaction frequency comparison matrix (actual vs. expected).

References

Platzer Michael, and Thomas Reutterer (forthcoming)

See Also

bgcnbd.PlotFrequencyInCalibration

Examples

Run this code
# NOT RUN {
cbs <- cdnow.sample()$cbs
params <- mbgcnbd.EstimateParameters(cbs)
mbgcnbd.PlotFrequencyInCalibration(params, cbs)
# }

Run the code above in your browser using DataLab