This tutorial explains how to get random sample with PROC SQL.
The RANUNI Function performs random sampling and OUTOBS restricts row processing.
proc sql outobs = 10;In this case, we are selecting 10 random samples.
create table tt as
select * from sashelp.class
order by ranuni(1234);
quit;
Didnt got the logic behind the Random sampling, Can anyone please explain me?
ReplyDelete