Syntax: INSET Statement |
The syntax for the INSET statement is as follows:
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.
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 the section Customizing Labels and Formatting Values.
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 the inset.
See the section 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.