Title: | Control Charts |
---|---|
Description: | Tools for creating and visualizing statistical process control charts. Control charts are used for monitoring measurement processes, such as those occurring in manufacturing. The objective is to monitor the history of such processes and flag outlying measurements: out-of-control signals. Montgomery, D. (2009, ISBN:978-0-470-16992-6) contains an extensive discussion of the methodology. |
Authors: | W.J. Braun |
Maintainer: | W.John Braun <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2025-02-14 03:24:30 UTC |
Source: | https://github.com/cran/CC |
The sample range R
is a biased estimator for the
population standard deviation. For a normally distributed sample of
size n
, R/d2(n)
is unbiased.
d_2(n)
d_2(n)
n |
the sample size |
a numeric value representing the multiplier to render R unbiased
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
x <- rnorm(10, sd = 3) R <- diff(range(x)) R/d_2(10) # expected value of this is 3
x <- rnorm(10, sd = 3) R <- diff(range(x)) R/d_2(10) # expected value of this is 3
The sample range R
is a biased estimator for the
population standard deviation of R. For a normally distributed sample of
size n
, d_3(n)R
is an unbiased estimator of the
standard deviation of R.
d_3(n)
d_3(n)
n |
the sample size |
a numeric value representing the multiplier to render R unbiased for the standard deviation of R
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
x <- rnorm(10, sd = 3) R <- diff(range(x)) d_3(10)*R # expected value of this is (V(R))^{1/2}
x <- rnorm(10, sd = 3) R <- diff(range(x)) d_3(10)*R # expected value of this is (V(R))^{1/2}
This function computes the length of the range of a sample.
diffrange(x)
diffrange(x)
x |
a numeric vector |
a numeric object
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
x <- rnorm(10) diffrange(x)
x <- rnorm(10) diffrange(x)
Trial limits for the Lowess-Range Chart, and an estimator of the process standard deviation. This chart is appropriate for subgroups of size 1.
LRCC(x, sigma, plotit = FALSE)
LRCC(x, sigma, plotit = FALSE)
x |
a numeric vector containing the process measurements |
sigma |
(optional) the standard deviation of the measurements |
plotit |
logical value indicating whether a plot should be produced |
an estimate of the standard deviation and a plot of the chart
W.J. Braun
Braun, W.J. (2002) The LR-chart: An Alternative to the MR-chart.
LRCC(rnorm(10))
LRCC(rnorm(10))
This function plots control charts of various types.
## S3 method for class 'CC' plot(x, start = 1, ...)
## S3 method for class 'CC' plot(x, start = 1, ...)
x |
Object of class "CC" |
start |
Index of first plotted point |
... |
Arguments to be passed to methods, such as graphical parameters (see 'par'). This method also accepts the argument 'start' which specifies the index of first plotted point, which is 1L by default. |
a plot of control charts for variability and location
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
This function computes control limits for R-charts, optionally revising them in the case that ranges plot out of the trial control limits.
RCC(R, n, k=3, sigma)
RCC(R, n, k=3, sigma)
R |
a numeric vector consisting of the subgroup ranges |
n |
the subgroup size |
k |
the control chart parameter governing the width of the control limits |
sigma |
(optional) an estimate of the in-control standard deviation |
a list consisting of the upper and lower control limits and the centerline
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
plot.CC
x <- matrix(rnorm(120, sd = 3), ncol=12) x.R <- xbarRCC(x) plot(x.R) x.R <- xbarRCC(x, newdata=rnorm(12)) plot(x.R)
x <- matrix(rnorm(120, sd = 3), ncol=12) x.R <- xbarRCC(x) plot(x.R) x.R <- xbarRCC(x, newdata=rnorm(12)) plot(x.R)
Daily averages and variances for 2 minute records of R wave-to-R wave (RR) intervals for a single male individual. Measurements were recorded during the summer of 2018.
data(rr)
data(rr)
A data frame with 76 observations on the following 2 variables.
Avg
Daily averages
Var
Daily variances
sapply(rr, mean)
sapply(rr, mean)
This function computes control limits for the x-charts for the mean and standard deviation (reciprocal) of R wave to R wave values for heart rate, optionally revising them in the case that individual sample means and/or ranges plot out of the trial control limits.
rrCC(RR, k=3, revise=TRUE, newdata)
rrCC(RR, k=3, revise=TRUE, newdata)
RR |
a data frame with 2 columns, the first containing rr averages and the second containing rr variances |
k |
the control chart parameter governing the width of the control limits |
revise |
if TRUE, mu and sigma are estimated using only range values that plot inside the trial control limits |
newdata |
a 2 column matrix consisting of data from new subgroups, with averages in the first column and variances in the second column |
an object of class "CC"
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
plot.CC
rr.xLR <- rrCC(rr) plot(rr.xLR)
rr.xLR <- rrCC(rr) plot(rr.xLR)
This function computes control limits for the xbar charts, optionally revising them in the case that individual sample means plot outside the trial control limits.
xbarCC(xbar, n, sigma, k, mu)
xbarCC(xbar, n, sigma, k, mu)
xbar |
a numeric vector consisting of the subgroup averages |
n |
the subgroup size |
k |
the control chart parameter governing the width of the control limits |
sigma |
an estimate of the in-control standard deviation |
mu |
(optional) an estimate of the in-control mean |
a list consisting of the upper and lower control limits and the centerline.
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
plot.CC
x <- matrix(rnorm(120, sd = 3), ncol=12) x.R <- xbarRCC(x) plot(x.R) x.R <- xbarRCC(x, newdata=rnorm(12)) plot(x.R)
x <- matrix(rnorm(120, sd = 3), ncol=12) x.R <- xbarRCC(x) plot(x.R) x.R <- xbarRCC(x, newdata=rnorm(12)) plot(x.R)
This function computes control limits for the xbar and R-charts, optionally revising them in the case that individual sample means and/or ranges plot out of the trial control limits.
xbarRCC(qc.obj, k=3, sigma, mu, revise=TRUE, newdata)
xbarRCC(qc.obj, k=3, sigma, mu, revise=TRUE, newdata)
qc.obj |
an object of class CC |
k |
the control chart parameter governing the width of the control limits |
sigma |
(optional) an estimate of the in-control standard deviation |
mu |
(optional) an estimate of the in-control mean |
revise |
if TRUE, mu and sigma are estimated using only range values that plot inside the trial control limits |
newdata |
an n-vector or matrix having n columns, consisting of data from new subgroups |
an object of class "CC"
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
plot.CC
x <- matrix(rnorm(120, sd = 3), ncol=12) x.R <- xbarRCC(x) plot(x.R)
x <- matrix(rnorm(120, sd = 3), ncol=12) x.R <- xbarRCC(x) plot(x.R)
This function computes control limits for the x-charts, optionally revising them in the case that individual values plot outside the trial control limits.
xCC(x, sigma, k = 3, mu, newdata)
xCC(x, sigma, k = 3, mu, newdata)
x |
a numeric vector consisting of the subgroup averages |
k |
the control chart parameter governing the width of the control limits |
sigma |
an estimate of the in-control standard deviation |
mu |
(optional) an estimate of the in-control mean |
newdata |
(optional) new observations |
a list consisting of the upper and lower control limits and the centerline.
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
plot.CC
This function computes control limits for the x and LR-charts, optionally revising them in the case that individual sample means and/or ranges plot out of the trial control limits.
xLRCC(qc.obj, k=3, sigma, mu, revise=TRUE, newdata)
xLRCC(qc.obj, k=3, sigma, mu, revise=TRUE, newdata)
qc.obj |
an object of class CC |
k |
the control chart parameter governing the width of the control limits |
sigma |
(optional) an estimate of the in-control standard deviation |
mu |
(optional) an estimate of the in-control mean |
revise |
if TRUE, mu and sigma are estimated using only range values that plot inside the trial control limits |
newdata |
an n-vector consisting of data from new subgroups |
an object of class "CC"
W.J. Braun
Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley
plot.CC
rr.xLR <- xLRCC(rr$Avg) plot(rr.xLR)
rr.xLR <- xLRCC(rr$Avg) plot(rr.xLR)