oc.curves: Operating Characteristic Function

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/qcc.R

Description

Draws the operating characteristic curves for a 'qcc' object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
oc.curves(object, ...)

oc.curves.xbar(object, n, c = seq(0, 5, length=101), 
               nsigmas = object$nsigmas, identify=FALSE, restore.par=TRUE)

oc.curves.R(object, n, c = seq(1, 6, length=101),
            nsigmas = object$nsigmas, identify = FALSE, restore.par=TRUE)

oc.curves.S(object, n, c = seq(1, 6, length=101),
            nsigmas = object$nsigmas, identify = FALSE, restore.par=TRUE)

oc.curves.p(object, nsigmas = object$nsigmas, identify = FALSE, restore.par=TRUE)

oc.curves.c(object, nsigmas = object$nsigmas, identify = FALSE, restore.par=TRUE)

Arguments

object

an object of class 'qcc'.

identify

logical specifying whether to interactively identify points on the plot (see help for identify).

n

a vector of values specifying the sample sizes for which to draw the OC curves.

c

a vector of values specifying the multipliers for sigma in case of continuous variable.

nsigmas

a numeric value specifying the number of sigmas to use for computing control limits; if nsigmas is NULL, object$conf is used to set up probability limits; nsigmas is ignored for types "p" and "c".

restore.par

a logical value indicating whether the previous par settings must be restored. If you need to add points, lines, etc. to a chart set this to FALSE.

...

additional arguments to be passed to the generic function.

Details

An operating characteristic curve graphically provides information about the probability of not detecting a shift in the process. oc.curves is a generic function which calls the proper function depending on the type of 'qcc' object. Further arguments provided through ... are passed to the specific function depending on the type of chart.

The probabilities are based on the conventional assumptions about process distributions: the normal distribution for "xbar" , "R", and "S", the binomial distribution for "p" and "np", and the Poisson distribution for "c" and "u". They are all sensitive to departures from those assumptions, but to varying degrees. The performance of the "S" chart, and especially the "R" chart, are likely to be seriously affected by longer tails.

Value

The function invisibly returns a matrix or a vector of beta values, the probability of type II error.

Author(s)

Luca Scrucca

References

Mason, R.L. and Young, J.C. (2002) Multivariate Statistical Process Control with Industrial Applications, SIAM.
Montgomery, D.C. (2005) Introduction to Statistical Quality Control, 5th ed. New York: John Wiley & Sons.
Ryan, T. P. (2000), Statistical Methods for Quality Improvement, 2nd ed. New York: John Wiley & Sons, Inc.
Scrucca, L. (2004). qcc: an R package for quality control charting and statistical process control. R News 4/1, 11-17.
Wetherill, G.B. and Brown, D.W. (1991) Statistical Process Control. New York: Chapman & Hall.

See Also

qcc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
data(pistonrings)
attach(pistonrings)
diameter <- qcc.groups(diameter, sample)
beta <- oc.curves.xbar(qcc(diameter, type="xbar", nsigmas=3, plot=FALSE))
print(round(beta, digits=4))
# or to identify points on the plot use
## Not run: oc.curves.xbar(qcc(diameter, type="xbar", nsigmas=3, plot=FALSE), identify=TRUE)
detach(pistonrings)

data(orangejuice)
attach(orangejuice)
beta <- oc.curves(qcc(D[trial], sizes=size[trial], type="p", plot=FALSE))
print(round(beta, digits=4))
# or to identify points on the plot use
## Not run: oc.curves(qcc(D[trial], sizes=size[trial], type="p", plot=FALSE), identify=TRUE)
detach(orangejuice)

data(circuit)
attach(circuit)
q <- qcc(x[trial], sizes=size[trial], type="c", plot=FALSE)
beta <- oc.curves(q)
print(round(beta, digits=4))
# or to identify points on the plot use
## Not run: oc.curves(qcc(x[trial], sizes=size[trial], type="c", plot=FALSE), identify=TRUE)
detach(circuit)

Example output

Package 'qcc' version 2.7
Type 'citation("qcc")' for citing this R package in publications.
               sample size
