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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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