Chapter Contents |
Previous |
Next |
NPCHART Statement |
See SHWNP3 in the SAS/QC Sample Library |
In some situations, a standard (known) value (p0) is available for the expected proportion of nonconforming items, based on extensive testing or previous sampling. This example illustrates how you can specify p0 to create an np chart.
An np chart is used to monitor the number of failing circuits in the data set CIRCUITS, which is introduced at "Creating np Charts from Count Data" . The expected proportion of failing circuits is known to be p0=0.02. The following statements create an np chart, shown in Output 37.2.1, using p0 to compute the control limits:
title1 'np Chart for Failing Circuits'; title2 'Using Data in CIRCUITS and Standard Value P0=0.02'; symbol v=none w=3; proc shewhart data=circuits; npchart fail*batch / subgroupn = 500 p0 = 0.02 npsymbol = np0 nolegend needles cneedles = yellow cframe = vibg cinfill = vlibg coutfill = salmon; label batch = 'Batch Number' fail = 'Fraction Failing'; run;
Alternatively, you can specify p0 using the variable _P_
in a LIMITS= data set, as follows:
data climits; length _var_ _subgrp_ _type_ $8; _p_ = 0.02; _subgrp_ = 'batch'; _var_ = 'fail'; _type_ = 'STANDARD'; _limitn_ = 500; proc shewhart data=circuits limits=climits; npchart fail*batch / subgroupn = 500 npsymbol = np0 nolegend needles; label batch ='Batch Number' fail ='Fraction Failing'; run;
The bookkeeping variable _TYPE_ indicates that _P_ has a standard value. The chart produced by these statements is identical to the chart in Output 37.2.1.
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.