Title: | A Collection of Process Capability Index Functions |
---|---|
Description: | A collection of process capability index functions, such as C_p(), C_pk(), C_pm(), and others, along with metadata about each, like 'LaTeX' equations and 'R' expressions. Its primary purpose is to form a foundation for other quality control packages to build on top of, by providing basic resources and functions. The indices belong to the field of statistical quality control, and quantify the degree to which a manufacturing process is able to create items that adhere to a certain standard of quality. For details see Montgomery, D. C. (2019, ISBN:978-1-119-39930-8). |
Authors: | Sam Semegne [aut, cre] |
Maintainer: | Sam Semegne <[email protected]> |
License: | GPL-3 |
Version: | 1.0.1 |
Built: | 2025-02-28 04:47:18 UTC |
Source: | https://github.com/samsemegne/pci |
Only vectors of length 1 are recycled.
NA
's take precedence over NaN
's, e.g. NaN + NA
will output NA
.
Yields NaN
if sigma
equals 0.
C_p(sigma, lsl, usl, dl)
C_p(sigma, lsl, usl, dl)
sigma |
|
lsl |
|
usl |
|
dl |
|
double
.
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_p(sigma = sd(data), lsl = 0., usl = 6., dl = 6.) # [1] 1.08211
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_p(sigma = sd(data), lsl = 0., usl = 6., dl = 6.) # [1] 1.08211
Note. This function allows for negative values.
Only vectors of length 1 are recycled.
NA
's take precedence over NaN
's, e.g. NaN + NA
will output NA
.
Yields NaN
if sigma
equals 0.
C_pk(mu, sigma, lsl, usl, dl)
C_pk(mu, sigma, lsl, usl, dl)
mu |
|
sigma |
|
lsl |
|
usl |
|
dl |
|
double
.
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pk(mu = mean(data), sigma = sd(data), lsl = 0., usl = 6., dl = 6.) # [1] 1.052367
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pk(mu = mean(data), sigma = sd(data), lsl = 0., usl = 6., dl = 6.) # [1] 1.052367
Note. This function allows for negative values.
Only vectors of length 1 are recycled.
NA
's take precedence over NaN
's, e.g. NaN + NA
will output NA
.
Yields NaN
if sigma
equals 0.
C_pl(mu, sigma, lsl, l)
C_pl(mu, sigma, lsl, l)
mu |
|
sigma |
|
lsl |
|
l |
|
double
.
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pl(mu = mean(data), sigma = sd(data), lsl = 0., l = 3.) # [1] 1.111853
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pl(mu = mean(data), sigma = sd(data), lsl = 0., l = 3.) # [1] 1.111853
Only vectors of length 1 are recycled.
NA
's take precedence over NaN
's, e.g. NaN + NA
will output NA
.
Yields NaN
if sigma == 0
and mu == target
.
C_pm(mu, sigma, target, lsl, usl, dl)
C_pm(mu, sigma, target, lsl, usl, dl)
mu |
|
sigma |
|
target |
|
lsl |
|
usl |
|
dl |
|
double
.
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pm(mu = mean(data), sigma = sd(data), target = 3., lsl = 0., usl = 6., dl = 6.) # [1] 1.077827
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pm(mu = mean(data), sigma = sd(data), target = 3., lsl = 0., usl = 6., dl = 6.) # [1] 1.077827
Note. This function allows for negative values.
Only vectors of length 1 are recycled.
NA
's take precedence over NaN
's, e.g. NaN + NA
will output NA
.
Yields NaN
if sigma
equals 0.
C_pu(mu, sigma, usl, l)
C_pu(mu, sigma, usl, l)
mu |
|
sigma |
|
usl |
|
l |
|
double
.
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pu(mu = mean(data), sigma = sd(data), usl = 6., l = 3.) # [1] 1.052367
set.seed(1L) data = rnorm(n = 30L, mean = 3., sd = 1.) C_pu(mu = mean(data), sigma = sd(data), usl = 6., l = 3.) # [1] 1.052367
Metadata about the process capability indices (PCIs).
pci_info
character
. The ID of the PCI. Corresponds to the row name of the
data.frame in R.
character
. The variable name of the PCI, as may be referred to by other
metadata fields that contain R code.
character
. The name of the PCI in LaTeX format.
character
. The name of the PCI in R expression format, useful for
working with plot labels or texts in R. To be used with
str2expression(text)
in R.
character
. An R expression of the PCI, in expanded form. Variable names
match parameter names of the PCI's function provided by the package. Can
be used with str2expression(text)
in R.
character
. An equation of the PCI in LaTeX format.
AsIs
. The attributes column is essentially an unnamed list
, thus
being a nested data structure. Each element belonging to a PCI is again
an unnamed list
, which holds the actual attributes for that PCI. Each
attribute is a named list
. Attributes detail additional technical
information about the PCI or its related concepts, e.g. the bounds of the
PCI. Note, all information pertains to the PCI's function provided by the
package. Each actual attribute has a 'type' (single character
) field,
may have a 'target' (character
) field, followed by fields specific to
that attribute type. The 'target' field indicates which entity the
attribute belongs to, e.g. the PCI or one of its terms.