BookmarkSubscribeRSS Feed
Syndey
Calcite | Level 5

HI i have a table with all my customers and customer attributes. The table only contains one customer per row. So no duplicates. From this group of customers I wany four groups that are representibe of my base and mutually exclusive. I am running the below code

proc surveyselect data=base

out =groups

methos =srs

samprate =0.07

seed = 1452

rep= 4;

strata gender cust_seg;

run;

when i run the above code I get four groups but a customer in group one could also be in group 3.does anyone know I can make the groups mutually exclusive

thanks

1 REPLY 1
ballardw
Super User

The REPlicate option generates independent samples so may have the same record in more than one replicate.

Some options would be to add another stratification variable if the 4 groups should have some desired feature in common such as industry or geographical region. OR cluster

Or create larger sample and then assign groups later in a data step with something like:

group = mod(_n_,4);

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 1105 views
  • 0 likes
  • 2 in conversation