Summary method for objects of class clv.data
that provides information about the estimation and
possible holdout sample, and descriptive statistics of the transaction data.
# S3 method for clv.data
summary(object, ...)# S3 method for summary.clv.data
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for clv.data.dynamic.covariates
summary(object, ...)
# S3 method for summary.clv.data.dynamic.covariates
print(x, digits = max(3L, getOption("digits") - 3L), ...)
# S3 method for clv.data.static.covariates
summary(object, ...)
# S3 method for summary.clv.data.static.covariates
print(x, digits = max(3L, getOption("digits") - 3L), ...)
A CLV data object containing transactional data and potentially also contextual factors.
Ignored.
An object of class "summary.clv.data"
, usually, a result of a call to summary.clv.data
.
The number of significant digits to use when printing.
This function computes and returns summary statistics of the
transactional and covariates data given in object
. This is a list of
class summary.clv.data
and contains the elements:
Human readable description of the type of data.
Summary information about the stored clv.time
object.
A data.table
with summary statistics of
the transactions overall and in the estimation and holdout sample.
For static covariates data, the list additionally is of class summary.clv.data.static.covariates and further contains the elements:
Names of the covariates for the Transaction process.
Names of the covariates for the Lifetime process.
plot
for how to plot a clv data object
clvdata
for how to create a clv data object
SetStaticCovariates
for how to add static covariates
SetDynamicCovariates
for how to add dynamic covariates
# NOT RUN {
# }
# NOT RUN {
data("apparelTrans")
clv.data.apparel <- clvdata(apparelTrans, date.format = "ymd",
time.unit = "w",
estimation.split = 40)
# summary of transaction data and split
summary(clv.data.apparel)
# add contextual factors
data("apparelStaticCov")
clv.data.apparel.cov <-
SetStaticCovariates(clv.data.apparel,
data.cov.life = apparelStaticCov,
names.cov.life = "Gender",
data.cov.trans = apparelStaticCov,
names.cov.trans = "Gender")
# additional info about the covariates
summary(clv.data.apparel.cov)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab