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 SHEWHART procedure. However, when ODS Graphics is enabled, at
most two insets are displayed inside the primary and secondary plot areas, and at most two are displayed in the chart margins.
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 Diameter * Batch / lsl=34.9 target=35 usl=35.1; inset lsl target usl; inset cp cpk cpm; xrchart Diameter * Batch; inset nmin nmax nout; inset2 nlow2 nhigh2; run;
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 and location. The labels in the
inset are the same for each
chart.
proc shewhart data=Axles; by Location; xchart (Weight Diameter) * Batch / tests=1 to 8; inset ntests 1 to 8; run;
The components of the INSET and INSET2 statements are described as follows.