Friday, January 11, 2008

Detecting Outliers based on 99% quantiles

libname raw "PATH";

ods output Quantiles=quantiles;
proc univariate data=raw.clinic;
var height;
run;
ods output close;

data quantiles;
set quantiles;
where Quantile="99%";
run;


data final(drop=varname estimate);
retain estimate _estimate;
set quantiles raw.clinics;
if _n_=1 then _estimate=estimate;
if _n_=1 then delete;
if _estimate>height then output;
run;













































































run;

No comments: