bgbb.rf.matrix.PosteriorMeanDropoutRate: BG/BB Posterior Mean Dropout Rate using a recency-frequency...

Description Usage Arguments Details Value References See Also Examples

View source: R/bgbb.R

Description

Computes the mean value of the marginal posterior value of Theta, the geometric dropout process parameter.

Usage

1

Arguments

params

BG/BB parameters - a vector with alpha, beta, gamma, and delta, in that order. Alpha and beta are unobserved parameters for the beta-Bernoulli transaction process. Gamma and delta are unobserved parameters for the beta-geometric dropout process.

rf.matrix

recency-frequency matrix. It must contain columns for frequency ("x"), recency ("t.x"), number of transaction opportunities in the calibration period ("n.cal"), and the number of customers with this combination of recency, frequency and transaction opportunities in the calibration period ("custs"). Note that recency must be the time between the start of the calibration period and the customer's last transaction, not the time between the customer's last transaction and the end of the calibration period.

Details

E(Theta | alpha, beta, gamma, delta, x, t.x, n). This is calculated by setting l = 0 and m = 1 in bgbb.PosteriorMeanLmProductMoment.

rf.matrix has columns x, t.x, and n.cal'.

Value

The posterior mean dropout rate.

References

Fader, Peter S., Bruce G.S. Hardie, and Jen Shang. "Customer-Base Analysis in a Discrete-Time Noncontractual Setting." Marketing Science 29(6), pp. 1086-1108. 2010. INFORMS. Web.

See Also

bgbb.PosteriorMeanDropoutRate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(donationsSummary)

rf.matrix <- donationsSummary$rf.matrix
# donationsSummary$rf.matrix already has appropriate column names

# starting-point parameters
startingparams <- c(1, 1, 0.5, 3)
# estimated parameters
est.params <- bgbb.EstimateParameters(rf.matrix, startingparams)

# return the posterior mean dropout rate vector
bgbb.rf.matrix.PosteriorMeanDropoutRate(est.params, rf.matrix)

Example output

Loading required package: hypergeo
 [1] 0.06955854 0.06955854 0.06955854 0.06955854 0.06955854 0.06955854
 [7] 0.11606209 0.09615814 0.08818559 0.08389008 0.08120446 0.16752458
[13] 0.13431763 0.11391216 0.10173828 0.20358250 0.16754421 0.13711654
[19] 0.23732732 0.19368820 0.27432512 0.31036693

BTYD documentation built on Nov. 18, 2021, 1:10 a.m.