BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Can anyone help with the code for drawing a stratifies sample using SAS.
3 REPLIES 3
deleted_user
Not applicable
Hi everyone. I made this post but realized that I may have left out some vital information. I have a data of about 300 observations (sch) from which I want to draw a sample of 100. I've used the proc surveyselect for the simple random sampling but I now want to do a stratified sample because my simple random sample gives me more of high SES (1) and I want the sample to have equal representation of each SES and each county.

Sch SES County Rate1 Rate2 Rate3 Rate4
AAG 2 cga 0.39 0.63 0.39 0.63
ALB 1 rls 0.00 0.28 0.00 0.28
OCA 2 tbe 0.43 0.18 0.43 0.18
APl 1 dce 0.10 0.35 0.10 0.35
AYD 1 ffe 0.25 0.34 0.25 0.34
AAL 1 lle 0.14 0.35 0.14 0.35
AEY 1 ctt 0.12 0.57 0.12 0.57
Doc_Duke
Rhodochrosite | Level 12
Try searching tech support. I got this immediately on a search for
stratified random sample
http://support.sas.com/kb/24/763.html
gianni
Calcite | Level 5

PROC SURVEYSELECT DATA=name_dataset

OUT=sampling METHOD=SRS ;

STRATA name_variable_of_strata;

RUN;

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 ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1318 views
  • 0 likes
  • 3 in conversation