Previous Page | Next Page

The ANOM Procedure

Creating ANOM Charts for Means from Group Summary Data

[See ANMXGRP in the SAS/QC Sample Library]The previous example illustrates how you can create ANOM charts for means using measurement data. However, in many applications, the data are provided as group summary statistics. This example illustrates how you can use the XCHART statement with data of this type.

The following data set (Labels) provides the data from the preceding example in summarized form:

data Labels;
   input Position DeviationX DeviationS;
   DeviationN = 10;
   datalines;
1  -0.02234  0.02281
2   0.01624  0.03348
3   0.00601  0.02885
4   0.06473  0.02149
5   0.00812  0.02592
6  -0.01281  0.01597
run;

A listing of Labels is shown in Figure 4.3.4. There is exactly one observation for each group (note that the groups are still indexed by Position). The variable DeviationX contains the group means, the variable DeviationS contains the group standard deviations, and the variable DeviationN contains the group sample sizes (these are all 10).

Output 4.3.4 The Summary Data Set Labels
The Data Set Labels

Position DeviationX DeviationS DeviationN
1 -0.02234 0.02281 10
2 0.01624 0.03348 10
3 0.00601 0.02885 10
4 0.06473 0.02149 10
5 0.00812 0.02592 10
6 -0.01281 0.01597 10

You can read this data set by specifying it as a SUMMARY= data set in the PROC ANOM statement, as follows:

title 'Analysis of Label Deviations';
ods graphics on;
proc anom summary=Labels;
   xchart Deviation*Position / odstitle=title1;
run;
ods graphics off;

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

Note that Deviation is not the name of a SAS variable in the data set but is, instead, the common prefix for the names of the three SAS variables DeviationX, DeviationS, and DeviationN. The suffix characters X, S, and N indicate mean, standard deviation, and sample size, respectively. Thus, you can specify three group summary variables in a SUMMARY= data set with a single name (Deviation), which is referred to as the response. The name Position specified after the asterisk is the name of the group-variable.

Output 4.3.5 ANOM Chart for Means in Data Set Labels
ANOM Chart for Means in Data Set Labels

In general, a SUMMARY= input data set used with the XCHART statement must contain the following variables:

  • group variable

  • group mean variable

  • group standard deviation variable

  • group sample size variable

Furthermore, the names of the group mean, standard deviation, and sample size variables must begin with the response name specified in the XCHART statement and end with the special suffix characters X, S, and N, respectively. If the names do not follow this convention, you can use the RENAME option in the PROC ANOM statement to rename the variables for the duration of the ANOM procedure step. If a label is associated with the group mean variable, it is used to label the vertical axis.

In summary, the interpretation of response depends on the input data set.

  • If raw data are read using the DATA= option (as in the previous example), response is the name of the SAS variable containing the response measurements.

  • If summary data are read using the SUMMARY= option (as in this example), response is the common prefix for the names of the variables containing the summary statistics.

For more information, see the section SUMMARY= Data Set.

Previous Page | Next Page | Top of Page