BookmarkSubscribeRSS Feed
onimisi_esho
Fluorite | Level 6

Hi, Please I am trying to do a segmentation analysis by grouping customer's into different segments by their revenue. The segments are Top 1%, Next 4%, Next 15%, Next 30% and bottom 50%.

 

Please what is the best approach to this.

 

I thought about using percentiles. 

3 REPLIES 3
PeterClemmensen
Tourmaline | Level 20

@onimisi_esho hi and welcome to the SAS Community 🙂

 

This can be done in a few different ways. Have you read this?

 

https://blogs.sas.com/content/iml/2019/08/07/essential-guide-binning-sas.html

onimisi_esho
Fluorite | Level 6

hi @PeterClemmensen ,

 

Thanks four response.

 

The quantile binning option seems to be the closest option to my problem. I am relatively new to SAS.

 

My data is on a table and I wish to output my result in the same table.(See Photo) My intended output is in yellow.

 

How will i go about this incorporating the function considering i will be writing an SQL statement. 

 

 

Segment.png

Reeza
Super User
Only by revenue? If so, that's more classification than segmentation as segmentation usually has multiple variables. If you're looking at just one variable and specific percentiles start with PROC RANK and GROUP=100. That will give you the percentile for each value and you can then create your groups as desired.

proc rank data=sashelp.cars out=want groups=100;
var mpg_city;
rank mpg_city_rank;
run;


*see distribution of ranks;
proc freq data=want;
table mpg_city_rank;
run;




This will create the ranking variables and you can then filter - 0 is lowest and 99 is the highest usually.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 589 views
  • 0 likes
  • 3 in conversation