The newdata
argument has to be a clv data object of the exact same class as the data object
on which the model was fit. In case the model was fit with covariates, newdata
needs to contain identically
named covariate data.
The use case for newdata
is mainly two-fold: First, to estimate model parameters only on a
sample of the data and then use the fitted model object to predict or plot for the full data set provided through newdata
.
Second, for models with dynamic covariates, to provide a clv data object with longer covariates than contained in the data
on which the model was estimated what allows to predict or plot further. When providing newdata
, some models
might require additional steps that can significantly increase runtime.
prediction.end
indicates until when to predict or plot and can be given as either
a point in time (of class Date
, POSIXct
, or character
) or the number of periods.
If prediction.end
is of class character, the date/time format set when creating the data object is used for parsing.
If prediction.end
is the number of periods, the end of the fitting period serves as the reference point
from which periods are counted. Only full periods may be specified.
If prediction.end
is omitted or NULL, it defaults to the end of the holdout period if present and to the
end of the estimation period otherwise.
The first prediction period is defined to start right after the end of the estimation period.
If for example weekly time units are used and the estimation period ends on Sunday 2019-01-01, then the first day
of the first prediction period is Monday 2019-01-02. Each prediction period includes a total of 7 days and
the first prediction period therefore will end on, and include, Sunday 2019-01-08. Subsequent prediction periods
again start on Mondays and end on Sundays.
If prediction.end
indicates a timepoint on which to end, this timepoint is included in the prediction period.
predict.spending
uses a Gamma/Gamma model to predict customer spending. This option is only available
if customer spending information was provided when the data object was created.
continuous.discount.factor
allows to adjust the discount rate used to estimated the discounted expected
transactions (DERT
).
The default value is 0.1
(=10%). Note that a continuous rate needs to be provided.
The Gamma-Gamma model to Predict Spending
Most probabilistic latent customer attrition model capture future customer
behavior as a combination of the customer's purchase and attrition process.
However, in order to derive a monetary value such as CLV, customer spending
also has to be considered. To model customer spending the Gamma/Gamma is a
popular choice.