The syntax for the INSET statement is as follows:
- INSET keyword-list < / options >;
You can use any number of INSET statements in the
Each INSET statement produces a separate inset and
must follow one of the chart statements.
When the chart statement produces a comparative Pareto chart, an
inset appears in every cell produced by the chart
The statistics are displayed in the order in which they are specified.
The following statements produce a vertical Pareto chart with
insets in the upper left and upper right corners, and a horizontal
comparative Pareto chart with insets in each cell.
proc pareto data=failure3;
vbar cause / maxncat = 5 other = 'Others';
inset nothercat / pos = nw;
inset nother / pos = ne;
hbar cause / class = stage classkey = 'Before Cleaning';
inset n / pos = ne;
The statistics displayed in an inset are computed for a specific
process variable using observations for the current BY group
and CLASS= variable level, if applicable.
For example, in the following statements there are two process
variables (TOMATO and SQUASH), a BY variable (YEAR), and two
CLASS= variables (FERT and PEST).
If there are three different years (levels of YEAR), then
a total of six comparative Pareto charts are produced: three
for each process variable.
In addition, if there are two different levels of FERT and three
of PEST, each comparative Pareto chart contains six cells.
Each cell contains an inset with statistics computed for a
particular process variable, year, and combination of FERT and
proc pareto data=plants;
vbar (tomato squash) / class = (fert pest);
The components of the INSET statement are described as follows.
- can include any of the keywords listed in
"Summary of INSET Keywords".
The DATA= keyword requires an operand specified immediately
after it, naming the data set containing data to be displayed.
The NOTHERCAT and NOTHER statistics are zero if the
OTHER= option is not specified. The NEXCL statistic is zero
if the OTHER= option is specified.
By default, inset statistics are identified with appropriate
labels, and numeric values are printed using appropriate formats.
However, you can provide customized labels and formats. You
provide the customized label by specifying the keyword
for that statistic followed by an equal sign (=) and the label
in quotes. Labels can have up to 24 characters. You provide
the numeric format in parentheses after the keyword.
Note that if you specify both a label and a format for a
statistic, the label must appear before the
format. For an example, see "Customizing Labels and
Formatting Values" on this page.
- appear after the slash (/) and control the appearance of
the inset. For example, the following INSET statement
uses two appearance options (POSITION= and CTEXT=):
inset n nothercat nother / position=ne ctext=yellow;
The POSITION= option determines the location of the inset,
and the CTEXT= option specifies the color of the text of
See "Summary of Options" for a list of all
available options and "Dictionary of Options" for detailed descriptions.
Note the difference between keywords and options;
keywords specify the information to be displayed
in an inset, whereas options control the appearance
of the inset.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.