- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Also, what version of SAS - the graphing options are changing quickly between versions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
SAS 9.4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Use the ID option to specify a variable that labels outliers when using the boxstyle =schematicid or schematicidfar. You likely want the SchematicIdFar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Am I understanding correctly that you want the values only, no circles at the locations?
You may need an annotate dataset for that...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Post your code and log
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.