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 an inset and
must follow one of the plot statements
QQPLOT. The inset appears in all
displays produced by the plot
statement that immediately precedes it.
The statistics are displayed in the order
in which they are specified. For example, the following
statements produce a cumulative distribution plot with
two insets and a histogram with one inset:
proc capability data=wire;
inset mean std min max n;
inset p1 p5 p10;
inset var skewness kurtosis;
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 (STRENGTH and
and a BY variable (BATCH). If there are three different batches
(levels of BATCH), then a total of six histograms are
produced. The statistics in each inset
are computed for a particular variable and batch.
The labels in the inset are the same for each histogram.
proc capability data=wire2;
histogram strength diameter / normal;
inset mean std min max normal(mu sigma);
The components of the INSET statement are described as follows.
- can include any of the keywords listed in
"Summary of INSET Keywords".
Some keywords allow secondary keywords to be
specified in parentheses immediately after the primary
keyword. Also, some inset statistics are available only
if you request plot statements and options for which those
statistics are calculated. For example, consider the
proc capability data=wire;
histogram strength / normal;
inset mean std normal(ad adpval);
The keywords MEAN and STD display the sample mean and
standard deviation of STRENGTH. The primary keyword
NORMAL with the secondary keywords AD and ADPVAL
display the Anderson-Darling goodness-of-fit test statistic
and p-value in the inset as well. The statistics
specified with the NORMAL keyword are available only
because a normal distribution has been fit to the data
using the NORMAL option in the HISTOGRAM statement.
See the "Summary of INSET Keywords" section,
which follows, for a list of available keywords.
Typically, you specify keywords,
to display statistics computed by the CAPABILITY procedure.
you can also specify
the keyword DATA= followed by the name of a
SAS data set to
display customized statistics.
This data set must contain two variables:
a character variable named _LABEL_ whose values
provide labels for inset entries.
a variable named _VALUE_, which can be either
character or numeric, and whose values
provide values for inset entries.
The label and value from each observation in the
DATA= data set occupy one line in the inset.
The position of the DATA= keyword in the
keyword list determines the position of its lines in
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".
- 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 mean std min max / 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.