user3658367
user3658367

Reputation: 641

how to find outliers in sas with proc means?

is there a way to detect an outlier from proc means while calculating min max Q1 and Q3? the box plot procedure is not working on my SAS and I am trying to perform a boxplt in excel with the values from SAS.

Upvotes: 0

Views: 4915

Answers (2)

Reeza
Reeza

Reputation: 21264

If you want a 'standard boxplot' use the outbox= option in SAS to create the standard data set used for a box plot.

proc boxplot data=sashelp.class;
plot age*sex / outbox = xyz;
run;

Upvotes: 0

Joe
Joe

Reputation: 63424

Assuming you have a specific definition for what an outlier is, PROC UNIVARIATE can calculate the value that appears at that percentile using the PCTLPTS keyword on the OUTPUT statement. It also will identify extreme observations individually, so you can see the top few observations (if you have few enough observations that the number of extremes is likely to be <= 5).

The paper A SAS Application to Identify and Evaluate Outliers goes over a few of the ways you can look at outliers, including box plots and PROC UNIVARIATE, and includes some regression-based approaches as well.

Upvotes: 2

Related Questions