Description Usage Arguments Details Value See Also
This is to ensure consistency across all functions that require the
likelihood function, or the log of it, and to make sure that the same
implementation of the hypergeometric function is used everywhere for building
A0
.
1 | pnbd.generalParams(params, x, t.x, T.cal, func, hardie = TRUE)
|
params |
Pareto/NBD parameters - a vector with r, alpha, s, and beta, in that order. r and alpha are unobserved parameters for the NBD transaction process. s and beta are unobserved parameters for the Pareto (exponential gamma) dropout process. |
x |
number of repeat transactions in the calibration period T.cal, or a vector of transaction frequencies. |
t.x |
time of most recent repeat transaction, or a vector of recencies. |
T.cal |
length of calibration period, or a vector of calibration period lengths. |
func |
name of the function calling dc.InputCheck; either |
hardie |
if TRUE, use |
This function is only ever called by either pnbd.LL
or
pnbd.PAlive
so it returns directly the output that is expected
from those calling functions: either the log likelihood for a set of
customers, or the probability that a set of customers with characteristics
given by x
, t.x
and T.cal
, having estimated a set of
params
, is still alive. Either set of customers can be of size 1.
A vector of log likelihood values if func
is pnbd.LL
,
or a vector of probabilities that a customer is still alive if func
is pnbd.PAlive
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.