BookmarkSubscribeRSS Feed
Babloo
Rhodochrosite | Level 12

How to select 10% of 'M' and 50% of 'F' from the dataset sashelp.class?

3 REPLIES 3
Ksharp
Super User

data class;

set sashelp.class;

run;

proc sort data=class;by sex;run;

proc surveyselect data=class samprate=(0.1 0.5) out=want;

strata sex;

run;

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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