The syntax for the INSET statement is as follows:
INSET
keyword-list </ options> ;
You can use any number of INSET statements in the PARETO procedure. 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 statement. 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; run;
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 Pest
values.
proc pareto data=Plants; by Year; vbar (Tomato Squash) / class = (Fert Pest); inset n; run;
The components of the INSET statement are described as follows.