BookmarkSubscribeRSS Feed
sanketshah07
Obsidian | Level 7

Here is a brief description of the problem:

I have a dataset containing IDs cand dates. I have assigned the cases to groups based on a year and have 3 such groups. I need to obtain random samples from this dataset in such a way that the 35%,35% and 30% of cases are picked from the three groups respectively and none of the IDs are overlapping. I intended to use PROC Surveyselect simple random sampling for this but I don't know how to assign the percentages/weights to the groups. Kindly advise.

1 REPLY 1
ballardw
Super User

The basic approach would be to have YEAR as a STRAT variable and then SAMPRATE = (.35 .35 .30)

However if the ID appears in multiple years then additional steps may be needed. If your data is large enough you may not have any duplicates selected.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 2090 views
  • 0 likes
  • 2 in conversation