qcc(data, type, std.dev, sizes, labels=<<see below>>)
The argument type specifies the kind of control chart wanted. If type is a character string then it must be one of those in first column of the table below. The commonly used name for the corresponding chart is given in the second column. type common name ---- --------------------------- "xbar" x Bar s Chart "s" s Chart "R" R or Range Chart "p" p Chart for defectives "np" np Chart for defectives "u" u Chart for nonconformities "c" c Chart for nonconformities
Appropriate default functions are used to compute statistics, center and std.dev for each of the types above. These are specified in the following table. The names of the default functions that do the computation are formed by pasting together either "stats" (for statistics and center) or "sd" (for std.dev), a period, and the value of type. Thus the summary statistics and center of an xbar chart are computed by stats.xbar and the within group standard deviation is computed by sd.xbar. std.dev sample size type statistic is based on can be ------ -------------- --------------- ------------- "xbar" mean var. within equal/unequal "s" std dev within var. within equal/unequal "R" range var. within equal/unequal "p" prop. defective prop. defective equal/unequal "np" num. defective prop. defective equal/unequal "c" nonconformities nonconformities equal (1) "u" nonconformities nonconformities equal/unequal For more information on the built-in functions for computing group summary statistics and the within group standard deviation see the help files for the appropriate functions. For example, to get information on how group summary statistics and the within group standard deviation are computed for the xbar chart, see help(stats.xbar) and help(sd.xbar), respectively.
If type is a function name then it must return a list with two components named statistics and center which correspond to the components of the return value with the same name. In this case, std.dev must also be given.
std.dev may be given as a numeric vector or function. If std.dev is a function, it is assumed to return an estimate of the within group standard deviation suitable for computing the control limits or decision boundaries of the charts produced by shewhart or cusum. If you specify your own function for the std.dev argument you may not give summary statistics as data for the "xbar", "s", or "R" charts.
Ryan, T. P. (1989). Statistical Methods For Quality Improvement. New York: John Wiley & Sons.
Wetherill, G. B. and Brown, D. W. (1991). Statistical Process Control. New York: Chapman and Hall.
qcc(matrix(rnorm(100), ncol = 5), type = "xbar")