|INSET and INSET2 Statements
The syntax for the INSET and INSET2 statements is as follows:
- INSET keyword-list < / options >;
- INSET2 keyword-list < / options >;
You can use any number of INSET and INSET2 statements in the
Each INSET or INSET2 statement produces a separate inset and
must follow one of the chart statements.
The inset appears on every panel (page) produced by the last chart
statement preceding it.
The statistics are displayed in the order in which they are specified.
The following statements produce a boxplot with two insets and
an and R chart with one inset in the chart
and one in the R chart.
proc shewhart data=wafers;
boxchart diamtr * batch / lsl=34.9 target=35 usl=35.1;
inset lsl target usl;
inset cp cpk cpm;
inset nmin nmax nout;
inset2 nlow2 nhigh2;
The statistics displayed in an inset are computed for a specific
process variable using observations for the current BY group.
For example, in the following statements, there are two process
variables (WEIGHT and DIAMETER) and a BY variable (LOCATION).
If there are three different locations (levels of LOCATION), then
a total of six charts are produced.
The statistics in each inset are computed for a particular variable
The labels in the inset are the same for each chart.
proc shewhart data=axles;
xchart (weight diameter) * batch / tests=1 to 8;
inset ntests 1 to 8;
The components of the INSET and INSET2 statements are described as follows.
- can include any of the keywords listed in
"Summary of INSET Keywords".
Some keywords, such as NTESTS and DATA=, require operands
specified immediately after the keyword.
Also, some inset statistics are available only
if you request chart statements and options for which those
statistics are calculated.
- the NHIGH2, NLOW2, NTESTS2, LCL2 and UCL2 keywords are
available only when a secondary chart is produced with the
IRCHART, MRCHART, XRCHART or XSCHART statements.
- the NTESTS keyword requires the TESTS= option;
- the NTESTS2 keyword requires the TESTS2= option;
- the capability index keywords such as CPK all require
one or more of the LSL=, USL= and TARGET= options.
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 "Formatting Values and
Customizing Labels" 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 nmin nmax / 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.