SAS : Random Sampling with PROC SQL

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;
create table tt as
select * from sashelp.class
order by ranuni(1234);
In this case, we are selecting 10 random samples. 

Proc SQL Tutorials : 15 Proc SQL Tutorials

SAS Tutorials : 100 Free SAS Tutorials

About Author:

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has over 7 years of experience in data science and predictive modeling. During his tenure, he has worked with global clients in various domains like banking, Telecom, HR and Health Insurance.

While I love having friends who agree, I only learn from those who don't.

Let's Get Connected: Email | LinkedIn

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*
Related Posts:
0 Response to "SAS : Random Sampling with PROC SQL"

Post a Comment

Next → ← Prev