Implements univariate and multivariate risk-based control
charts for statistical process control in the presence of measurement
uncertainty. Available charts include Shewhart X-bar, R, and S charts,
moving-average charts, exponentially weighted moving-average charts,
cumulative-sum charts, and Hotelling T-squared charts. Chart limits can be
selected by exact empirical threshold optimization, bounded numerical
optimization, or sequential and optional parallel grid search while
minimizing the total cost of four decision outcomes. The methodology is
described by Kosztyan and Katona (2016)
rbcc implements risk-based statistical process control charts in the
presence of measurement uncertainty. The package compares the process state
obtained from reference values with the decision obtained from measured values,
accounts for all four decision outcomes, and can select chart limits by
minimizing their total cost.
rbcc() and rbcc_opt()rbmacc() and rbmacc_opt()rbewmacc() and rbewmacc_opt()rbcusumcc() and rbcusumcc_opt()rbmcc() and rbmcc_opt()The default exact threshold optimizer exploits the piecewise-constant structure of the empirical decision cost and is deterministic. Bounded numerical optimization and sequential or optional parallel grid search remain available.
After installation, open the complete workflow with:
vignette("rbcc-workflow", package = "rbcc")
A minimal example is:
library(rbcc)
set.seed(42)
X <- rnorm(80, mean = 10, sd = 0.5)
UC <- rnorm(80, mean = 0, sd = 0.05)
C <- c(c11 = 1, c10 = 5, c01 = 60, c00 = 5)
fit <- rbcc_opt(X, UC, C, n = 1, type = "xbar")
print(fit)
s <- summary(fit) # no console output during assignment
s$cost0
p <- plot(fit) # no drawing during assignment
p # draws the ggplot object
fit_grid <- rbcc_opt(
X, UC, C,
optimizer = "grid",
parallel = FALSE,
control = rbcc_control(grid_size = 401)
)
For sufficiently large grid problems, evaluation can be distributed across workers:
fit_parallel <- rbcc_opt(
X, UC, C,
optimizer = "grid",
parallel = TRUE,
workers = 2,
control = rbcc_control(grid_size = 2001)
)
Parallel startup and data-transfer overhead can dominate small problems; the exact optimizer remains the recommended default for scalar empirical limits.
See citation("rbcc") for the methodological publications.