BookmarkSubscribeRSS Feed
sam-syed
Calcite | Level 5

 

HI,

 

I am a student learning SAS, I am struggling to do the coading for below questions, I am wondering if anyone can help please?

 

 

Segment the customer base by customer revenue to compare the characteristics of the customers with the highest revenue to the rest of the customers. A standard way of doing the above is to compare the characteristic of the top 25% of customers to the bottom 75% on the basis of customer revenue.
 Examine and describe the customers in the top 25% of customer revenue using their demographics details as this will provide additional insights on who to target for the forthcoming marketing campaign in which the business would be looking to purchase a new prospect list.

5 REPLIES 5
KachiM
Rhodochrosite | Level 12

One way is to sort the data by the revenue in descending order. You can use the first 25 per cent of the observations. Use their IDs and go into their characteristics of interest for exploration.

ballardw
Super User

A number of procedures would give you the quartile values for your (assuming a single) revenue variable: Procs Univariate, Means or Summary with the Q1 or P25 statistic requested.

Add a variable back into your data to indicate whether a customer's revenue is at or above (top 25%) or below that value (bottom 75%).

You can then run reports or tests using that segmentation variable to create comparisons such as using it in a CLASS statement in Proc Means or Summary, or a crossing variable in a Tables statement for Proc Freq, or as a categorical variable in modeling procedures.

sam-syed
Calcite | Level 5

Hi,

Thank you for getting back to me,

I am still confuse with it as you can understand I am a student and trying to learn. 

Honestly, I learn more through example, is there any chance you can provide me example with the coding so I can understand how its working out?

 

Thank you in advance,

 

Regards

ballardw
Super User

Provide some example data to work with as datastep code.

 

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

has an example of creating datastep from a dataset.

LinusH
Tourmaline | Level 20
It seems to my that you are learning from scratch. Unfortunately this forum us Nog the appropriate place for that.
There are free online SAS Programming training, I suggest that you start with that.
Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 1097 views
  • 0 likes
  • 4 in conversation