IQCC implements Improved Quality Control Charts: statistical process control charts with exact, corrected, standardized, or simulation-based limits for univariate and multivariate monitoring.
The package is motivated by a recurring practical problem in classical Shewhart-type control charts: when the statistic being monitored is discrete, skewed, bounded, or strongly non-normal, usual normal-based three-sigma limits can be badly misplaced. In those cases, the nominal false-alarm risk may differ substantially from the actual one. IQCC keeps the familiar control-chart workflow while exposing numerical functions that make limits, risk, ARL, and sample-size calculations reproducible and testable.
Main features
- Univariate control charts: X-bar, R, S, p, and u charts.
- Improved probability limits: exact, Cornish-Fisher corrected, standardized, and simulation-based limits.
- High-quality processes: corrected p charts and double-sampling np charts for rare nonconformities.
-
Multivariate monitoring: Hotelling T² charts, generalized variance charts, and auxiliary
tr(V)variability charts. - False-alarm diagnostics: exact binomial, Poisson, range-chart, and generalized-variance risk calculations where available.
- Phase I and Phase II support: retrospective estimation and prospective monitoring where supported by the chart family.
- Research-oriented numerical layer: pure functions separated from plotting interfaces for validation and simulation studies.
- Scientific validation catalogue: executable reproductions, independent derivations, exact-distribution checks, Monte Carlo studies, and property tests with explicit provenance and tolerances.
Implemented methods
| Monitoring problem | Function(s) | Implemented methods | Notes |
|---|---|---|---|
| Mean of a univariate process |
cchart.Xbar(), cchart.Xbar1(), cchart.Xbar2(), cchart.Xbar_R()
|
Shewhart-type X-bar charts | Includes X-bar/R workflows. |
| Range / process dispersion |
r_shewhart_limits(), r_exact_limits(), cchart.R()
|
Shewhart R chart; exact Tukey-based R chart | Exact limits use the relative-range distribution. |
| Standard deviation |
s_shewhart_limits(), s_exact_limits(), cchart.S()
|
Conventional S chart; exact chi-square-based S chart | Exact limits use the sample-variance distribution; the wrapper preserves the historical qcc centering convention. |
| Nonconforming proportion |
pchart_limits(), pchart_alpha_risk(), cchart.p()
|
Normal, CF1, CF2, and standardized p charts | Includes exact binomial false-alarm evaluation and pooled estimation. |
| Double-sampling np chart |
dsnp_prob_accept(), dsnp_arl(), dsnp_ass(), dsnp_limits(), dsnp_design(), cchart.DSnp()
|
Exact-binomial DS-np performance, design search, and chart | Two-stage sampling for high-quality processes with small samples; supports complete and curtailed inspection conventions. |
| Nonconformities per unit |
uchart_limits(), uchart_alpha_risk(), cchart.u()
|
Normal, CF1, CF2, and standardized u charts | Includes exact Poisson risk and pooled rate estimation. |
| Multivariate mean vector |
T2.1(), T2.2(), cchart.T2.1(), cchart.T2.2()
|
Hotelling T² charts for Phase I and Phase II | Supports individual and subgroup observations. |
| Multivariate variability |
gv_stat(), gv_limits(), gv_alpha_risk(), cchart.GV()
|
Normal, Cornish-Fisher, selected exact, and simulation-based generalized variance charts | Exact dimension-two limits and selected published dimension-three quantiles. |
| Multivariate variability structure |
trv_stat(), trv_limits(), trv_alpha_risk(), cchart.trV()
|
Exact chi-square and simulation-based trace-statistic charts | Complements |S| by detecting standardized trace changes that may preserve determinant. |
| Relative range constants |
d2(), d3()
|
Numerical integration using Tukey distribution functions | Used by range-chart calculations and validation. |
| False-alarm risk for R charts | alpha.risk() |
Exact false-alarm probability for the classical three-sigma R chart | Diagnoses inflated false-alarm risk. |
Installation
Install the CRAN version:
install.packages("IQCC", dependencies = TRUE)Install the development version from GitHub:
remotes::install_github("flaviobarros/IQCC")Quick start
library(IQCC)
# X-bar and R charts
data(pistonrings)
cchart.Xbar_R(pistonrings[1:25, ], 5)
# Exact R chart using Phase I data to estimate sigma
cchart.R(
pistonrings[26:40, ],
5,
type = "tukey",
y = pistonrings[1:25, ]
)
# Pure S-chart limits without plotting
s_exact_limits(sigma = 1, n = 5)
s_shewhart_limits(sigma = 1, n = 5)
# p-chart limits and exact false-alarm risk
p_limits <- pchart_limits(p = 0.015, n = 20, type = "cf2")
pchart_alpha_risk(
p = 0.015,
n = 20,
lcl = p_limits$lcl,
ucl = p_limits$ucl
)
# u-chart with pooled Phase I rate and CF2 limits
data(moonroof)
cchart.u(
x1 = moonroof$yi[1:17],
n1 = moonroof$ni[1:17],
type = "cf2",
x2 = moonroof$yi[18:34],
n2 = moonroof$ni[18:34]
)
# DS-np performance for a published high-quality-process design
dsnp_arl(
p = c(0.005, 0.0075),
n1 = 34,
n2 = 162,
wl = 1.5,
ucl1 = 2.5,
ucl2 = 4.5
)
# Generalized variance limits for dimension two
gv_limits(
n = 10,
p = 2,
det_sigma = 0.5320,
type = "exact"
)
# Auxiliary trace chart for covariance-structure changes
set.seed(123)
phase1 <- array(rnorm(6 * 8 * 2), dim = c(6, 8, 2))
cchart.trV(phase1, Sigma0 = diag(2), plot = FALSE)Learning more
The package includes executable articles covering use, theory, validation, and positioning:
vignette("getting-started-with-iqcc", package = "IQCC")
vignette("iqcc-positioning", package = "IQCC")
vignette("high-quality-processes", package = "IQCC")
vignette("univariate-dispersion-monitoring", package = "IQCC")
vignette("multivariate-monitoring", package = "IQCC")
vignette("statistical-foundations", package = "IQCC")
vignette("numerical-validation", package = "IQCC")
vignette("software-comparison", package = "IQCC")-
getting-started-with-iqccintroduces the package workflow and principal chart families. -
iqcc-positioningexplains where IQCC fits in the R/SPC ecosystem. -
high-quality-processesfocuses on rare nonconformities, Cornish-Fisher p charts, and DS-np monitoring. -
univariate-dispersion-monitoringcovers R and S charts, including distribution-aware limits. -
multivariate-monitoringcovers Hotelling T², generalized variance, andtr(V)monitoring. -
statistical-foundationsrecords the probability models and derivations behind the audited methods. -
numerical-validationconsolidates published reproductions, independent oracles, tolerances, and unresolved source conventions. -
software-comparisonplaces IQCC alongside related R statistical-process-control packages.
A longer article-oriented technical document is maintained at paper/statistical-foundations.md in the development repository.
Research background
IQCC grew from research on improved statistical quality control charts, particularly work led by Emanuel Pimentel Barbosa and collaborators. The package emphasizes cases where classical Shewhart-type limits remain operationally attractive but their usual normal approximations can be statistically inaccurate.
Important methodological themes include:
- Cornish-Fisher quantile correction for highly skewed attribute statistics;
- exact discrete false-alarm evaluation for binomial and Poisson charts;
- exact range-chart limits through the relative-range distribution;
- exact chi-square probability limits for subgroup standard deviations;
- double-sampling designs for rare nonconformities;
- Hotelling T² monitoring for multivariate process means;
- generalized variance monitoring through products of chi-square variables and Bartlett decomposition;
- auxiliary
tr(V)monitoring through the trace of a standardized Wishart matrix.
Development roadmap
Version 0.8.0 freezes the validated core described above. Extensions that remain outside the release scope are tracked separately so that experimental work does not blur the stable API.
| Candidate extension | Statistical target | Possible function names | Status |
|---|---|---|---|
| Full DS-np sample-size optimization | Joint design over sample sizes and limits | future API | Future work |
| Generic exact generalized variance quantiles | Product-of-chi-squares / Meijer-G or another validated numerical approach | future API | Research stage |
| Rare-defect and time-between-events families | Additional high-quality-process monitoring | future API | Post-0.8 research |
| JSS replication package and manuscript | Fully reproducible software paper |
paper/ and replication scripts |
Post-release work |
References
- Montgomery, D. C. (2008). Introduction to Statistical Quality Control. 6th ed. Wiley.
- Joekes, S. and Barbosa, E. P. (2013). An improved attribute control chart for monitoring non-conforming proportion in high quality processes. Control Engineering Practice.
- Barbosa, E. P., Gneri, M. A. and Meneguetti, A. (2013). Range Control Charts Revisited: Simpler Tippett-like Formulae, Its Practical Implementation, and the Study of False Alarm. Communications in Statistics - Simulation and Computation.
- Joekes, S., Smrekar, M. and Barbosa, E. P. (2015). Extending a double sampling control chart for non-conforming proportion in high quality processes to the case of small samples. Statistical Methodology.