Resources

Combined ANOM Charts for Two Factors

 /********************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                     */
 /*                                                                  */
 /*    NAME: ANMEX3                                                  */
 /*   TITLE: Combined ANOM Charts for Two Factors                    */
 /* PRODUCT: QC                                                      */
 /*  SYSTEM: ALL                                                     */
 /*    KEYS: ANOM Charts, Means Charts, XCHART, Combined, Two Factor */
 /*   PROCS: ANOM                                                    */
 /*    DATA:                                                         */
 /*                                                                  */
 /*     REF: SAS/QC Software:  The ANOM Procedure                    */
 /*                                                                  */
 /********************************************************************/

 options nodate nostimer nonumber source2 ls=76 ps=80;


 /****************************************************************/

/*** Combined ANOM Charts for Two Factors ********/

data cleaning;
   do position = 1 to 5;
      do depth = 1 to 3;
         do rep = 1 to 2;
            input concentration @@;
            output;
         end;
      end;
   end;
   datalines;
   15 16 15 14 19 5
   15 16 14 14 0  8
   19 15 16 16 11 8
   18 16 19 15 8  14
   15 12 19 15 8  11
   ;
run;


/*** Creating Data Set PosMain ********/

   proc anom data=cleaning;
      xchart concentration * position / mse      = 12.6
                                        dfe      = 15
                                        outtable = posmain
                                        nochart;

   run;


/*** Creating Data Set DepMain ********/

proc sort data=cleaning;
   by depth;
run;

      proc anom data=cleaning;
      xchart concentration * depth / mse      = 12.6
                                     dfe      = 15
                                     outtable = depmain
                                     nochart;
   run;

/*** Creating Data Set Combined ********/

   data posmain; set posmain;
      length group factor $8;
      group  = position;
      factor = 'Position';
   data depmain; set depmain;
      length group factor $8;
      group  = depth;
      factor = 'Depth';
   data combined;
      set posmain depmain;
   run;

/** Printing Data Sets PosMain and DepMain **/

   proc print data=combined noobs;
   run;


/** Creating Combined ANOM Charts for Two Factors Using PosMain and DepMain **/

   title "ANOM for Effect of Group";
   proc anom table=combined;
      xchart concentration * group (factor) / BLOCKPOS = 3;
      label group  = 'Group'
            _SUBX_ = 'Mean of Concentration';
   run;

 /****************************************************************/


 goptions reset=all;