Previous Page | Next Page

The ANOM Procedure

Formatting Values and Customizing Labels

[See ANMIN2 in the SAS/QC Sample Library]By default, each inset statistic is identified with an appropriate label, and each numeric value is printed using an appropriate format. However, you may want to provide your own labels and formats. For example, in Figure 4.7.4 the default format used for the MSE prints an excessive number of decimal places. In the inset produced by the following statements, the unwanted decimal places are eliminated and the default MSE label is replaced by one specified by the user:

ods graphics on;
title 'ANOM Chart for Label Deviations';
proc anom data=LabelDeviations;
   xchart Deviation*Position / odstitle=title;
   inset mse='Mean Square Error' (7.5) nout;
run;
ods graphics off;

The ODS GRAPHICS ON statement specified before the PROC ANOM statement enables ODS Graphics, so the chart is created using ODS Graphics instead of traditional graphics.

The resulting ANOM chart is displayed in Figure 4.7.5. You can provide your own label by specifying the keyword for that statistic followed by an equal sign (=) and the label in quotes. The label can have up to 24 characters.

The format 7.5 specified in parentheses after the MSE keyword displays the statistic with a field width of seven and five decimal places. In general, you can specify any numeric SAS format in parentheses after an inset keyword. You can also specify a format to be used for all the statistics in the INSET statement with the FORMAT= option (see Figure 4.7.6). For more information about SAS formats, refer to SAS Language Reference: Dictionary.

Note that if you specify both a label and a format for a statistic, the label must appear before the format.

Output 4.7.5 Formatting Values and Customizing Labels in an Inset
Formatting Values and Customizing Labels in an Inset

Previous Page | Next Page | Top of Page