XCHART Statement: ANOM Procedure

Creating ANOM Charts for Means from Group Summary Data

Note: See Creating ANOM Charts for Means from Group Summary Data 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
;

A listing of Labels is shown in FigureĀ 4.23. 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).

Figure 4.23: 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';
proc anom summary=Labels;
   xchart Deviation*Position / odstitle=title1;
run;

The resulting chart is shown in FigureĀ 4.24.

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.

Figure 4.24: ANOM Chart for Means in Data Set Labels

ANOM Chart for Means in Data Set


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.