/* Example 19.3 Outlier Detection and Removal */
/* Chapter 19 page 937 */
data a;
retain seed 99831;
do kk = 1 to 48;
x = kk + 100 + rannor( seed );
date = intnx( 'month', '01jan70'd, kk-1 );
if kk = 20 then x = 2 * x;
else if kk = 30 then x = x / 10;
output;
end;
run;