shift (std.dev)    n=5    n=1   n=10   n=15   n=20
           0    0.9973 0.9973 0.9973 0.9973 0.9973
           0.05 0.9971 0.9973 0.9970 0.9968 0.9966
           0.1  0.9966 0.9972 0.9959 0.9952 0.9944
           0.15 0.9957 0.9970 0.9940 0.9920 0.9900
           0.2  0.9944 0.9968 0.9909 0.9869 0.9823
           0.25 0.9925 0.9964 0.9864 0.9789 0.9701
           0.3  0.9900 0.9960 0.9798 0.9670 0.9514
           0.35 0.9866 0.9956 0.9708 0.9500 0.9243
           0.4  0.9823 0.9950 0.9586 0.9266 0.8871
           0.45 0.9769 0.9943 0.9426 0.8957 0.8383
           0.5  0.9701 0.9936 0.9220 0.8562 0.7775
           0.55 0.9616 0.9927 0.8963 0.8078 0.7055
           0.6  0.9514 0.9916 0.8649 0.7505 0.6243
           0.65 0.9390 0.9905 0.8275 0.6853 0.5371
           0.7  0.9243 0.9892 0.7842 0.6137 0.4481
           0.75 0.9071 0.9877 0.7351 0.5379 0.3616
           0.8  0.8871 0.9860 0.6809 0.4608 0.2817
           0.85 0.8642 0.9842 0.6225 0.3851 0.2115
           0.9  0.8383 0.9821 0.5612 0.3136 0.1527
           0.95 0.8094 0.9798 0.4983 0.2485 0.1059
           1    0.7775 0.9772 0.4355 0.1913 0.0705
           1.05 0.7428 0.9744 0.3743 0.1431 0.0450
           1.1  0.7055 0.9713 0.3161 0.1038 0.0275
           1.15 0.6659 0.9678 0.2622 0.0730 0.0161
           1.2  0.6243 0.9641 0.2134 0.0497 0.0090
           1.25 0.5812 0.9599 0.1703 0.0328 0.0048
           1.3  0.5371 0.9554 0.1333 0.0209 0.0024
           1.35 0.4925 0.9505 0.1022 0.0129 0.0012
           1.4  0.4481 0.9452 0.0768 0.0077 0.0006
           1.45 0.4043 0.9394 0.0564 0.0045 0.0002
           1.5  0.3616 0.9332 0.0406 0.0025 0.0001
           1.55 0.3206 0.9265 0.0286 0.0013 0.0000
           1.6  0.2817 0.9192 0.0197 0.0007 0.0000
           1.65 0.2453 0.9115 0.0133 0.0003 0.0000
           1.7  0.2115 0.9032 0.0088 0.0002 0.0000
           1.75 0.1806 0.8943 0.0056 0.0001 0.0000
           1.8  0.1527 0.8849 0.0036 0.0000 0.0000
           1.85 0.1278 0.8749 0.0022 0.0000 0.0000
           1.9  0.1059 0.8643 0.0013 0.0000 0.0000
           1.95 0.0869 0.8531 0.0008 0.0000 0.0000
           2    0.0705 0.8413 0.0004 0.0000 0.0000
           2.05 0.0566 0.8289 0.0002 0.0000 0.0000
           2.1  0.0450 0.8159 0.0001 0.0000 0.0000
           2.15 0.0353 0.8023 0.0001 0.0000 0.0000
           2.2  0.0275 0.7881 0.0000 0.0000 0.0000
           2.25 0.0211 0.7734 0.0000 0.0000 0.0000
           2.3  0.0161 0.7580 0.0000 0.0000 0.0000
           2.35 0.0121 0.7422 0.0000 0.0000 0.0000
           2.4  0.0090 0.7257 0.0000 0.0000 0.0000
           2.45 0.0066 0.7088 0.0000 0.0000 0.0000
           2.5  0.0048 0.6915 0.0000 0.0000 0.0000
           2.55 0.0034 0.6736 0.0000 0.0000 0.0000
           2.6  0.0024 0.6554 0.0000 0.0000 0.0000
           2.65 0.0017 0.6368 0.0000 0.0000 0.0000
           2.7  0.0012 0.6179 0.0000 0.0000 0.0000
           2.75 0.0008 0.5987 0.0000 0.0000 0.0000
           2.8  0.0006 0.5793 0.0000 0.0000 0.0000
           2.85 0.0004 0.5596 0.0000 0.0000 0.0000
           2.9  0.0002 0.5398 0.0000 0.0000 0.0000
           2.95 0.0002 0.5199 0.0000 0.0000 0.0000
           3    0.0001 0.5000 0.0000 0.0000 0.0000
           3.05 0.0001 0.4801 0.0000 0.0000 0.0000
           3.1  0.0000 0.4602 0.0000 0.0000 0.0000
           3.15 0.0000 0.4404 0.0000 0.0000 0.0000
           3.2  0.0000 0.4207 0.0000 0.0000 0.0000
           3.25 0.0000 0.4013 0.0000 0.0000 0.0000
           3.3  0.0000 0.3821 0.0000 0.0000 0.0000
           3.35 0.0000 0.3632 0.0000 0.0000 0.0000
           3.4  0.0000 0.3446 0.0000 0.0000 0.0000
           3.45 0.0000 0.3264 0.0000 0.0000 0.0000
           3.5  0.0000 0.3085 0.0000 0.0000 0.0000
           3.55 0.0000 0.2912 0.0000 0.0000 0.0000
           3.6  0.0000 0.2743 0.0000 0.0000 0.0000
           3.65 0.0000 0.2578 0.0000 0.0000 0.0000
           3.7  0.0000 0.2420 0.0000 0.0000 0.0000
           3.75 0.0000 0.2266 0.0000 0.0000 0.0000
           3.8  0.0000 0.2119 0.0000 0.0000 0.0000
           3.85 0.0000 0.1977 0.0000 0.0000 0.0000
           3.9  0.0000 0.1841 0.0000 0.0000 0.0000
           3.95 0.0000 0.1711 0.0000 0.0000 0.0000
           4    0.0000 0.1587 0.0000 0.0000 0.0000
           4.05 0.0000 0.1469 0.0000 0.0000 0.0000
           4.1  0.0000 0.1357 0.0000 0.0000 0.0000
           4.15 0.0000 0.1251 0.0000 0.0000 0.0000
           4.2  0.0000 0.1151 0.0000 0.0000 0.0000
           4.25 0.0000 0.1056 0.0000 0.0000 0.0000
           4.3  0.0000 0.0968 0.0000 0.0000 0.0000
           4.35 0.0000 0.0885 0.0000 0.0000 0.0000
           4.4  0.0000 0.0808 0.0000 0.0000 0.0000
           4.45 0.0000 0.0735 0.0000 0.0000 0.0000
           4.5  0.0000 0.0668 0.0000 0.0000 0.0000
           4.55 0.0000 0.0606 0.0000 0.0000 0.0000
           4.6  0.0000 0.0548 0.0000 0.0000 0.0000
           4.65 0.0000 0.0495 0.0000 0.0000 0.0000
           4.7  0.0000 0.0446 0.0000 0.0000 0.0000
           4.75 0.0000 0.0401 0.0000 0.0000 0.0000
           4.8  0.0000 0.0359 0.0000 0.0000 0.0000
           4.85 0.0000 0.0322 0.0000 0.0000 0.0000
           4.9  0.0000 0.0287 0.0000 0.0000 0.0000
           4.95 0.0000 0.0256 0.0000 0.0000 0.0000
           5    0.0000 0.0228 0.0000 0.0000 0.0000
