I am working on BTYD R package and the problem is that the values of the probability that a customer is alive at the end of calibration are extremely high. Even observations with only one transaction in calibration period have this probability around 0.9999. I know that the parameter "s" (estimated by the package) is used in this calculation. My gamma is very low (almost 0). When I tried to change it manually for higher value the probabilities went down. Any idea how to deal with this problem? I attach my codes below.
elog <- dc.MergeTransactionsOnSameDate(elog)
end.of.cal.period <- min(elog$date)+as.numeric((max(elog$date)-min(elog$date))/2)
data <- dc.ElogToCbsCbt(elog, per="week",
T.cal=end.of.cal.period,
merge.same.date=TRUE,
statistic = "freq")
cal2.cbs <- as.matrix(data[[1]][[1]])
## prameters estimation
params2 <- pnbd.EstimateParameters(cal2.cbs)
## log likehood
(LL <- pnbd.cbs.LL(params2, cal2.cbs))
p.matrix <- c(params2, LL)
for (i in 1:20) {
params2 <- pnbd.EstimateParameters(cal2.cbs, params2)
LL <- pnbd.cbs.LL(params2, cal2.cbs)
p.matrix.row <- c(params2, LL)
p.matrix <- rbind(p.matrix, p.matrix.row)
}
(params2 <- p.matrix[dim(p.matrix)[1],1:4])
# set up parameter names for a more descriptive result
param.names <- c("r", "alpha", "s", "beta")
LL <- pnbd.cbs.LL(params2, cal2.cbs)
# PROBABILITY A CUSTOMER IS ALIVE AT END OF CALIBRATION / TRAINING
x <- cal2.cbs["123", "x"] # x is frequency
t.x <- cal2.cbs["123", "t.x"] # t.x is recency, ie time of last transactions
T.cal <- 26 # week of end of cal, i.e. present
pnbd.PAlive(params2, x, t.x, T.cal)