DATA Step, Macro, Functions and more

random selection of records based on some percentage

Reply
Super Contributor
Posts: 435

random selection of records based on some percentage

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

Super User
Super User
Posts: 7,942

Re: random selection of records based on some percentage

Super User
Posts: 10,023

Re: random selection of records based on some percentage

Super User
Posts: 10,023

Re: random selection of records based on some percentage

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;

Ask a Question
Discussion stats
  • 3 replies
  • 198 views
  • 0 likes
  • 3 in conversation