Quantcast
Channel: ListenData
Viewing all articles
Browse latest Browse all 425

SAS : Random Sampling with PROC SQL

$
0
0
This tutorial explains how to get random sample with PROC SQL.
Random Sampling with PROC SQL
The RANUNI Function performs random sampling and OUTOBS restricts row processing.
proc sql outobs = 10;
create table tt as
select * from sashelp.class
order by ranuni(1234);
quit;
In this case, we are selecting 10 random samples. 

Viewing all articles
Browse latest Browse all 425

Trending Articles