71Writing Loops in the DATA Step
set sbp point = obs_n;
output;
stop;
run;
title 'Select the fifth observation from SBP data set';
proc print data = ex5_9;
run;
Output from Program 5.9:
Select the fifth observation from SBP data set
Obs id sbp
1 05 151
5.2.2 Creating a Systematic Sample
A systematic sample is created by selecting every kth observation from an
original data set. In other words, the systematic sample cannot be created
sequentially; hence, a direct-access mode must be used. You can create a
systematic sample by using an iterative DO loop, which requires providing
start, stop, and increment values. Normally, start is set to 1, stop is set to the
total number of observations from the input data set, and increment is set to k