StatisticalProcessMonitoring.jl

StatisticalProcessMonitoring.jl is a Julia package for testing the stability of sequential data streams using statistical process monitoring (SPM) techniques. The package provides a flexible framework for implementing control charts, monitoring statistics, and control limit calibration methods. The package is designed to be extensible, allowing users to define custom control charts and monitoring statistics.

For an extensive review of SPM and control charts, a recommended resource is the book Introduction to Statistical Process Control.

Installation

StatisticalProcessMonitoring.jl requires Julia version 1.8 or above. To install StatisticalProcessMonitoring.jl, press the ] key inside the Julia REPL to access the interactive package manager model and run the following command

pkg> add StatisticalProcessMonitoring

Otherwise, in the standard REPL run the following command

julia> using Pkg
julia> Pkg.add("StatisticalProcessMonitoring")

Once installed, the package can be loaded by running the following command

julia> using StatisticalProcessMonitoring

Features overview

  • The package focuses on Monte-Carlo-based calibration of control limits and hyperparameter optimization for control charts.
  • The package implements a general control chart interface which can be easily extended to accommodate user-defined monitoring statistics and customized control limit behaviour.
  1. Classical control charts
    • Univariate and multivariate Shewhart, EWMA, CUSUM charts, as well as their adaptive generalization
    • Control charts for monitoring the variance-covariance matrix.
    • Control charts based on data categorization for monitoring the process mean.
    • Control charts for partially-observed data streams.
    • Control charts for profile monitoring.
  2. Multi-chart monitoring schemes
    • Support for arbitrary combination of control charts
    • Joint control limit calibration for control charts
  3. Metrics
    • Metrics based on the Average Run Length
    • Metrics based on Run Length quantiles
  4. Control limit calibration
    • Control limit estimation based on data distributions using Distributions.jl
    • Control limit estimation based on bootstrap and block bootstrap of initial data
    • Dynamic control limits with constant false-alarm rate via bootstrap resampling
  5. Hyperparameter tuning
    • Optimization of control chart parameters for user-defined out-of-control scenarios, using grid search and nonlinear optimizers (NLopt.jl)

Overview of other software packages

Traditional control charts in SPM software

Most SPM software packages primarily focus on implementing traditional control charts for analyzing univariate or multivariate data. However, these packages may lack support for advanced methodologies like multi-chart schemes and user-defined control charts, requiring practitioners to develop their routines to address these limitations.

Julia packages

Other packages implementing SPM tools in Julia are:

R packages

Some notable SPM software packages in R include:

  • qcc for Shewhart, CUSUM, and EWMA charts
  • MSQC for multivariate control charts
  • spc for in-control average run length and run length quantile calculations
  • qicharts and qicharts2 for run charts, Shewhart and Pareto control charts
  • edcc for control charts designed using the optimal economic design framework

Other specialized packages offer functionalities for specific applications, such as:

  • spcadjust for adjusting control limits based on estimated parameters
  • funcharts for multivariate functional data, function-on-scalar regression and function-on-function regression
  • surveillance for change detection with a focus on public health surveillance
  • cpm, strucchange, bcp, and changepoint for process monitoring based on change-point models
  • dfphase1 for change detection in retrospective samples using distribution-free control charts

Packages in other programming languages

Limited support for SPM methodologies exists in other programming languages:

  • PySpc in Python for classical control charts
  • Pre-Screen in MATLAB for various control charts

For a detailed review of existing SPM packages across different programming languages, including their features and functionalities, refer to the complete article.