Shewhart Quality Control Limits

DESCRIPTION:

Compute the Shewhart quality control limits for xbar, s, R, p, np, c, and u charts.

USAGE:

limits.xbar(std.dev, center, sizes, conf) 
limits.s(std.dev, center, sizes, conf) 
limits.R(std.dev, center, sizes, conf) 
limits.p(std.dev, center, sizes, conf) 
limits.np(std.dev, center, sizes, conf) 
limits.c(std.dev, center, conf) 
limits.u(std.dev, center, sizes, conf) 

REQUIRED ARGUMENTS:

std.dev
a numeric value which is an estimate of the standard deviation of the population sampled. Used to estimate the standard errors of the group summary statistics. See help(qcc.sd) for more details.
center
a numeric value which is an estimate of the center of the group summary statistics. See help(qcc.stats) for more details.
sizes
vector of the number of observations in each group for xbar, s, and R charts. For p, np, and u charts, sizes corresponds to the number of units examined. For c charts, sizes is assumed to be 1 so is not included as an argument.
conf
a numeric value indicating the level of confidence for the control limits. If conf >= 1, it is taken to be the number of standard errors at which the control limits are to be placed from center. If 0 < conf < 1, it is used to produce probability limits with confidence level equal to 100*conf.

VALUE:

a matrix with the first column equal to the lower control limits and the second column equal to the upper control limits.

DETAILS:

These functions compute the control limits for Shewhart charts according to the type of chart indicated by the suffix of the function name. When conf >= 1, it specifies 1/2 the width of the control limits in standard errors of the group summary statistics being plotted. When 0 < conf < 1 exact probability limits are computed with a 100*conf confidence level. The tail probabilities are equal relative to the limitations of the distribution of the group summary statistics.

Assuming se.stats is a vector with the standard errors of the group summary statistics, the calculations for the upper and lower control limits (ucl and lcl) for each chart type follow. Probability limits are computed only if you specify 0 < conf < 1. Sigma limits are computed otherwise.

ARGUMENTS:

xbar
For 0 < conf < 1 the control limits are ucl <- center + qnorm(1 - (1 - conf)/2) * se.stats lcl <- center - qnorm(1 - (1 - conf)/2) * se.stats For conf >= 1 the control limits are ucl <- center + conf * se.stats lcl <- center - conf * se.stats
s
For 0 < conf < 1 the control limits are ucl <- std.dev * sqrt(qchisq(1 - (1 - conf)/2, sizes - 1)/(sizes - 1)) lcl <- std.dev * sqrt(qchisq((1 - conf)/2, sizes - 1)/(sizes - 1)) For conf >= 1 the control limits are lcl <- max(0, center - conf * se.stats) ucl <- center + conf * se.stats
R
For 0 < conf < 1 the control limits are ucl <- qnrange(1 - (1 - conf)/2, sizes - 1) lcl <- qnrange((1 - conf)/2, sizes - 1) For conf >= 1 the control limits are se.R <- se.R.unscaled[as.character(sizes)] * std.dev lcl <- center - conf * se.R ucl <- center + conf * se.R where se.R.unscaled is the exact standard error of the range for a sample of size sizes from a standard normal distribution. The table of values in se.R.unscaled is limited to group sizes of 50 or less.
p
For 0 < conf < 1 the control limits are ucl <- qbinom(1 - (1 - conf)/2, sizes, center)/sizes lcl <- qbinom((1 - conf)/2, sizes, center)/sizes For conf >= 1 the control limits are lcl <- (sin(asin(sqrt(center)) - conf * sqrt(1/(4 * sizes))))^2 lcl[lcl < 0] <- 0 ucl <- (sin(asin(sqrt(center)) + conf * sqrt(1/(4 * sizes))))^2 ucl[ucl > 1] <- 1
np
For 0 < conf < 1 the control limits are ucl <- qbinom(1 - (1 - conf)/2, sizes, pbar) lcl <- qbinom((1 - conf)/2, sizes, pbar) For conf >= 1 the control limits are lcl <- ((sin(asin(sqrt(pbar)) - conf * sqrt(1/(4 * sizes))))^2) * (sizes + 3/4) - 3/8 lcl[lcl < 0] <- 0 ucl <- ((sin(asin(sqrt(pbar)) + conf * sqrt(1/(4 * sizes))))^2) * (sizes + 3/4) - 3/8 pbar is the overall estimate of failure and is passed as an attribute of center.
c
For 0 < conf < 1 the control limits are ucl <- qpois(1 - (1 - conf)/2, center) lcl <- qpois((1 - conf)/2, center) For conf >= 1 the control limits are lcl <- center - conf * sqrt(center) lcl[lcl < 0] <- 0 ucl <- center + conf * sqrt(center)
u
If 0 < conf < 1 the conf is set to qnorm(1 - (1-conf)/2) and control limits are computed as for conf >= 1. For conf >= 1 the control limits are lcl <- center - conf * sqrt(center) lcl[lcl < 0] <- 0 ucl <- center + conf * sqrt(center)

These functions are important for computing the control limits for Shewhart control charts. It is not intended that they be used by themselves. You may write your own limits function and pass the name of your function to the limits argument of shewhart. You can use any of these limits functions as a template. Be sure to include either all four arguments or the ... argument, since shewhart will pass all four of these arguments in the call to your function.

SEE ALSO:

.