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

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 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
  • 1329 views
  • 0 likes
  • 3 in conversation