BookmarkSubscribeRSS Feed
EthanArenson
Calcite | Level 5

My sampling unit is STUDENT, which in the population has the following strata: SCHOOL, GRADE (4 levels), and WRITING_SCORE (4 levels).

 

I want to draw an SRS from the population. However SCHOOL is not a stratum in the sample. The sample strata are: GRADE and WRITING_SCORE. 

 

How can I use SURVEYSELECT to draw an SRS that enforces the constraint that no more than 5 students are selected from the same SCHOOL?

2 REPLIES 2
PGStats
Opal | Level 21

It won't be a SRS then, right?

 

You could select at most 5 students from each school and then SRS from those.

PG
EthanArenson
Calcite | Level 5
Thanks for your correction. If this is no longer an SRS, then what kind of
a sample is it?

There is a certain logic for this. While students are nested within schools
in the population, I'm trying to draw, for example, a sample from all
(i.e., from all schools) 2nd-grade students with a writing score of 1. I
want to continue sampling like this across grades and writing scores, again
subject to the constraint that maxsize =5.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 592 views
  • 0 likes
  • 2 in conversation