Title: | Risk-Based Control Charts |
---|---|
Description: | Univariate and multivariate versions of risk-based control charts. Univariate versions of control charts, such as the risk-based version of X-bar, Moving Average (MA), Exponentially Weighted Moving Average Control Charts (EWMA), and Cumulative Sum Control Charts (CUSUM) charts. The risk-based version of the multivariate T2 control chart. Plot and summary functions. Kosztyan et. al. (2016) <doi:10.1016/j.eswa.2016.06.019>. |
Authors: | Aamir Saghir [aut], Attila Imre Katona [aut], Zsolt Tibor Kosztyan [aut, cre] |
Maintainer: | Zsolt Tibor Kosztyan <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.3 |
Built: | 2024-11-05 16:23:39 UTC |
Source: | https://github.com/kzst/rbcc |
The risk-based is a new methodology to design an optimized control chart that minimized the cost of decision outcomes of the control process. The basic purpose of the risk-based control is to determine the optimal control charts parameters to minimize the risks arising from measurement uncertainty. This article develops an R package for family of risk-based control charts, namely 'rbcc'
. In this package, the functions required in the design of family of risk-based control charts univariate and multivariate
This work has been implemented by the TKP2021-NVA-10 project with the support provided by the Ministry of Culture and Innovation of Hungary from the National Research, Development and Innovation Fund, financed under the 2021 Thematic Excellence Programme funding scheme.
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
rbcc
, data_gen
, summary.rbcc
, plot.rbcc
.
data_gen function simulate the data set from a specified distribution used in the risk based control charts.
data_gen(obs, mu, va, sk, ku)
data_gen(obs, mu, va, sk, ku)
obs |
The total number of observations of a process( a numeric value). |
mu |
The means of p characteristics/measurement errors (a numeric vector). |
va |
The variances of p characteristics/measurement errors (a numeric vector). |
sk |
The skewness of distribution of p characteristics/measurement errors (a numeric vector). |
ku |
The kurtosis of distribution of p characteristics/measurement errors (a numeric vector). |
Return the data vector/matrix and the measurement error vector/matrix used in the risk-based control charts functions.
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
, rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. #Example for generation of measurement error matrix with 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC # optimal risk-based multivariate control chart H_opt <- rbmcc_opt(X, UC, C) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) #optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. #Example for generation of measurement error matrix with 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC # optimal risk-based multivariate control chart H_opt <- rbmcc_opt(X, UC, C) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) #optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
Plot function for Risk-based Univariate (shewhart, exponentially weighted moving average(EWMA), moving average (MA) and cumulative sum (CUSUM) or Multivariate Control Chart
## S3 method for class 'rbcc' plot(x, ...) ## S3 method for class 'rbcusumcc' plot(x, ...) ## S3 method for class 'rbmcc' plot(x, ...)
## S3 method for class 'rbcc' plot(x, ...) ## S3 method for class 'rbcusumcc' plot(x, ...) ## S3 method for class 'rbmcc' plot(x, ...)
x |
an object of class 'rbcc', 'rbcusumcc' or 'rbmcc'. |
... |
other graphical parameters. |
No return value, called for side effects
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
, rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, summary.rbcc
.
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC # optimal risk-based multivariate control chart H_opt <- rbmcc_opt(X, UC, C) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC # optimal risk-based multivariate control chart H_opt <- rbmcc_opt(X, UC, C) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
Calculate Risk-based Shewhart type univarate Control Charts
rbcc (X, UC, C, n, type= c("xbar", "R", "S"), confidence_level=0.9973, K=3)
rbcc (X, UC, C, n, type= c("xbar", "R", "S"), confidence_level=0.9973, K=3)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
type |
a character string specifying the type of Shewhart control chart. Available types are; "Xbar", "R"and "S". |
confidence_level |
the (1-alpha)percent confidence level (default value is 0.99) |
K |
a correction component (default value is 3). |
cost0 |
Total cost of a monitoring process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
LCLx |
Lower control limit of a Shewhart univariate 'type' chart for a given data |
UCLx |
Upper control limit of a Shewhart univariate 'type' chart for a given data |
LCLy |
Lower control limit of a Shewhart univariate 'type' chart for a given data with measurement uncertainity |
UCLy |
Upper control limit of a Shewhart univariate 'type' chart for a given data with measurement uncertainity |
real |
Real values of a Shewhart univariate 'type' chart statistic |
Observed |
Observed values of a Shewhart univariate 'type' chart with measurement errors |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
,rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC # optimal risk-based multivariate control chart H_opt <- rbmcc_opt(X, UC, C) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC # optimal risk-based multivariate control chart H_opt <- rbmcc_opt(X, UC, C) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
Calculate Optimized Risk-based Univariate Control Chart
rbcc_opt(X, UC, C, n, type=c("xbar", "R", "S"),confidence_level=0.9973, K_init=0,LKL=0,UKL=5)
rbcc_opt(X, UC, C, n, type=c("xbar", "R", "S"),confidence_level=0.9973, K_init=0,LKL=0,UKL=5)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
type |
a character string specifying the type of Shewhart control chart. Available types are; "Xbar", "R"and "S". |
confidence_level |
the (1-alpha)percent confidence level(default value is 0.9973) |
K_init |
a correction component (default value is 0). |
LKL |
Lower limit of K parameter (default value is 0) |
UKL |
Upper limit of K parameter (default value is 5) |
cost0 |
Total cost of a monitoring process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 2 related to a process monitoring |
cost3 |
Total cost of decision error type 1 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
LCLx |
Lower Control Limit of a Shewhart univariate 'type' chart for a given data |
UCLx |
Upper Control Limit of a Shewhart univariate 'type' chart for a given data |
LCLy |
Lower Control Limit of an Optimal Risk-based univariate 'type' chart for a given data |
UCLy |
Upper Control Limit of an Optimal Risk-based univariate 'type' chart for a given data |
real |
Real values of plotting statistic for a given data |
Observed |
Observed plotting statistic for a given data with measurement errors |
par |
Optimal 'K' parameter of risk-based univariate 'type' chart |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcusumcc
, rbcusumcc_opt
, rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 summary(H) # summarize the results plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 summary(H) # summarize the results plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. # Simulation of 200 obervations of 1 variable. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 summary(H) # summarize the results plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 summary(H) # summarize the results plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
Calculate Risk-based Cumulative Sum univariate Control Charts
rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5)
rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
T |
A numeric value specifying the number of standard errors of the summary statistics at which the cumulative sum is out of control (The defualt value is 5). |
se.shift |
The amount of shift to detect in the process, measured in standard errors of the CUSUM statistics (default value is 1). |
K |
a correction component(default value is 5). |
cost0 |
Total cost of a monitoing process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
LCLx |
Lower decision bound of CUSUM chart for a given data |
UCLx |
Upper decision bound of CUSUM control chart for a given data |
LCLy |
Lower decision bound of CUSUM chart for a given data with measurement uncertainity |
UCLy |
Upper decision bound of CUSUM chart for a given data with measurement uncertainity |
cusumx |
Real values of CUSUM statistic |
cusumy |
Observed values of CUSUM statistic with measurement errors for a given data |
reall |
Below target real values of CUSUM statistic for a given data |
realu |
Above target real values of CUSUM statistic for a given data |
obsl |
Below target observed values of CUSUM statistic with measurement errors for a given data |
obsu |
Below target observed values of CUSUM statistic with measurement errors for a given data |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
,rbcusumcc_opt
, rbewmacc
,rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. n <- 1 # Individual observation X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) # for subgroups of size 1 plot(H) # plot RBCC # optimal risk-based CUSUM control chart H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) # Optimal risk-based CUSUM control chart H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # Plot of traditional and optimal risk based cusum control charts plot(H_opt)
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. n <- 1 # Individual observation X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) # for subgroups of size 1 plot(H) # plot RBCC # optimal risk-based CUSUM control chart H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) # Optimal risk-based CUSUM control chart H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # Plot of traditional and optimal risk based cusum control charts plot(H_opt)
Calculate Optimized Risk-based Univariate cumulative sum (CUSUM) Control Chart
rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6)
rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
T |
A numeric value specifying the number of standard errors of the summary statistics at which the cumulative sum is out of control (The defualt value is 5). |
se.shift |
The amount of shift to detect in the process, measured in standard errors of the CUSUM statistics (default value is 1). |
K_init |
Set correction component to 0 by default (default value is 0) |
LKL |
Lower limit of K parameter (default value is 0) |
UKL |
Upper limit of K parameter (default value is 6) |
cost0 |
Total cost of a monitoring process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
LCLx |
Lower decision bound of CUSUM chart for a given data |
UCLx |
Upper decision bound of CUSUM control chart for a given data |
LCLy |
Lower decision bound of CUSUM chart for a given data with measurement uncertainity |
UCLy |
Upper decision bound of CUSUM chart for a given data with measurement uncertainity |
cusumx |
Real values of CUSUM statistic for a given data |
cusumy |
Observed values of CUSUM statistic for a given data with measurement errors |
reall |
Below target real values of CUSUM statistic for a given data |
realu |
Above target real values of CUSUM statistic for a given data |
obsl |
Below target observed values of CUSUM statistic for a given data with measurement errors |
obsu |
Below target observed values of CUSUM statistic of a given data with measurement errors |
Kopt |
Optimal 'K' paramater of a risk-based CUSUM control chart |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
,rbcusumcc
, rbewmacc
,rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. n <- 1 # For individual obervations use n=1 UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) # for subgroups of size 1 plot(H) # plot RBCC # optimal risk-based CUSUM control chart H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # optimal risk-based CUSUM control chart summary(H_opt) # summarize the reults # Plot of traditional and optimal risk based cusum control charts plot(H_opt)
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. n <- 1 # For individual obervations use n=1 UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) # for subgroups of size 1 plot(H) # plot RBCC # optimal risk-based CUSUM control chart H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbcusumcc(X, UC, C, n, T=5, se.shift=1, K=5) H_opt <- rbcusumcc_opt(X, UC, C, n, T=5, se.shift=1, K_init= 0, LKL=0, UKL=6) # optimal risk-based CUSUM control chart summary(H_opt) # summarize the reults # Plot of traditional and optimal risk based cusum control charts plot(H_opt)
Calculate Risk-based Exponentially Weighted Moving Average univarate Control Charts
rbewmacc (X, UC, C, n=1, lambada=0.20, nsigmas=3, K=3)
rbewmacc (X, UC, C, n=1, lambada=0.20, nsigmas=3, K=3)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
lambada |
a weight or smoothing constant for EWMA control charts. The value is between (0,1). The defualt value is 0.20. |
nsigmas |
the charting multiplier(default value is 3) |
K |
a correction component(default value is 3). |
cost0 |
Total cost of a monitoring process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
LCLx |
Lower control limit of type chart for a given data |
UCLx |
Upper control limit of type control chart for a given data |
LCLy |
Lower control limit of type chart for a given data with measurement uncertainity |
UCLy |
Upper control limit of type control chart for a given data with measurement uncertainity |
real |
Real values of ewma statistic for a given data |
Observed |
Observed values of ewma statistic with measurement errors for a given data |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbewmacc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBCC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbewmacc(X, UC, C) # traditional risk-based EWMA control chat summary(H) # summarize the results plot(H) # plot RBCC
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbewmacc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBCC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbewmacc(X, UC, C) # traditional risk-based EWMA control chat summary(H) # summarize the results plot(H) # plot RBCC
Calculate Optimized Risk-based Univariate exponentially weighted moving average Control Chart
rbewmacc_opt(X, UC, C, n=1, lambada=0.20, nsigmas=3, K_init= 0, LKL=0, UKL=5)
rbewmacc_opt(X, UC, C, n=1, lambada=0.20, nsigmas=3, K_init= 0, LKL=0, UKL=5)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
lambada |
a weight or smoothing constant for EWMA control charts. The value is between (0,1). The defualt value is 0.20. |
nsigmas |
the charting multiplier(default value is 3) |
K_init |
Set correction component to 0 by default (default value is 0) |
LKL |
Lower limit of K parameter (default value is 0) |
UKL |
Upper limit of K parameter (default value is 5) |
cost0 |
Total cost of a monitoring process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
baselimit |
UCL of a EWMA chart for a given data |
limit |
UCL of optimized risk based EWMA control chart for a given data |
real |
Real values of plotting statistic for a given data |
Observed |
Observed plotting statistic with measurement errors for a given data |
Kopt |
Optimal 'K' paramater of risk-based EWMA control chart for a given data |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
,rbewmacc
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbewmacc(X, UC, C) # for subgroups of size 1 # fit optimal risk-based EWMA control chart H_opt <- rbewmacc_opt(X, UC, C, n=1,lambada=0.20,nsigmas=3,K_init= 0,LKL=0,UKL=5) plot(H_opt) # plot RBEWMACC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbewmacc(X, UC, C) # traditional risk-based EWMA control chat # fit optimal risk-based EWMA control chart H_opt <- rbewmacc_opt(X, UC, C, n=1,lambada=0.20,nsigmas=3,K_init= 0,LKL=0,UKL=5) plot(H_opt) # plot RBEWMACC
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbewmacc(X, UC, C) # for subgroups of size 1 # fit optimal risk-based EWMA control chart H_opt <- rbewmacc_opt(X, UC, C, n=1,lambada=0.20,nsigmas=3,K_init= 0,LKL=0,UKL=5) plot(H_opt) # plot RBEWMACC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbewmacc(X, UC, C) # traditional risk-based EWMA control chat # fit optimal risk-based EWMA control chart H_opt <- rbewmacc_opt(X, UC, C, n=1,lambada=0.20,nsigmas=3,K_init= 0,LKL=0,UKL=5) plot(H_opt) # plot RBEWMACC
Calculate Risk-based Moving Average univarate Control Charts
rbmacc (X, UC, C, n=1, w=2, K=3)
rbmacc (X, UC, C, n=1, w=2, K=3)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
w |
moving average spam. The defualt value is 2. |
K |
a correction component(default value is 3). |
cost0 |
Total cost of a monitoring process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
LCLx |
Lower control limit of MA chart for a given data |
UCLx |
Upper control limit of MA control chart for a given data |
LCLy |
Lower control limit of MA chart for for a given data with measurement uncertainity |
UCLy |
Upper control limit of MA control chart for a given data with measurement uncertainity |
real |
Real values of MA statistic for a given data |
Observed |
Observed values of MA statistic with measurement errors for a given data |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
,rbewmacc
, rbewmacc_opt
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbmacc(X, UC, C, w=2, n=1) # for subgroups of size 1 summary(H) # summarize the reults plot(H) # plot RBMACC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmacc(X, UC, C, w=2, n=2) # for subgroups of size 1 summary(H) # summarize the reults plot(H) # plot RBMACC
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbmacc(X, UC, C, w=2, n=1) # for subgroups of size 1 summary(H) # summarize the reults plot(H) # plot RBMACC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmacc(X, UC, C, w=2, n=2) # for subgroups of size 1 summary(H) # summarize the reults plot(H) # plot RBMACC
Calculate Optimized Risk-based Univariate MA Control Chart
rbmacc_opt(X, UC, C, n, w, K_init=0, LKL=0, UKL=5)
rbmacc_opt(X, UC, C, n, w, K_init=0, LKL=0, UKL=5)
X |
vector of variable (numeric vector). Either can be simulated using data_gen or defined by using available data set. |
UC |
vector of measuerement error (numeric vector).Either can be simulated using data_gen or defined by using available previous information. |
C |
vector of decision costs (default value is vector of 1). |
n |
the sample size for grouping. For individual obervations use n=1). |
w |
Moving average spam. The defualt value is 1. |
K_init |
Set correction component to 0 by default (default value is 0) |
LKL |
Lower limit of K parameter (default value is 0) |
UKL |
Upper limit of K parameter (default value is 5) |
cost0 |
Total cost of a monioting process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
baselimit |
UCL of a MA chart for a given data |
limit |
UCL of optimized risk based MA control chart for a given data |
real |
Real values of plotting statistic for a given data |
Observed |
Observed plotting statistic with measurement errors for a given data |
Kopt |
Optimal K paramater of risk-based MA control chart for a given data |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
,rbewmacc
, rbewmacc_opt
, rbmacc
, rbmcc
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbmacc(X, UC, C, w=2, n=1) # for subgroups of size 1 # fit optimal risk-based MA control chart H_opt <- rbmacc_opt(X, UC, C, w=2, n=1) summary(H_opt) # summarize the reults plot(H_opt) # plot RBMACC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmacc(X, UC, C, w=2, n=3) # for subgroups of size 3 # fit optimal risk-based MA control chart H_opt <- rbmacc_opt(X, UC, C, w=2, n=3) summary(H_opt) # summarize the reults plot(H_opt) # plot RBMACC
# Data generation for vector X mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error vector UC mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) C <- c(1,1,1,1) # Define a vector of decision costs. H <- rbmacc(X, UC, C, w=2, n=1) # for subgroups of size 1 # fit optimal risk-based MA control chart H_opt <- rbmacc_opt(X, UC, C, w=2, n=1) summary(H_opt) # summarize the reults plot(H_opt) # plot RBMACC # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmacc(X, UC, C, w=2, n=3) # for subgroups of size 3 # fit optimal risk-based MA control chart H_opt <- rbmacc_opt(X, UC, C, w=2, n=3) summary(H_opt) # summarize the reults plot(H_opt) # plot RBMACC
Calculate Risk-based Multivariate Control Chart
rbmcc(X, UC, C, n=1 , confidence_level=0.99, K=0)
rbmcc(X, UC, C, n=1 , confidence_level=0.99, K=0)
X |
matrix of variables (numeric matrix). Either can be simulated using data_gen or defined by using available data set. |
UC |
matrix of measuerement error (numeric matrix). |
C |
vector of decision costs (default value is vector of 1). |
n |
The sample size for grouping. For individual obervations use n=1). |
confidence_level |
The (1-alpha)percent confidence level (default value is 0.99) |
K |
Set correction component to 0 by default (default value is 0) |
cost0 |
Total cost of a monitoirng process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
baselimit |
UCL of T^2 chart for a given data |
limit |
UCL of optimized risk based multivariate control chart for a given data |
real |
Real values of T2 statistic for a given data |
Observed |
Observed T2 with measurement errors for a given data |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
,rbcusumcc
, rbcusumcc_opt
, rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
# Data generation for matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # generate data pints # Data generation for measurement error matrix UC mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # example for generation of measurement error matrix UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Data generation for matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # generate data pints # Data generation for measurement error matrix UC mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # example for generation of measurement error matrix UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
Calculate Optimized Risk-based Multivariate Control Chart
rbmcc_opt(X, UC, C, n=1, confidence_level=0.99, K_init=0,LKL=-5,UKL=5)
rbmcc_opt(X, UC, C, n=1, confidence_level=0.99, K_init=0,LKL=-5,UKL=5)
X |
matrix of variables (numeric matrix). Either can be simulated using data_gen or defined by using available data set. |
UC |
matrix of measuerement error (numeric matrix). |
C |
vector of decision costs (default value is vector of 1). |
n |
The sample size for grouping. For individual obervations use n=1). |
confidence_level |
The (1-alpha)percent confidence level (default value is 0.99) |
K_init |
Set correction component to 0 by default (default value is 0) |
LKL |
Lower limit of K parameter (default value is -5) |
UKL |
Upper limit of K parameter (default value is -5) |
cost0 |
Total cost of a monitoing process |
cost1 |
Total cost of correct acceptance related to a process monitoring |
cost2 |
Total cost of decision error type 1 related to a process monitoring |
cost3 |
Total cost of decision error type 2 related to a process monitoring |
cost4 |
Total cost of correct reject related to a process monitoring |
baselimit |
UCL of T^2 chart for a given data |
limit |
UCL of optimized risk based multivariate control chart for a given data |
real |
Real values of T2 statistic for a given data |
Observed |
Observed T2 with measurement errors for a given data |
Kopt |
Optimal K paramater of risk-based multivariate control chart for a given data |
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
, rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, plot.rbcc
, summary.rbcc
.
# Data generation for matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # generate data pints # Data generation for measurement error matrix UC mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # example for generation of measurement error matrix UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Data generation for matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # generate data pints # Data generation for measurement error matrix UC mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # example for generation of measurement error matrix UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3) # optimal risk-based multivariate control chart # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
Print summary of Risk-based Univariate (shewhart, exponentially weighted moving average(EWMA), moving average (MA) and cumulative sum (CUSUM) or Multivariate Control Chart
## S3 method for class 'rbcc' summary(object, digits = getOption("digits"), ...) ## S3 method for class 'rbcusumcc' summary(object, digits = getOption("digits"), ...) ## S3 method for class 'rbmcc' summary(object, digits = getOption("digits"), ...)
## S3 method for class 'rbcc' summary(object, digits = getOption("digits"), ...) ## S3 method for class 'rbcusumcc' summary(object, digits = getOption("digits"), ...) ## S3 method for class 'rbmcc' summary(object, digits = getOption("digits"), ...)
object |
an object of class 'rbcc', 'rbcusumcc', or 'rbmcc'. |
digits |
the number of significant digits to use when |
... |
additional arguments affecting the summary produced. |
No return value, called for side effects
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: [email protected]
Katona, A. I., Saghir, A., Hegedűs, C., & Kosztyán, Z. T. (2023). Design of Risk-Based Univariate Control Charts with Measurement Uncertainty. IEEE Access.
Kosztyán, Z. T., & Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
data_gen
, rbcc
, rbcc_opt
, rbcusumcc
, rbcusumcc_opt
, rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc
, rbmcc_opt
, plot.rbcc
.
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 obervations of 1 variable. # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 summary(H) # summarize the results plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C)# optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3)# optimal risk-based multivariate control chart summary(H_opt) # summarize the results # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Data Generation and Xbar chart. ## Example for generation of data vector X and measuremenet error vector UC. obs <- 200 # Total number of observations of a process. mu_X <- c(0) # Define data mean. va_X <- c(1) # Define data standard deviation. sk_X <- c(0) # Define data skewness. ku_X <- c(3) # Define data kurtosis. mu_UC <- c(0) # Define mean of measurement errors. va_UC <- c(1) # Define standard deviation of measurement errors. sk_UC <- c(0) # Define skewness of measurement errors. ku_UC <- c(3) # Define kurtosis of measurement errors. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Simulation of 200 obervations of 1 variable. # Simulation of 200 muasurement erros related to 1 variable. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # Construction of risk-based Xbar chart with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbcc(X, UC, C, n=3, type="xbar") # for subgroups of size 3 plot(H) # plot RBCC # optimal risk-based xbar control chart H_opt <- rbcc_opt(X, UC, C, n=3, type="xbar") # Data Generation and multivariate T2 chart. # Data generation for a matrix X mu_X <- c(0,1,2) # vector of means. va_X <- c(1,2, 0.5) # vector of standard deviation. sk_X <- c(0,0.5, 0.8) # vector of skewness. ku_X <- c(3,3.5, 4) # vector of kurtosis. obs <- 200 # Total number of observations of a process. # Example for generation of data matrix X of 200 obervations of 3 variables. X <- data_gen (obs, mu_X, va_X, sk_X, ku_X) # Data generation for measurement error matrix UC. mu_UC <- c(0,0,0) # vector of means of measurement errors. va_UC <- c(1,2, 0.5) # vector of standard deviation of measurement errors. sk_UC <- c(0,0,0) # Vector of skewness of measurement errors. ku_UC <- c(3,3,3) # Vector of kurtosis of measurement errors. # Example for generation of measurement error matrix of 3 variables. UC <- data_gen(obs,mu_UC, va_UC, sk_UC, ku_UC) # with default vector of decision costs C <- c(1,1,1,1) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 summary(H) # summarize the results plot(H) # plot RBMCC H_opt <- rbmcc_opt(X, UC, C)# optimal risk-based multivariate control chart # with vector of proportional decision costs C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C) # for subgroups of size 1 H_opt <- rbmcc_opt(X, UC, C) # optimal risk-based multivariate control chart # with vector of proportional decision costs and sugbroup size 3 C <- c(1, 5, 60, 5) # vector of decision costs H <- rbmcc(X, UC, C, 3) # for subgroups of size 3 H_opt <- rbmcc_opt(X, UC, C, 3)# optimal risk-based multivariate control chart summary(H_opt) # summarize the results # Plot of Hotelling's T2 and optimal risk based multivariate control charts plot(H_opt) # Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
This data set contains measured product characteristic values for handbrake cylinder products. The measured product characteristics are cutting length and main diameter respectively for 50 pieces. Each parameter of each product was measured twice, first with a high-precision optical measurement machine and secondly with manual height measurement device/caliper. Measurement errors are estimated as the difference between the optical and manual measurement results. This dataset can be used to validate Risk-based Multivariate control charts.
data("t2uc")
data("t2uc")
A data frame with 50 observations on the following 6 variables.
length_optical
A numeric vector of optical measurement results regarding cutting length [mm].
diameter_optical
A numeric vector of optical measurement results regarding the main diameter [mm].
length_manual
A numeric vector of manual measurement (height gauge) results regarding cutting length [mm].
diameter_manual
A numeric vector of manual measurement (caliper) results regarding the main diameter [mm].
length_error
A numeric vector of measurement erros estimated as the difference between manual and optical measurement results associated with cutting length of the product.
diameter_error
A numeric vector of measurement erros estimated as the difference between manual and optical measurement results associated with the main diameter of the product.
Katona, A. I. (2021). Validation of risk-based quality control techniques: a case study from the automotive industry. Journal of Applied Statistics, 1-20.
# Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result
# Example of considering the real sample data("t2uc") # load the dataset X <- as.matrix(t2uc[,1:2]) # get optical measurements ar "real" values UC <- as.matrix(t2uc[,5:6]) # get measurement errors C <- c(1,20,160,5) # define cost structure # Fit optimized RBT2 control chart R <- rbmcc_opt(X, UC, C, 1,confidence_level = 0.99) summary(R) # summarize the results plot(R) # plot the result