Calculates the discounted expected residual transactions.
pnbd_nocov_DERT
Discounted expected residual transactions for the Pareto/NBD model without covariates
pnbd_staticcov_DERT
Discounted expected residual transactions for the Pareto/NBD model with static covariates
pnbd_nocov_DERT(
vEstimated_params,
continuous_discount_factor,
vX,
vT_x,
vT_cal
)pnbd_staticcov_DERT(
vEstimated_params,
continuous_discount_factor,
vX,
vT_x,
vT_cal,
mCov_life,
mCov_trans,
vCovParams_life,
vCovParams_trans
)
Vector with the Pareto/NBD model parameters at original scale.
continuous discount factor to use
Frequency vector of length n counting the numbers of purchases.
Recency vector of length n.
Vector of length n indicating the total number of periods of observation.
Matrix containing the covariates data affecting the lifetime process. One column for each covariate.
Matrix containing the covariates data affecting the transaction process. One column for each covariate.
Vector of estimated parameters for the dropout covariates.
Vector of estimated parameters for the transaction covariates.
Returns a vector with the DERT for each customer.
vEstimated_params
vector with the estimated parameters in original scale
for the Pareto/NBD model, namely (r, alpha, s, beta).
r and alpha: unobserved parameters that describe the NBD transaction process.
s and beta: unobserved parameters that describe the pareto
(exponential gamma) lifetime process.
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 vCovParams_trans
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 vCovParams_life
at the respective position.
Fader, Peter S., and Bruce G.S. Hardie (2005). "A Note on Deriving the Pareto/NBD Model and Related Expressions.", Web. http://www.brucehardie.com/notes/008/.