findRFM: Compute RFM for Transaction Data

Description Usage Arguments Value Examples

View source: R/findRFM.R

Description

The function calculates the RFM value of a given customer data.The function consumes customer data in a fixed format and returns RFM values and scores for each customer. Click here for an overview document Click here for a VIDEO TUTORIAL

Usage

1
2
findRFM(customerdata, recencyWeight = 4, frequencyWeight = 4,
  monetoryWeight = 4)

Arguments

customerdata

- A data frame of the follwing coloumns - TransactionID, Customer ID, Date of Transaction (in date format),Amount of purchase

recencyWeight

- Weight the model should assign to the recency factor

frequencyWeight

- Weight the model should assign to the frequency factor

monetoryWeight

- Weight the model should assign to the monetory factor

Value

A data frame summarized ar customer ID level with the folloiwng data :

Individual Recency, Frequency and Monetary Scores for the data set

Weighted individual Recency, Frequency and Monetary scores for the data set

Final RFM and Weighted RFM scores for each customer

Customer class on a 5 point scale

Examples

1
2
3
4
5
6
TransNo <- c('0','1')
CustomerID <- c('Cust1','Cust2')
DateofPurch <- as.Date(c('2010-11-1','2008-3-25'))
Amount <- c(1000,500)
customerData <- data.frame(TransNo,CustomerID,DateofPurch,Amount)
findRFM(customerData)

Example output

Source: local data frame [2 x 16]
Groups: <by row>

# A tibble: 2 x 16
  CustomerID MeanValue LastTransaction NoTransaction MonetoryPercentile
       <chr>     <dbl>          <date>         <int>              <dbl>
1      Cust1      1000      2010-11-01             1                  1
2      Cust2       500      2008-03-25             1                  0
# ... with 11 more variables: FrequencyPercentile <dbl>,
#   RecencyPercentile <dbl>, MonetoryScore <dbl>, FrequencyScore <dbl>,
#   RecencyScore <dbl>, MonetoryWeightedScore <dbl>,
#   FrequencyWeightedScore <dbl>, RecencyWeightedScore <dbl>, FinalScore <dbl>,
#   FinalWeightedScore <dbl>, FinalCustomerClass <chr>

didrooRFM documentation built on May 1, 2019, 10:09 p.m.

Related to findRFM in didrooRFM...