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
Use option groups=3 in the proc ranks statement and variable month in the var statement.
Thanks PG. I'll give it a go.
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
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.
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.