# Recency, Frequency and Monetary Value Analysis

Tools for RFM (recency, frequency and monetary value) analysis. Generate RFM score from both transaction and customer level data. Visualize the relationship between recency, frequency and monetary value using heatmap, histograms, bar charts and scatter plots. Includes a 'shiny' app for interactive segmentation. References: i. Blattberg R.C., Kim BD., Neslin S.A (2008) .

Analysis

## Overview

Tools for RFM (recency, frequency and monetary) analysis. Generate RFM score from both transaction and customer level data. Visualize the relationship between recency, frequency and monetary value using heatmap, histograms, bar charts and scatter plots.

## Usage

### Introduction

RFM (recency, frequency, monetary) analysis is a behavior based technique used to segment customers by examining their transaction history such as

• how recently a customer has purchased (recency)
• how often they purchase (frequency)
• how much the customer spends (monetary)

It is based on the marketing axiom that 80% of your business comes from 20% of your customers. RFM helps to identify customers who are more likely to respond to promotions by segmenting them into various categories.

### Data

To calculate the RFM score for each customer we need transaction data which should include the following:

• a unique customer id
• date of transaction/order
• transaction/order amount

### RFM Table

rfm uses consistent prefix `rfm_` for easy tab completion. Use `rfm_table_order()` to generate the RFM score.

### Heat Map

The heat map shows the average monetary value for different categories of recency and frequency scores. Higher scores of frequency and recency are characterized by higher average monetary value as indicated by the darker areas in the heatmap.

### Bar Chart

Use `rfm_bar_chart()` to generate the distribution of monetary scores for the different combinations of frequency and recency scores.

### Histogram

Use `rfm_histograms()` to examine the relative distribution of

• monetary value (total revenue generated by each customer)
• recency days (days since the most recent visit for each customer)
• frequency (transaction count for each customer)

### Customers by Orders

Visualize the distribution of customers across orders.

### Scatter Plots

The best customers are those who:

• bought most recently
• most often
• and spend the most

Now let us examine the relationship between the above.

## Getting Help

If you encounter a bug, please file a minimal reproducible example using reprex on github. For questions and clarifications, use StackOverflow.

## Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

# rfm 0.2.0

This is a minor release for bug fixes and enhancements.

## Enhancements

• Export plot prep data (#20)
• Default customer segments (#24)
• Median Recency (#26)
• Median frequency (#27)
• Median monetary value (#28)

## Bug Fixes

• Error in segmentation plot (#36)
• Duplicated vignette titles (#42)

# rfm 0.1.1

Patch release to fix the shiny app.

# rfm 0.1.0

This is a minor release for bug fixes and enhancements.

## Enhancements

• Shiny app for interactive analysis (#1)
• Use customer data as input (#3)

First release

# Reference manual

install.packages("rfm")

0.2.2 by Aravind Hebbali, 2 years ago

Browse source code at https://github.com/cran/rfm

Authors: Aravind Hebbali [aut, cre]

Documentation:   PDF Manual