Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
NPCHART Statement

Creating np Charts from Count Data

See SHWNP1 in the SAS/QC Sample Library

An electronics company manufactures circuits in batches of 500 and uses an np chart to monitor the number of failing circuits. Thirty batches are examined, and the failures in each batch are counted. The following statements create a SAS data set named CIRCUITS,* which contains the failure counts:

   data circuits;
     input batch fail @@;
   datalines;
    1   5     2   6     3  11     4   6     5   4
    6   9     7  17     8  10     9  12    10   9
   11   8    12   7    13   7    14  15    15   8
   16  18    17  12    18  16    19   4    20   7
   21  17    22  12    23   8    24   7    25  15
   26   6    27   8    28  12    29   7    30   9
   ;

A listing of CIRCUITS is shown in Figure 37.1.

 
Number of Failing Circuits

batch fail
1 5
2 6
3 11
4 6
5 4
6 9
7 17
8 10
9 12
10 9
11 8
12 7
13 7
14 15
15 8
16 18
17 12
18 16
19 4
20 7
21 17
22 12
23 8
24 7
25 15
26 6
27 8
28 12
29 7
30 9
Figure 37.1: The Data Set CIRCUITS

There is a single observation for each batch. The variable BATCH identifies the subgroup sample and is referred to as the subgroup-variable. The variable FAIL contains the number of nonconforming items in each subgroup sample and is referred to as the process variable (or process for short).

The following statements create the np chart shown in Figure 37.2:

   title 'np Chart for the Number of Failing Circuits';
   symbol v=dot c=yellow;
   proc shewhart data=circuits;
      npchart fail*batch / subgroupn = 500
                           cframe    = vibg
                           cinfill   = vlibg
                           coutfill  = salmon
                           cconnect  = yellow;
   run;

This example illustrates the basic form of the NPCHART statement. After the keyword NPCHART, you specify the process to analyze (in this case, FAIL), followed by an asterisk and the subgroup-variable (BATCH).

The input data set is specified with the DATA= option in the PROC SHEWHART statement. The SUBGROUPN= option specifies the number of items in each subgroup sample and is required with a DATA= input data set. The SUBGROUPN= option specifies one of the following:


Options such as SUBGROUPN= are specified after the slash (/) in the NPCHART statement. A complete list of options is presented in the "Syntax" section.

npgs2.gif (6108 bytes)

Figure 37.2: An np Chart for Circuit Failures

Each point on the np chart represents the number of nonconforming items for a particular subgroup. For instance, the value plotted for the first batch is 5.

Since all the points fall within the control limits, it can be concluded that the process is in statistical control.

By default, the control limits shown are 3\sigmalimits estimated from the data; the formulas for the limits are given on "Control Limits" . You can also read control limits from an input data set; see "Reading Preestablished Control Limits" . For computational details, see "Constructing Charts for Number Nonconforming (np Charts)" . For more details on reading raw data, see "DATA= Data Set" .

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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