rbmcc {rbcc} | R Documentation |
Risk-based Multivariate Control Chart
Description
Calculate Risk-based Multivariate Control Chart
Usage
rbmcc(X, UC, C, n=1 , confidence_level=0.99, K=0)
Arguments
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) |
Value
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 |
Author(s)
Aamir Saghir, Attila I. Katona, Zsolt T. Kosztyan*
e-mail: kzst@gtk.uni-pannon.hu
References
KosztyƔn, Z. T., and Katona, A. I. (2016). Risk-based multivariate control chart. Expert Systems with Applications, 62, 250-262.
See Also
data_gen
, rbcc
, rbcc_opt
, rbewmacc
, rbewmacc_opt
, rbmacc
, rbmacc_opt
, rbmcc_opt
, plot.rbcc
, summary.rbcc
.
Examples
# 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