Skip to content

RFMANALYSIS

Recency, frequency and monetary (RFM) scores from customer data or from transactions.

RFMANALYSIS /RFMVARIABLES RECENCY=var FREQUENCY=var MONETARY=var | ID=var DATE=var MONETARY=var [/SUMMARIES=TOTAL|MEAN|MEDIAN|MAXIMUM] [/REFDATE=value] [/BINNING METHOD=NESTED|INDEPENDENT NUMBINS=5 [RECENCY=n FREQUENCY=n MONETARY=n] TIES=KEEPTOGETHER|RANDOM] [/PRINT=BINS NONE] [/PLOT=HEATMAP HISTOGRAMS BINCOUNTS NONE] [/OUTFILE DATASET=name].
Kind Procedure (reads data, produces output)
Body main /SUBCOMMAND[=] …
Changes data yes, undoable
Subcommands /BINNING, /OUTFILE, /PLOT, /PRINT, /REFDATE, /RFMVARIABLES, /SAVE, /SUMMARIES
Menu Analyze ▸ Direct Marketing
Slot: Recency (or transaction date) 1–1 variable(s); levels: nominal, ordinal, scale; types: numeric
Slot: Frequency 0–1 variable(s); levels: nominal, ordinal, scale; types: numeric
Slot: Monetary 1–1 variable(s); levels: nominal, ordinal, scale; types: numeric
Slot: Customer ID (transaction data) 0–1 variable(s); levels: nominal, ordinal, scale; types: numeric, string
  • RFMVARIABLES: customer data: RECENCY, FREQUENCY, MONETARY; transaction data: ID, DATE, MONETARY
  • BINNING: NESTED bins frequency within recency and monetary within both; 2–9 bins per component
  • OUTFILE: transaction data only: the new customer dataset (default RFM_Scores)
RFMANALYSIS /RFMVARIABLES RECENCY=days_since FREQUENCY=orders MONETARY=spend.
RFMANALYSIS /RFMVARIABLES ID=customer DATE=order_date MONETARY=amount /SUMMARIES=TOTAL /OUTFILE DATASET=customers.
  • Scores run from 1 to NUMBINS with the highest for the best customers; RFM_Score = 100R + 10F + M.
  • In customer data a date-formatted recency counts later dates as more recent; any other recency variable is read as time since the last purchase.
  • Customer data: the four scores are saved to the active dataset.

SEGMENT, PROPENSITY


Generated from OrcStat’s command registry and reference. To suggest a change, open an issue.