Title: | A Collection of Process Capability Index Functions |
Version: | 1.0.1 |
Maintainer: | Sam Semegne <sam.ahoi@hotmail.com> |
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). |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.1 |
Imports: | vek (≥ 1.0.0) |
Depends: | R (≥ 4.0.0) |
LazyData: | true |
Suggests: | tinytest (≥ 1.4.1), devtools (≥ 2.4.5) |
URL: | https://github.com/samsemegne/pci |
NeedsCompilation: | no |
Packaged: | 2024-06-14 23:26:00 UTC; Sam |
Author: | Sam Semegne [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2024-06-15 00:30:06 UTC |
C_p
Description
C_p = \frac{\text{USL} - \text{LSL}}{L \sigma}
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.
Usage
C_p(sigma, lsl, usl, dl)
Arguments
sigma |
|
lsl |
|
usl |
|
dl |
|
Value
double
.
References
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
Examples
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
C_{pk}
Description
C_{pk} = \min(C_{pl}, C_{pu})
Note. This function allows for negative C_{pk}
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.
Usage
C_pk(mu, sigma, lsl, usl, dl)
Arguments
mu |
|
sigma |
|
lsl |
|
usl |
|
dl |
|
Value
double
.
References
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
See Also
Examples
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
C_{pl}
Description
C_{pl} = \frac{\mu - \text{LSL}}{L \sigma}
Note. This function allows for negative C_{pl}
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.
Usage
C_pl(mu, sigma, lsl, l)
Arguments
mu |
|
sigma |
|
lsl |
|
l |
|
Value
double
.
References
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
See Also
Examples
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
C_{pm}
Description
C_{pm} = \frac{\text{USL} - \text{LSL}}{L \sqrt{\sigma^2 + (\mu - T)^2}}
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
.
Usage
C_pm(mu, sigma, target, lsl, usl, dl)
Arguments
mu |
|
sigma |
|
target |
|
lsl |
|
usl |
|
dl |
|
Value
double
.
References
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
Examples
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
C_{pu}
Description
C_{pu} = \frac{\text{USL} - \mu}{L \sigma}
Note. This function allows for negative C_{pu}
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.
Usage
C_pu(mu, sigma, usl, l)
Arguments
mu |
|
sigma |
|
usl |
|
l |
|
Value
double
.
References
Montgomery, D. C. (2019). Introduction to statistical quality control (8th ed.). Wiley. ISBN: 978-1-119-39930-8
See Also
Examples
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
pci_info
Description
Metadata about the process capability indices (PCIs).
Format
pci_info
- pci_id
-
character
. The ID of the PCI. Corresponds to the row name of the data.frame in R. - name_r
-
character
. The variable name of the PCI, as may be referred to by other metadata fields that contain R code. - name_latex
-
character
. The name of the PCI in LaTeX format. - name_r_expr
-
character
. The name of the PCI in R expression format, useful for working with plot labels or texts in R. To be used withstr2expression(text)
in R. - expr_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 withstr2expression(text)
in R. - eq_latex
-
character
. An equation of the PCI in LaTeX format. - attributes
-
AsIs
. The attributes column is essentially an unnamedlist
, thus being a nested data structure. Each element belonging to a PCI is again an unnamedlist
, which holds the actual attributes for that PCI. Each attribute is a namedlist
. 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' (singlecharacter
) 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.