Warning message:
In oc.curves.p(object, ...) :
  Some computed values for the type II error have been rounded due to the discreteness of the binomial distribution. Thus, some ARL values might be meaningless.
     0   0.01   0.02   0.03   0.04   0.05   0.06   0.07   0.08   0.09    0.1 
0.0000 0.0894 0.2642 0.4447 0.5995 0.7206 0.8100 0.8735 0.9173 0.9468 0.9662 
  0.11   0.12   0.13   0.14   0.15   0.16   0.17   0.18   0.19    0.2   0.21 
0.9788 0.9869 0.9920 0.9951 0.9971 0.9983 0.9990 0.9993 0.9995 0.9995 0.9993 
  0.22   0.23   0.24   0.25   0.26   0.27   0.28   0.29    0.3   0.31   0.32 
0.9987 0.9978 0.9962 0.9937 0.9900 0.9845 0.9768 0.9662 0.9522 0.9343 0.9118 
  0.33   0.34   0.35   0.36   0.37   0.38   0.39    0.4   0.41   0.42   0.43 
0.8844 0.8518 0.8139 0.7711 0.7236 0.6722 0.6176 0.5610 0.5035 0.4461 0.3901 
  0.44   0.45   0.46   0.47   0.48   0.49    0.5   0.51   0.52   0.53   0.54 
0.3365 0.2862 0.2398 0.1980 0.1609 0.1287 0.1013 0.0784 0.0596 0.0446 0.0327 
  0.55   0.56   0.57   0.58   0.59    0.6   0.61   0.62   0.63   0.64   0.65 
0.0235 0.0166 0.0115 0.0078 0.0052 0.0034 0.0021 0.0013 0.0008 0.0005 0.0003 
  0.66   0.67   0.68   0.69    0.7   0.71   0.72   0.73   0.74   0.75   0.76 
0.0002 0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 
  0.77   0.78   0.79    0.8   0.81   0.82   0.83   0.84   0.85   0.86   0.87 
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 
  0.88   0.89    0.9   0.91   0.92   0.93   0.94   0.95   0.96   0.97   0.98 
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 
  0.99      1 
0.0000 0.0000 
Warning message:
In oc.curves.c(object, ...) :
  Some computed values for the type II error have been rounded due to the discreteness of the Poisson distribution. Thus, some ARL values might be meaningless.
     0      1      2      3      4      5      6      7      8      9     10 
0.0000 0.0006 0.0166 0.0839 0.2149 0.3840 0.5543 0.6993 0.8088 0.8843 0.9329 
    11     12     13     14     15     16     17     18     19     20     21 
0.9625 0.9797 0.9893 0.9945 0.9972 0.9986 0.9991 0.9992 0.9986 0.9972 0.9945 
    22     23     24     25     26     27     28     29     30     31     32 
0.9895 0.9813 0.9686 0.9502 0.9249 0.8918 0.8505 0.8011 0.7444 0.6818 0.6150 
    33     34     35     36     37     38     39     40     41     42     43 
0.5461 0.4772 0.4102 0.3470 0.2888 0.2365 0.1907 0.1514 0.1184 0.0912 0.0693 
    44     45     46     47     48     49     50     51     52     53     54 
0.0519 0.0383 0.0280 0.0201 0.0143 0.0101 0.0070 0.0048 0.0033 0.0022 0.0015 
    55     56     57     58     59     60     61     62     63     64     65 
0.0010 0.0006 0.0004 0.0003 0.0002 0.0001 0.0001 0.0000 0.0000 0.0000 0.0000 

qcc documentation built on May 2, 2019, 9:15 a.m.