Risk-Based Control Charts

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) , Kosztyan and Katona (2018) , Katona et al. (2023) , Saghir et al. (2025) , and Saghir et al. (2026) .


rbcc 0.2.1

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.

Available charts

  • Shewhart X-bar, R, and S charts: rbcc() and rbcc_opt()
  • Moving-average charts: rbmacc() and rbmacc_opt()
  • EWMA charts: rbewmacc() and rbewmacc_opt()
  • CUSUM charts: rbcusumcc() and rbcusumcc_opt()
  • Multivariate Hotelling T-squared charts: 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.

Getting started

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

Alternative optimizers

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.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rbcc")

0.2.1 by Zsolt Tibor Kosztyan, 2 days ago


https://github.com/kzst/rbcc


Report a bug at https://github.com/kzst/rbcc/issues


Browse source code at https://github.com/cran/rbcc


Authors: Aamir Saghir [aut] , Attila Imre Katona [aut] , Zsolt Tibor Kosztyan [aut, cre]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports ggplot2, parallel, PearsonDS, qcc, stats, utils

Suggests knitr, rmarkdown


See at CRAN