Hi ! I am new in this so my question is: how do I make SAS show the values of the outliers in my boxplots?
I used the "schematic" style, is there another style in boxplots that will show it?
Thanks
Nicolas
Please show the code you are using as there are several ways to make box plots and some suggestions won't apply with your starting point.
proc boxplot data=assign1;
plot fat*trt/boxstyle=schematic;
run;
proc boxplot data=assign1;
plot rea*trt/boxstyle=schematic;
run;
proc boxplot data=assign1;
plot kph*trt/boxstyle=schematic;
run;
Thanks
Also, what version of SAS - the graphing options are changing quickly between versions.
SAS 9.4
Hi Nicolas-
I think you may be looking for BOXSTYLE=SCHEMATICIDFAR. (or SCHEMATICID)
Take a look at the last couple of boxplot examples (28.3.4) to see if this is what you want to display.
title 'Analysis of Airline Departure Delays';
title2 'BOXSTYLE=SCHEMATICIDFAR';
proc boxplot data=Times;
plot Delay*Day /
boxstyle = schematicidfar
odstitle = title
odstitle2 = title2
nohlabel;
id Reason;
label Delay = 'Delay in Minutes';
run;
Hope this helps!
WendyT
Nop, it does not show the "values" but that I mean the actual figure, number, it shos the outlier OK but I actually want to show the value of that outliers (for ex. 0.62, etc).
Thanks anyway
Use the ID option to specify a variable that labels outliers when using the boxstyle =schematicid or schematicidfar. You likely want the SchematicIdFar.
Am I understanding correctly that you want the values only, no circles at the locations?
You may need an annotate dataset for that...
The circles and the values....
Thanks! I already tried the SCHEMATICID option but still shows the outlies circles (which is fine) but does not show the values the circles represent.
Thanks
Post your code and log
proc boxplot data=assign1;
plot fat*trt/boxstyle=schematic;
run;
proc boxplot data=assign1;
plot rea*trt/boxstyle=schematic;
run;
proc boxplot data=assign1;
plot kph*trt/boxstyle=schematic;
run;
That's the same code you posted above, please show with the boxstyle options suggested - ID/IDFAR.
Also, log and output that isn't what you expected.
proc boxplot data=assign1;
plot fat*trt/boxstyle=schematicidfar horizontal;
label;
run;
proc boxplot data=assign1;
plot rea*trt/boxstyle=schematicidfar horizontal;
run;
proc boxplot data=assign1;
plot kph*trt/boxstyle=schematicidfar horizontal;
run;
I also tried the horizontal option to see if it worked...
1. Use boxstyle=schematicID
2. Use an ID statement to specify the ID variable - you've missed this step.
data class;
set class;
if name='Alfred' then weight=200;
if name='Robert' then weight=500;
if name='Alice' then weight=20;
run;
title;
proc boxplot data=class;
plot weight*sex /
boxstyle = schematicid
;
id name;
run;quit;
This is @ballardw solution several response above, as well.
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 16. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: