View source: R/f_s3generics_clvdata.R
summary.clv.data | R Documentation |
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 class 'clv.data'
summary(object, ids = NULL, ...)
## S3 method for class 'summary.clv.data'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'clv.data.dynamic.covariates'
summary(object, ...)
## S3 method for class 'summary.clv.data.dynamic.covariates'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'clv.data.static.covariates'
summary(object, ...)
## S3 method for class 'summary.clv.data.static.covariates'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
object |
A CLV data object containing transactional data and potentially also contextual factors. |
ids |
A character vector of customer ids for which the transaction data is summarized. Defaults to
|
... |
Ignored |
x |
An object of class |
digits |
The number of significant digits to use when printing. |
If applicable, the summary statistics are provided separately for the estimation and holdout period as well as
for the overall time period (estimation + holdout). By using the ids
argument, the summary statistics can
be limited to a subset of customers.
Number of customers
Count of individual customers.
First Transaction in period
Time point of the first transaction occurring in the indicated period.
Last Transaction in period
Time point of the last transaction occurring in the indicated period.
Total # Transactions
Count of transactions occurring in the indicated period.
Mean # Transactions per cust
Average transactions per customer in the indicated period, including standard deviation (SD).
Mean Spending per Transaction
Average spending per customer in the indicated period, including standard deviation (SD). Spending statistics are only available if spending data was provided when creating the object.
Total Spending
Sum of customer spending during the indicated period.
Total # zero repeaters
Number of customers who purchased only once during the estimation period.
Percentage of zero repeaters
Percentage of customers who purchased only once during the estimation period.
Mean Interpurchase time
Average time (in number of periods) between two transactions of the same customer, including standard deviation (SD).
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:
name |
Human readable description of the type of data. |
summary.clv.time |
Summary information about the stored |
descriptives.transactions |
A |
selected.ids |
Ids for which the transaction data was summarized. |
For static covariates data, the list additionally is of class summary.clv.data.static.covariates
and further contains the elements:
names.cov.data.trans |
Names of the covariates for the Transaction process. |
names.cov.data.life |
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
data("apparelTrans")
clv.data.apparel <- clvdata(apparelTrans, date.format = "ymd",
time.unit = "w",
estimation.split = 52)
# summary of transaction data and split
summary(clv.data.apparel)
# transaction summary of customer "1219"
summary(clv.data.apparel, ids="1219")
# transaction summary of customers "1", "10", "100", and "1000"
summary(clv.data.apparel, ids=c("1", "10", "100", "1000"))
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.