Description Usage Arguments Details Note Author(s) References See Also Examples

Calculates the process capability cp, cpk, cpkL (onesided) and cpkU (onesided) for a given dataset and distribution.

A histogramm with a density curve is displayed along with the specification limits and a Quantile-Quantile Plot for the specified distribution.

Lower-, upper and total fraction of nonconforming entities are calculated. Box Cox Transformations are supported as well as the calculation of Anderson Darling Test Statistics.

1 2 3 4 5 6 | ```
cp(x, distribution = "normal", lsl, usl, target, boxcox = FALSE,
lambda = c(-5,5), main, xlim, ylim, grouping = NULL, std.dev = NULL,
conf.level = 0.9973002, start, lineWidth = 1, lineCol = "red",
lineType = "solid", specCol = "red3", specWidth = 1, cex.text = 2,
cex.val = 1.5, cex.col = "darkgray", plot = TRUE, bounds.lty = 3,
bounds.col = "red", ...)
``` |

`x` |
numeric vector containing the values for which the process capability should be calculated. |

`distribution` |
character string specifying the distribution of x. The function -
“normal” -
“log-normal” -
“exponential” -
“logistic” -
“gamma” -
“weibull” -
“cauchy” -
“beta” -
“f” -
“t” -
“geometric” -
“poisson” -
“negative-binomial”
By default |

`lsl` |
numeric value for the lower specification limit. |

`usl` |
numeric value for the upper specification limit. |

`target` |
(optional) numeric value giving the target value. |

`boxcox` |
logical value specifying whether a Box-Cox transformation should be performed or not. |

`lambda` |
(optional) lambda for the transformation, default is to have the function estimate lambda. |

`main` |
an overall title for the plot: see |

`xlim` |
vector giving the range of the x-axis. |

`ylim` |
vector giving the range of the y-axis. |

`grouping` |
(optional) If grouping is given the standard deviation is calculated as mean standard deviation of the specified subgroups corrected by the factor c4 and expected fraction of nonconforming is calculated using this standard deviation. |

`std.dev` |
(optional) historical standard devation (only provided for normal distribution!). |

`conf.level` |
numeric value between ‘0’ and ‘1’ giving the confidence interval. |

`start` |
a named list giving the parameters to be fitted with initial values. Must be supplied for some distribution (see |

`lineWidth` |
a numeric value specifying the width of the line for the density curve. |

`lineCol` |
numerical value or character string (like “red”) specifying the color of the line for the density curve. |

`lineType` |
character string specifying the line type e.g. “dashed”, “solid”, etc. |

`specCol` |
numerical value or character string specifying the color for the specification limits. |

`specWidth` |
numerical value specifying the line width for the specification limits. |

`cex.text` |
numerical value specifying the cex for lsl, usl and target. |

`cex.val` |
numerical value specifying the cex for the process capability ratios. |

`cex.col` |
numerical value or character string specifying the color for lsl, usl and target. |

`bounds.col` |
graphical parameter. For further details see |

`bounds.lty` |
graphical parameter. For further details see |

`plot` |
logical value. If set to ‘FALSE’ the graphical output will be omitted.\
By default |

`...` |
some other graphical parameters. |

Distribution fitting is deligated to function `fitdistr`

of the R-package `MASS`

as well as the calculation of lambda for the Box Cox Transformation. p-values for Anderson Darling Test are reported for the most important distributions.

cpk is always min(cpK, cpL).

pt stands for total fraction nonconforming

pu stands for upper fraction nonconforming

pl stands for lower fraction nonconforming

cp stands for process capability index

cpkL stands for lower process capability index

cpkU stands for upper process capability index

cpk stands for minimum process capability index

At this point there's no distinction made between process performance P_pk and process capability.

The latter implies a process that is in statistical contro whereas process performance is estimated for a process that might not have been demonstrated to be in a state of statistical control.

For a detailed example which shows the usage of the function `cp()`

please read the vignette for the package `qualityTools`

at http://www.r-qualitytools.org/html/Analyze.html.

Thomas Roth [email protected]

ISO (2007). Statistical methods - Process performance and capability statistics for measured quality characteristics (ISO 21747:2006).

MITTAG, H.-J.; RINNE, H.: Prozessfaehigkeitsmessung fuer die industrielle Praxis. Muinch: Hanser, 1999.

KOTZ, Samuel; LOVELACE, Cynthia R.: Process capability indices in theory and practice. London,New York: Arnold, 1998

`qqPlot`

`ppPlot`

http://www.r-qualitytools.org/html/Analyze.html

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
x = rweibull(30, 2, 8) +100
#process capability for a weibull distribution
cp(x, "weibull", lsl = 100, usl = 117)
#box cox transformation and one sided
cp(x, boxcox = TRUE, lsl = 1)
#process capability assuming a normal distribution
cp(x, "normal", lsl = 0, usl = 17)
#process capability for a normal distribution and data in subgroups
#some artificial data with shifted means in subgroups
x = c(rnorm(5, mean = 1), rnorm(5, mean = 2), rnorm(5, mean = 0))
#grouping vector
group = c(rep(1,5), rep(2,5), rep(3,5))
#calculate process capability
cp(x, grouping = group) #compare to sd(x)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.