Hi,
I am trying to calculate the number of outliers for my box and whisker plot. However, it seems that I cannot use "proc boxplot" in SAS 9.4? I always get this note "The SAS System stopped processing this step because of errors." with no other explanation when I try to use this procedure for my data. I even tried using this example from SAS 9.2. and it didn't work: https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_boxplot_sec...
Proc univariate works well enough to create the boxplot but I cannot find an analogous "NLOW" option to calculate the number of outliers below Q1 and above Q4.
So bottom line is:
1.) Is proc boxplot not in SAS 9.4?
2.) Is there an option in proc univariate to calculate the number of outliers above and below the whiskers in a box and whisker plot?
Thanks so much for reading my question!
Works for me.
Are you sure you have license for SAS/STAT software?
1 data Turbine; 2 informat Day date7.; 3 format Day date5.; 4 label KWatts='Average Power Output'; 5 input Day @; 6 do i=1 to 10; 7 input KWatts @; 8 output; 9 end; 10 drop i; 11 datalines; NOTE: The data set WORK.TURBINE has 200 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.27 seconds cpu time 0.04 seconds 32 ; 33 title 'Box Plot for Power Output'; 34 proc boxplot data=Turbine; 35 plot KWatts*Day; 36 run; NOTE: Processing beginning for PLOT statement number 1. NOTE: Since the format DATE is associated with the group variable Day, it is assumed that the natural interval between group positions is one DAY. NOTE: The REPEAT option is assumed when a DATE format is used with a group variable. NOTE: There were 200 observations read from the data set WORK.TURBINE. NOTE: PROCEDURE BOXPLOT used (Total process time): real time 9.71 seconds cpu time 1.67 seconds
BOXPLOT is part of SAS/STAT.
If you have SAS/STAT licensed and installed it should work. To get better responses you should copy from the LOG the submitted code that generated the error and the entire error and note messages. Since error messages often have diagnostics please paste the text copied from the log into a code box opened with the forum's {I} or "running man" icons to prevent the main message windows from reformatting the text.
Hi! Yes, I do have a license as I am using SAS from a university hospital computer. This is what my log says when I open SAS:
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M3)
Licensed to COLUMBIA UNIVERSITY-MORNINGSIDE CAMPUS-T&R, Site ------.
NOTE: This session is executing on the X64_7PRO platform.
NOTE: Updated analytical products:
SAS/STAT 14.1
NOTE: Additional host information:
X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation
NOTE: SAS initialization used:
real time 7.15 seconds
cpu time 0.65 seconds
And, this is the log I get when I try the boxplot example:
5538 data Turbine;
5539 informat Day date7.;
5540 format Day date5.;
5541 label KWatts='Average Power Output';
5542 input Day @;
5543 do i=1 to 10;
5544 input KWatts @;
5545 output;
5546 end;
5547 drop i;
5548 datalines;
NOTE: The data set WORK.TURBINE has 200 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
5569 ;
5570 run;
5571
5572 title 'Box Plot for Power Output';
5573 proc boxplot data=Turbine;
5574 plot KWatts*Day;
5575 run;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE BOXPLOT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
And this is my "About" window:
Thank you for your suggestions!
Try running this bit of code.
proc template; path show; run;
If the log looks much different than:
Current ODS PATH list is: 1. SASUSER.TEMPLAT(UPDATE) 2. SASHELP.TMPLMST(READ)
perhaps a modified "boxplot" template is in an additional location. I might try in that case:
Proc template; path reset; run;
to get the defaults as installed by SAS. And then try rerunning the Proc Boxplot code.
Yes, PROC BOXPLOT is in SAS 9.4. However, many things have changed in SAS since the 9.2 days. One of the most important (and exciting) is that SAS procedures now produce graphics by using the ODS system instead of the traditional graphics that used SAS/GRAPH technology.
I suspect that you are using a system that does not have SAS/GRAPH licensed. To get your box plot, first specify
ODS GRAPHICS ON;
Then the output should appear.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.