Learn R Programming

qcc (version 1.2)

oc.curves: Operating Characteristic Function

Description

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

Usage

oc.curves(object, ...)

oc.curves.xbar(object, n, c = seq(0, 5, 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 intercatively 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 th number of sigmas to use for computing control limits.
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.
...

Value

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

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.

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, 4th ed. New York: John Wiley & Sons. Wetherill, G.B. and Brown, D.W. (1991) Statistical Process Control. New York: Chapman & Hall.

See Also

qcc

Examples

Run this code
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
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
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
oc.curves(qcc(x[trial], sizes=size[trial], type="c", plot=FALSE), identify=TRUE)
detach(circuit)

Run the code above in your browser using DataLab