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);

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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