Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
NPCHART Statement

Example 37.4: Specifying Control Limit Information

See SHWNP5 in the SAS/QC Sample Library

This example shows how to use the DATA step to create LIMITS= data sets for use with the NPCHART statement. The variables _VAR_ and _SUBGRP_ are required. These variables must be character variables of length 8, and their values must match the process and subgroup-variable specified in the NPCHART statement. In addition, you must provide one of the following:


The following DATA step creates a data set named CLIMITS1, which provides a complete set of control limits for an np chart:

   data climits1;
      length _var_ _subgrp_ _type_ $8;
      _var_    = 'fail';
      _subgrp_ = 'batch';
      _limitn_ = 500;
      _type_   = 'STANDARD';
      _lclnp_  =  0;
      _np_     = 10;
      _uclnp_  = 20;
   run;

The following statements read the control limits* from the data set CLIMITS1 and apply them to the count data in the data set CIRCUITS, which is introduced at "Creating np Charts from Count Data" :

   title 'Specifying Control Limit Information';
   symbol v=dot c=yellow;
   proc shewhart data=circuits limits=climits1;
      npchart fail*batch / subgroupn = 500
                           cframe    = vibg
                           cconnect  = yellow
                           coutfill  = salmon
                           cinfill   = vlibg;
   run;

The chart is shown in Output 37.4.1.

Output 37.4.1: Control Limit Information Read from CLIMITS1
npex4a.gif (6031 bytes)

The following DATA step creates a data set named CLIMITS2, which provides a value for the expected proportion of nonconforming items (_P_). This parameter is then used to compute the control limits for the data in CIRCUITS according to the equations at "Control Limits" .

   data climits2;
      length _var_ _subgrp_ _type_ $8;
      _var_    = 'fail';
      _subgrp_ = 'batch';
      _limitn_ = 500;
      _type_   = 'STANDARD';
      _p_      = .02;
   run;
   proc shewhart data=circuits limits=climits2;
      npchart fail*batch / subgroupn = 500
                           cframe    = vibg
                           cinfill   = vlibg
                           cconnect  = yellow
                           coutfill  = salmon;
   run;

The chart is shown in Output 37.4.2. Note that the control limits are not the same as those shown in Output 37.4.1.

Output 37.4.2: Control Limit Information Read from CLIMITS2
npex4b.gif (6080 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.