pnbd_LL | R Documentation |
Calculates the Log-Likelihood values for the Pareto/NBD model with and without covariates.
The function pnbd_nocov_LL_ind
calculates the individual log-likelihood
values for each customer for the given parameters.
The function pnbd_nocov_LL_sum
calculates the log-likelihood value summed
across customers for the given parameters.
The function pnbd_staticcov_LL_ind
calculates the individual log-likelihood
values for each customer for the given parameters and covariates.
The function pnbd_staticcov_LL_sum
calculates the individual log-likelihood values summed
across customers.
pnbd_nocov_LL_ind(vLogparams, vX, vT_x, vT_cal)
pnbd_nocov_LL_sum(vLogparams, vX, vT_x, vT_cal, vN)
pnbd_staticcov_LL_ind(vParams, vX, vT_x, vT_cal, mCov_life, mCov_trans)
pnbd_staticcov_LL_sum(vParams, vX, vT_x, vT_cal, vN, mCov_life, mCov_trans)
vLogparams |
vector with the Pareto/NBD model parameters at log scale. See Details. |
vX |
Frequency vector of length n counting the numbers of purchases. |
vT_x |
Recency vector of length n. |
vT_cal |
Vector of length n indicating the total number of periods of observation. |
vN |
The value ("number of times observed") with which the LL value of this observation is multiplied before summing across customers. |
vParams |
vector with the parameters for the Pareto/NBD model at log scale and the static covariates at original scale. See Details. |
mCov_life |
Matrix containing the covariates data affecting the lifetime process. One column for each covariate. |
mCov_trans |
Matrix containing the covariates data affecting the transaction process. One column for each covariate. |
vLogparams
is a vector with model parameters r, alpha_0, s, beta_0
at log-scale, in this order.
vParams
is vector with the Pareto/NBD model parameters at log scale,
followed by the parameters for the lifetime covariates at original scale and then
followed by the parameters for the transaction covariates at original scale
mCov_trans
is a matrix containing the covariates data of
the time-invariant covariates that affect the transaction process.
Each column represents a different covariate. For every column a gamma parameter
needs to added to vParams
at the respective position.
mCov_life
is a matrix containing the covariates data of
the time-invariant covariates that affect the lifetime process.
Each column represents a different covariate. For every column a gamma parameter
needs to added to vParams
at the respective position.
Returns the respective Log-Likelihood value(s) for the Pareto/NBD model with or without covariates.
Schmittlein DC, Morrison DG, Colombo R (1987). “Counting Your Customers: Who-Are They and What Will They Do Next?” Management Science, 33(1), 1-24.
Bachmann P, Meierer M, Naef, J (2021). “The Role of Time-Varying Contextual Factors in Latent Attrition Models for Customer Base Analysis” Marketing Science 40(4). 783-809.
Fader PS, Hardie BGS (2005). “A Note on Deriving the Pareto/NBD Model and Related Expressions.” URL http://www.brucehardie.com/notes/009/pareto_nbd_derivations_2005-11-05.pdf.
Fader PS, Hardie BGS (2007). “Incorporating time-invariant covariates into the Pareto/NBD and BG/NBD models.” URL http://www.brucehardie.com/notes/019/time_invariant_covariates.pdf.
Fader PS, Hardie BGS (2020). “Deriving an Expression for P(X(t)=x) Under the Pareto/NBD Model.” URL https://www.brucehardie.com/notes/012/pareto_NBD_pmf_derivation_rev.pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.