Note: See ANOM Charts Using LIMITS= Data Set in the SAS/QC Sample Library.
In Example 4.5, statistics from a two-way ANOVA were passed to the ANOM procedure using options in order to compute the decision limits for the factor effects. This example shows how you can pass the statistics in a LIMITS= data set using the variables _MSE_ and _DFE_.
The GLM output in Output 4.5.1 provides the statistics. The following statements save the results from PROC GLM in the data sets MyFit
, MyMeans
, and MyOverAll
:
ods select FitStatistics ModelANOVA OverAllANOVA; ods output FitStatistics = MyFit ModelANOVA = MyLimits OverAllANOVA = MyOverAll; proc glm data=Cleaning; class position depth; model concentration = position depth position*depth; run;
The results of PROC GLM are identical to the results in Output 4.5.1.
The following statements create a LIMITS= data set to be used to create an ANOM chart for the effect of Position
:
data ANOMParms; keep _var_ _group_ _alpha_ _mean_; length _var_ _group_ $ 14; set MyFit (rename=(Dependent=_var_ DepMean =_mean_)); _group_ = 'position'; _alpha_ = 0.05; run; data ANOMParms; merge ANOMParms MyLimits (where=(source='position') keep = source DF); _limitk_ = DF+1; drop source DF; merge MyOverAll (where=(source='Error') keep = source df ms rename=( df = _dfe_ ms = _mse_)); drop source; merge MyOverAll (where=(source='Corrected Total') keep = source DF); _limitn_ = (DF+1)/_limitk_; drop source DF; run;
The data set ANOMParms
contains a complete set of parameters, as shown in Output 4.6.1. Note these are the same values specified in the options for Example 4.5.
Output 4.6.1: Data Set ANOMParms
The following statements read the parameters in ANOMParms
to create an ANOM chart for the effect of position
:
ods graphics on; title "ANOM for Effect of Position"; proc anom data=Cleaning limits=ANOMParms; xchart concentration * position / outtable = postable odstitle = title; label position = 'Position' concentration = 'Mean of Concentration'; run;
The chart produced is identical to the one in Output 4.5.2. Note that the procedure creates a TABLE= input data set postable
. You can use postable
to create a combined chart for the two factors position
and depth
.
You can create a LIMITS= data set ANOMParmsB
for the factor depth
by using the above code and substituting 'depth' for the _group_
variable. You can use the OUTTABLE= statement to store the TABLE= input data set for depth
as deptable
. The resulting data set ANOMParmsB
is shown in Output 4.6.2:
Output 4.6.2: Data Set ANOMParmsB