BookmarkSubscribeRSS Feed
andrewjmdata
Obsidian | Level 7

Hi, I have a table of 100,000 customers. I have the month when they started buying from my client. The range of months is 1-200.

 

What I want to do is break that down into 1/3rd's for example out put might be:

 

1st 1/3 (33%) of customers bought in months 1->12 

2nd 1/3 (33%) of customers bought in months 13->124

3rd 1/3 (33%) of customers bought in months 125->200

 

I think the solution is to use proc rank but can't seem to get month breaks based on volume of customers.

 

Make sense?

 

Thanks

 

Andrew 

 

3 REPLIES 3
PGStats
Opal | Level 21

Use option groups=3 in the proc ranks statement and variable month in the var statement.

PG
andrewjmdata
Obsidian | Level 7

Thanks PG. I'll give it a go.

Reeza
Super User

It depends a bit on your data structure  - quite a bit - and how your'e defining month. If months are 1 to 12 are the same for each customer for example, or do they relate to when a customer first joined the company. 

 

Also you may want to use survival analysis instead of just times as that accounts for accounts still open/active more accurately than just just using accounts. 

 


@andrewjmdata wrote:

Hi, I have a table of 100,000 customers. I have the month when they started buying from my client. The range of months is 1-200.

 

What I want to do is break that down into 1/3rd's for example out put might be:

 

1st 1/3 (33%) of customers bought in months 1->12 

2nd 1/3 (33%) of customers bought in months 13->124

3rd 1/3 (33%) of customers bought in months 125->200

 

I think the solution is to use proc rank but can't seem to get month breaks based on volume of customers.

 

Make sense?

 

Thanks

 

Andrew 

 


 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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