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)
help(qcc.sd) for more details.
help(qcc.stats) for more details.
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 >= 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.
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.
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
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
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.
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
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.
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)
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)
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.