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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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