Package 'CC'

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

Help Index


range factors

Description

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.

Usage

d_2(n)

Arguments

n

the sample size

Value

a numeric value representing the multiplier to render R unbiased

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

d_3

Examples

x <- rnorm(10, sd = 3)
R <- diff(range(x))
R/d_2(10)   # expected value of this is 3

range factors

Description

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.

Usage

d_3(n)

Arguments

n

the sample size

Value

a numeric value representing the multiplier to render R unbiased for the standard deviation of R

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

d_2

Examples

x <- rnorm(10, sd = 3)
R <- diff(range(x))
d_3(10)*R   # expected value of this is (V(R))^{1/2}

difference of range

Description

This function computes the length of the range of a sample.

Usage

diffrange(x)

Arguments

x

a numeric vector

Value

a numeric object

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

RCC, xbarRCC

Examples

x <- rnorm(10)
diffrange(x)

Lowess-Range-Chart

Description

Trial limits for the Lowess-Range Chart, and an estimator of the process standard deviation. This chart is appropriate for subgroups of size 1.

Usage

LRCC(x, sigma, plotit = FALSE)

Arguments

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

Value

an estimate of the standard deviation and a plot of the chart

Author(s)

W.J. Braun

References

Braun, W.J. (2002) The LR-chart: An Alternative to the MR-chart.

See Also

xbarRCC

Examples

LRCC(rnorm(10))

Plot Shewhart Control Charts

Description

This function plots control charts of various types.

Usage

## S3 method for class 'CC'
plot(x, start = 1, ...)

Arguments

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.

Value

a plot of control charts for variability and location

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley


R Chart Parameters

Description

This function computes control limits for R-charts, optionally revising them in the case that ranges plot out of the trial control limits.

Usage

RCC(R, n, k=3, sigma)

Arguments

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

Value

a list consisting of the upper and lower control limits and the centerline

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

plot.CC

Examples

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)

Baseline Heart Rate Summaries

Description

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.

Usage

data(rr)

Format

A data frame with 76 observations on the following 2 variables.

Avg

Daily averages

Var

Daily variances

Examples

sapply(rr, mean)

Individuals Charts Parameters for Baseline RR Mean and Variability

Description

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.

Usage

rrCC(RR, k=3, revise=TRUE, newdata)

Arguments

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

Value

an object of class "CC"

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

plot.CC

Examples

rr.xLR <- rrCC(rr)
plot(rr.xLR)

xbar Chart Parameters

Description

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.

Usage

xbarCC(xbar, n, sigma, k, mu)

Arguments

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

Value

a list consisting of the upper and lower control limits and the centerline.

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

plot.CC

Examples

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)

Computing xbar and R-chart Parameters

Description

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.

Usage

xbarRCC(qc.obj, k=3, sigma, mu, revise=TRUE, newdata)

Arguments

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

Value

an object of class "CC"

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

plot.CC

Examples

x <- matrix(rnorm(120, sd = 3), ncol=12)
x.R <- xbarRCC(x)
plot(x.R)

x-Chart Parameters

Description

This function computes control limits for the x-charts, optionally revising them in the case that individual values plot outside the trial control limits.

Usage

xCC(x, sigma, k = 3, mu, newdata)

Arguments

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

Value

a list consisting of the upper and lower control limits and the centerline.

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

plot.CC


Computing x and LR-chart Parameters

Description

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.

Usage

xLRCC(qc.obj, k=3, sigma, mu, revise=TRUE, newdata)

Arguments

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

Value

an object of class "CC"

Author(s)

W.J. Braun

References

Montgomery, D.C. (2000) Introduction to Statistical Quality Control, Wiley

See Also

plot.CC

Examples

rr.xLR <- xLRCC(rr$Avg)
plot(rr.xLR)