The BOXPLOTPARM statement
requires pre-computed input data. One reason to choose this statement
over the BOXPLOT statement is that you can control the computational
technique used to compute various statistics for the box plot, such
as the mean, quartiles, location of fences, outlier definition, and
so on. See
Generalized Macro for BOXPLOTPARM Data for examples of such computations
using PROC SUMMARY and multiple DATA steps.
The BOXPLOTPARM statement
displays a single box if given just Y and a STAT argument. It displays
multiple boxes if given both Y and X and a STAT argument and X has
more than one unique value.
By default for numeric
or character columns, the category (X) axis is TYPE=DISCRETE. You
can override the default and specify TYPE=LINEAR in the parent layout,
provided that the X column is numeric. The axis for the analysis (Y)
column is always LINEAR. When the X axis is LINEAR, you can use the
INTERVALBOXWIDTH= option to specify the box width.
When
ORIENT=VERTICAL, the X (or X2) axis is used for the X column and
the Y (or Y2) axis is used for the Y column. When ORIENT=HORIZONTAL,
the X (or X2) axis is used for the Y column and the Y (or Y2) axis
is used for the X column.
Two basic box plot representations
can be drawn with the BOXPLOTPARM statement: a
schematic
(Tukey) box plot and a
skeletal
box plot. See the
EXTREME= option for details.
The following figure
illustrates the box plot elements:
As shown in the figure,
the bottom and top edges of the box are located at the 1st quartile
(25th percentile) and 3rd quartile (75th percentile) of the sample.
Within the box, you can display the median (50th percentile) as a
line and the mean as a marker (see the
DISPLAY= option).
You can also display
markers and data labels for outliers. Outliers are observations that
are more extreme than the upper and lower fences (
). Outliers that are beyond upper and lower far fences
(
) are called FAR OUTLIERS and can also be identified
and labeled. From a graphical perspective, the location of fences
along the axis are known, but there is no line or marker that displays
a fence. (See
DISPLAY=,
LABELFAR=, and
DATALABEL= options).
Finally, you can control
the range represented by the whiskers. By default, the whiskers are
drawn from the upper edge of the box to the MAX value, and from the
lower edge of the box to the MIN value. (See the
EXTREME= option.)