Title: | Percentile-Based Control Chart |
---|---|
Description: | Design and implementation of Percentile-based Shewhart Control Charts for continuous data. Faraz (2019) <doi:10.1002/qre.2384>. |
Authors: | Khan Zahid [aut], Aamir Saghir [aut], Zsolt T. Kosztyan [aut, cre] |
Maintainer: | Zsolt T. Kosztyan <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.0.7 |
Built: | 2025-02-04 05:40:59 UTC |
Source: | https://github.com/kzst/pbcc |
Create an object of class 'pbcc'
to perform statistical quality control based on percentile-based designs (PL) approach. This object may then be used to plot percentile-based Shewhart charts either individual or joint and summary statistics with guaranted in-control performace. Also, it determine the optimal parmeters n (sample size), h (sampling inetrval), k (control chart constant) for average chart, lp and up (lower and upper percentiles of the relative range/std.dev/variance distribution) for Statistcal Design of Percentile-based control charts.
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, Zsolt T. Kosztyan*
e-mail: [email protected]
Faraz A, Saniga E, Montgomery D. (2019). Percentile-based control charts design with an application to Shewhart Xbar and S2 control charts. Quality and Reliability Engineering International, 35(1); 116-126.
pbcc
, odpbc
, summary.pbcc
, plot.pbcc
.
Determine the optimal statistical design parmeters of either individual or joint Shewharts control charts for percentile-based designs (PL) approach with guaranteed in-control and out-of-control performances.
odpbc(nmax,T1, T2, hv, mat, p1=0.05,p2=0.05, d=1.0, delta=1.5, type= c("Xbar", "R", "S", "S2", "Xbar-R", "Xbar-S", "Xbar-S2"),pop.size=1000, sided="two")
odpbc(nmax,T1, T2, hv, mat, p1=0.05,p2=0.05, d=1.0, delta=1.5, type= c("Xbar", "R", "S", "S2", "Xbar-R", "Xbar-S", "Xbar-S2"),pop.size=1000, sided="two")
nmax |
The maximum possible sample size in each sampling interval (a numeric value). |
T1 |
The desired in-control time to signal (a numeric value). |
T2 |
The desired out-of-control time to signal (a numeric value). |
hv |
The vector of intersample interval upto maximum T2 (a numeric vector of possible sample intervals). |
mat |
The matrix of minimum and maximum bounds for optimum parameters sample size and sample interval. The minimum values of n and h are (2,0.5) and maximum value are (nmax, T2). |
p1 |
The probability to signal in-control from a specified number (default value is 5%) |
p2 |
The probability to signal out-of-control from a specified number (default value is 5%) |
d |
The expected shift size in the process average in term of standrd deviation, i.e. d= |u1-uo|/delta (default value is 1.0). When the process is in-control w.r.t process average, set d=0. |
delta |
The expected shift size in the process variance (default value is 1.5). When the process is in-control w.r.t process variation, set delta=1.0 |
type |
A character string specifying the type of Shewhart control chart either individual or joint.Available types are; "Xbar", "R", "S", "S2", "Xbar-R", "Xbar-S" and "Xbar-S2". |
pop.size |
Population size. This is the number of individuals genoud uses to solve the optimization problem for genetic algorithem (default value is 1000). |
sided |
A character string specifying the calculation of either one-sided or two-sided control limits of Shewhart dispersion charts based on PL approach (default type is two-sided). |
Returns the optimal parameters of PL type control chart:
n |
The optimal sample size to design the percentile-based either individual or joint control chart. |
h |
The optimal intersampling interval to design the percentile-based either individual or joint control chart. |
k |
The optimal control chart constant/multiplier to design the percentile-based xbar control chart. |
lp |
The optimal lower percentile point of relative sample range/standard deviation/variance distribution to calculate the lower control limits of percentile-based dispersion control chart. |
or/and
up |
The optimal upper percentile point of relative sample range/standard deviation/variance distribution to calculate the lower control limits of percentile-based dispersion control chart. |
Aamir Saghir, Zsolt T. Kosztyan*
e-mail: [email protected]
Faraz A, Saniga E, Montgomery D. (2019). Percentile-based control charts design with an application to Shewhart Xbar and S2 control charts. Quality and Reliability Engineering International, 35(1); 116-126.
# Calculation of optimal parameters of the percentile-based control charts #using "pbcc"" package. # Set the maximum possible sample size in each h units is 10. nmax=10 # Set the process in-control time to signal is at least 100 samples. T1=100 # Set the control chart time to signal is at most 1 samples # when shift occur in the process mean or/and std.dev. T2=3 # Set the sampling intersample intervals to 0.5(0.5) T2 units of time. hv=seq(0.5, T2, by=0.5) #Set the lower and upper bounds of parameters(n and h) used in the optimization. mat=matrix(c(2, nmax, 1, length(hv)), 2,2, byrow=TRUE) p1=0.05 # Set the probability of guaranteed in-control signals is 5%. p2=0.05 # Set the probability of guaranteed out-of-control signals is 5%. # Optimal parameters of two-sided percentile-based Xbar control chart. d=3 # Set the shift size in the process mean is 3 (large shift). Q1<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta=1.5, type= "Xbar") # Optimal parameters of one-sided percentile-based variance control chart. delta=2 # Set the shift size in the process dispersion is 2 (moderate shift). Q2<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d=1.0, delta, type= "S2", sided="one") # Optimal parameters of two-sided percentile-based joint Xbar& S control chart. d=1.0 # Set the shift size in the process mean is 1 (small shift). delta=2 # Set the shift size in the process dispersion is 2 (moderate shift). Q3<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta, type= "Xbar-S")
# Calculation of optimal parameters of the percentile-based control charts #using "pbcc"" package. # Set the maximum possible sample size in each h units is 10. nmax=10 # Set the process in-control time to signal is at least 100 samples. T1=100 # Set the control chart time to signal is at most 1 samples # when shift occur in the process mean or/and std.dev. T2=3 # Set the sampling intersample intervals to 0.5(0.5) T2 units of time. hv=seq(0.5, T2, by=0.5) #Set the lower and upper bounds of parameters(n and h) used in the optimization. mat=matrix(c(2, nmax, 1, length(hv)), 2,2, byrow=TRUE) p1=0.05 # Set the probability of guaranteed in-control signals is 5%. p2=0.05 # Set the probability of guaranteed out-of-control signals is 5%. # Optimal parameters of two-sided percentile-based Xbar control chart. d=3 # Set the shift size in the process mean is 3 (large shift). Q1<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta=1.5, type= "Xbar") # Optimal parameters of one-sided percentile-based variance control chart. delta=2 # Set the shift size in the process dispersion is 2 (moderate shift). Q2<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d=1.0, delta, type= "S2", sided="one") # Optimal parameters of two-sided percentile-based joint Xbar& S control chart. d=1.0 # Set the shift size in the process mean is 1 (small shift). delta=2 # Set the shift size in the process dispersion is 2 (moderate shift). Q3<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta, type= "Xbar-S")
Determine the optimal statistical design parmeters of percentile-based p-chart.
odpbc_binom(nmax, T1, T2, hv, mat, ip, sp, p1=0.05, p2=0.05, pop.size = 1000)
odpbc_binom(nmax, T1, T2, hv, mat, ip, sp, p1=0.05, p2=0.05, pop.size = 1000)
nmax |
The maximum possible sample size in each sampling interval (a numeric value). |
T1 |
The desired in-control time to signal (a numeric value). |
T2 |
The desired out-of-control time to signal (a numeric value). |
hv |
The vector of intersample interval upto maximum T2 (a numeric vector of possible sample intervals). |
mat |
The matrix of minimum and maximum bounds for optimum parameters sample size and sample interval. The minimum values of n and h are (2,0.5) and maximum value are (nmax, T2).However minimun sample size should be selected according to recommended no |
ip |
In-control value of monitoring parameter (a numeric value between 0 and 1) |
sp |
Shifted-value of monitoring parameter (a numeric value between 0 and 1) |
p1 |
The probability to signal in-control from a specified number (default value is 5%) |
p2 |
The probability to signal out-of-control from a specified number (default value is 5%) |
pop.size |
Population size. This is the number of individuals genoud uses to solve the optimization problem for genetic algorithem (default value is 1000). |
Returns the optimal parameters of PL type control chart:
n |
The optimal sample size to design the percentile-based p-chart. |
h |
The optimal intersampling interval to design the percentile-based p-chart. |
k |
The optimal control chart constant/multiplier to design the percentile p-chart |
Aamir Saghir, Khan Zahid, Zsolt T. Kosztyan*
e-mail: [email protected]
Faraz A, Saniga E, Montgomery D. (2019). Percentile-based control charts design with an application to Shewhart Xbar and S2 control charts. Quality and Reliability Engineering International, 35(1); 116-126.
pbcc
,summary.pbcc
,plot.pbcc
,odpbc
.
# set maximum sample size nmax=500 # Set the process in-control time to signal is at least 100 samples. T1= 100 # Set the out-of-control chart time to signal is at most 1 sample T2=3 # Set the sampling intersample intervals to 0.5(0.5) T2 units of time. hv=seq(0.5, T2, by=0.5) # Set the probability of guaranteed in-control signal 5%/10%/15% p1=0.05 #Set the probability of guaranteed out-of-control signals 5%/10%/15% p2=0.05 #Set the lower and upper bounds of parameters(n and h) used in the optimization. # 81 minimum value is taken to hold the normality condition np>=5 or n(1-p)>=5 mat=matrix(c(2, nmax, 1, length(hv)), 2,2, byrow=TRUE) # In-control value of monitoring parameter p ip=0.10 # out of control value of monitoring parameter p sp=0.15 output<-odpbc_binom(nmax, T1, T2, hv, mat, ip, sp, p1, p2, pop.size = 1000) print(output)
# set maximum sample size nmax=500 # Set the process in-control time to signal is at least 100 samples. T1= 100 # Set the out-of-control chart time to signal is at most 1 sample T2=3 # Set the sampling intersample intervals to 0.5(0.5) T2 units of time. hv=seq(0.5, T2, by=0.5) # Set the probability of guaranteed in-control signal 5%/10%/15% p1=0.05 #Set the probability of guaranteed out-of-control signals 5%/10%/15% p2=0.05 #Set the lower and upper bounds of parameters(n and h) used in the optimization. # 81 minimum value is taken to hold the normality condition np>=5 or n(1-p)>=5 mat=matrix(c(2, nmax, 1, length(hv)), 2,2, byrow=TRUE) # In-control value of monitoring parameter p ip=0.10 # out of control value of monitoring parameter p sp=0.15 output<-odpbc_binom(nmax, T1, T2, hv, mat, ip, sp, p1, p2, pop.size = 1000) print(output)
Create an object of class 'pbcc'
to perform statistical quality control based on percentile-based designs (PL) approach. This object may then be used to plot percentile-based Shewhart charts either individual or joint, summary statistics and more with guaranted in-control performace.
pbcc(data,T1, p1, type=c("Xbar", "R", "S", "S2", "Xbar-R","Xbar-S","Xbar-S2"), sided="two", k=NULL, lp=NULL, up=NULL)
pbcc(data,T1, p1, type=c("Xbar", "R", "S", "S2", "Xbar-R","Xbar-S","Xbar-S2"), sided="two", k=NULL, lp=NULL, up=NULL)
data |
A data frame, a matrix or a vector containing observed data for the variable to chart. Each row of a data frame or a matrix, and each value of a vector, refers to a sample or ”rationale group”. |
T1 |
The desired in-control time to signal (a numeric value, defualt value is 100). |
p1 |
The probability to signal in-control from a specified number (a numeric value, default value is 5%) |
type |
A character string specifying the type of Shewhart control chart either individual or joint.Available types are; "Xbar", "R", "S", "S2", "Xbar-R", "Xbar-S" and "Xbar-S2". |
sided |
A character string specifying the calculation of either one-sided or two-sided control limits of Shewhart dispersion charts based on PL approach (default type is two-sided). |
k |
The optimal control chart constant/multiplier to design the percentile-based X-bar control chart either individually or jointly. |
lp |
The optimal lower percentile point to calculate the lower control limits of the percentile-based dispersion control chart. or/and |
up |
The optimal upper percentile point to calculate the lower control limits of the percentile-based dispersion control chart. |
Returns an object of class 'pbcc'
with "data.name", "type" and values of "sizes", "std.dev", "statistics" and "control limits" of individual or joint Shewhart control chart.
Aamir Saghir, Zsolt T. Kosztyan*
e-mail: [email protected]
Faraz A, Saniga E, Montgomery D. (2019). Percentile-based control charts design with an application to Shewhart Xbar and S2 control charts. Quality and Reliability Engineering International, 35(1); 116-126.
#Calculation of the percentile-based control charts using "pbcc"" package for # "diameter" of pistonrings data. library(qcc) data(pistonrings) diameter = with(pistonrings, qcc.groups(diameter, sample)) T1=100 # Set the process in-control time to signal is at least 100 samples. p1=0.05 # Set the probability of guaranteed in-control signals is 5%. #Calculation of two-sided individual percentile-based Xbar control chart #for diameter data. Q11<- pbcc(diameter,T1, p1, type="Xbar") # Calculation of One-sided individual percentile-based S2 control chart # for diameter data. Q12<- pbcc(diameter,T1, p1, type="S2", sided="one") # Calculation of two-sided joint percentile-based Xbar and S control chart #for diameter data. Q13<- pbcc(diameter,T1, p1, type="Xbar-S", sided="two")
#Calculation of the percentile-based control charts using "pbcc"" package for # "diameter" of pistonrings data. library(qcc) data(pistonrings) diameter = with(pistonrings, qcc.groups(diameter, sample)) T1=100 # Set the process in-control time to signal is at least 100 samples. p1=0.05 # Set the probability of guaranteed in-control signals is 5%. #Calculation of two-sided individual percentile-based Xbar control chart #for diameter data. Q11<- pbcc(diameter,T1, p1, type="Xbar") # Calculation of One-sided individual percentile-based S2 control chart # for diameter data. Q12<- pbcc(diameter,T1, p1, type="S2", sided="one") # Calculation of two-sided joint percentile-based Xbar and S control chart #for diameter data. Q13<- pbcc(diameter,T1, p1, type="Xbar-S", sided="two")
Plot function for the Package of Percentile-based Control Charts (pbcc)
## S3 method for class 'pbcc' plot(x, title,...)
## S3 method for class 'pbcc' plot(x, title,...)
x |
an object of class 'pbcc'. |
title |
title of the plot |
... |
other graphical parameters. |
No return value, called for side effects
Aamir Saghir, Zsolt T. Kosztyan*
e-mail: [email protected]
Faraz, A., Saniga, E., Montgomery, D. (2019). Perentile-based control chart design with an application to Shewhart Xbar and S2 control charts. Quality and Reliability Engineering International, 35(1),116-126.
library(qcc) data(pistonrings) diameter = with(pistonrings, qcc.groups(diameter, sample)) T1=100 # Set the process in-control time to signal is at least 100 samples. p1=0.05 # Set the probability of guaranteed in-control signals is 5%. #Calculation of two-sided individual percentile-based Xbar for diameter data. Q11<- pbcc(diameter,T1, p1, type="Xbar") # Plot two-sided individual percentile-based Xbar for diameter data. plot(Q11) # Calculation of One-sided individual percentile-based S2 for diameter data. Q12<- pbcc(diameter,T1, p1, type="S2", sided="one") # # Plot one-sided individual percentile-based S2 for diameter data. plot(Q12) # Calculation of two-sided joint percentile-based Xbar and S for diameter data. Q13<- pbcc(diameter,T1, p1, type="Xbar-S", sided="two") # Plot two-sided joint percentile-based Xbar-S control chart for diameter data. plot(Q13)
library(qcc) data(pistonrings) diameter = with(pistonrings, qcc.groups(diameter, sample)) T1=100 # Set the process in-control time to signal is at least 100 samples. p1=0.05 # Set the probability of guaranteed in-control signals is 5%. #Calculation of two-sided individual percentile-based Xbar for diameter data. Q11<- pbcc(diameter,T1, p1, type="Xbar") # Plot two-sided individual percentile-based Xbar for diameter data. plot(Q11) # Calculation of One-sided individual percentile-based S2 for diameter data. Q12<- pbcc(diameter,T1, p1, type="S2", sided="one") # # Plot one-sided individual percentile-based S2 for diameter data. plot(Q12) # Calculation of two-sided joint percentile-based Xbar and S for diameter data. Q13<- pbcc(diameter,T1, p1, type="Xbar-S", sided="two") # Plot two-sided joint percentile-based Xbar-S control chart for diameter data. plot(Q13)
Print statistics, summary of statistics, control limits, optimal design parameters of Percentile-based control charts with guaranted in-control or/and out-of-control performances.
## S3 method for class 'pbcc' summary(object, digits = getOption("digits"), ...) ## S3 method for class 'odpbc' summary(object, digits = getOption("digits"), ...)
## S3 method for class 'pbcc' summary(object, digits = getOption("digits"), ...) ## S3 method for class 'odpbc' summary(object, digits = getOption("digits"), ...)
object |
an object of class 'pbcc' or 'odpbc'. |
digits |
the number of significant digits to use when |
... |
additional arguments affecting the summary produced. |
No return value, called for side effects
Aamir Saghir, Zsolt T. Kosztyan*
e-mail: [email protected]
Faraz, A., Saniga, E., Montgomery, D. (2019). Perentile-based control chart design with an application to Shewhart Xbar and S2 control charts. Quality and Reliability Engineering International, 35(1),116-126.
# Print summary of calculation of two-sided individual percentile-based xbar # control chart for diameter data with guaranted in-control performance. library(qcc) data(pistonrings) diameter = with(pistonrings, qcc.groups(diameter, sample)) T1=100 # Set the process in-control time to signal is at least 100 samples. p1=0.05 # Set the probability of guaranteed in-control signals is 5%. #Calculation of two-sided individual percentile-based Xbar for diameter data. Q11<- pbcc(diameter,T1, p1, type="Xbar") summary(Q11) # summarize the results # Print summary of Calculation of two-sided joint percentile-based Xbar # and S control chart for diameter data with guaranted in-control performance. # Calculation of two-sided joint percentile-based Xbar and S for diameter data. Q13<- pbcc(diameter,T1, p1, type="Xbar-S", sided="two") summary(Q13) # summarize the results # Print summary of optimal design parameters of percentile-based Xbar chart # with guaranted in-control and out-of-control performances. nmax=10 # Set the maximum possible sample size in each h units is 10. T1=100 # Set the process in-control time to signal is at least 100 samples. # Set the control chart time to signal is at most 1 samples when shift occur #in the process mean or/and std.dev. T2=3 # Set the sampling intersample intervals to 0.5(0.5) T2 units of time. hv=seq(0.5, T2, by=0.5) #Set the lower and upper bounds of parameters(n and h) used in the optimization. mat=matrix(c(2, nmax, 1, length(hv)), 2,2, byrow=TRUE) p1=0.05 # Set the probability of guaranteed in-control signals is 5%. p2=0.05 # Set the probability of guaranteed out-of-control signals is 5%. d=3 # Set the shift size in the process mean is 3 (large shift). Q1<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta=1.5, type= "Xbar") summary(Q1) # summarize the results # Summary of percentile-based design of joint xbar and s chart with guaranted #in-control and out-of-control performances. d=1.0 # Set the shift size in the process mean is 1 (small shift). delta=2 # Set the shift size in the process dispersion is 2 (moderate shift). Q3<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta, type= "Xbar-S") summary(Q3) # summarize the results
# Print summary of calculation of two-sided individual percentile-based xbar # control chart for diameter data with guaranted in-control performance. library(qcc) data(pistonrings) diameter = with(pistonrings, qcc.groups(diameter, sample)) T1=100 # Set the process in-control time to signal is at least 100 samples. p1=0.05 # Set the probability of guaranteed in-control signals is 5%. #Calculation of two-sided individual percentile-based Xbar for diameter data. Q11<- pbcc(diameter,T1, p1, type="Xbar") summary(Q11) # summarize the results # Print summary of Calculation of two-sided joint percentile-based Xbar # and S control chart for diameter data with guaranted in-control performance. # Calculation of two-sided joint percentile-based Xbar and S for diameter data. Q13<- pbcc(diameter,T1, p1, type="Xbar-S", sided="two") summary(Q13) # summarize the results # Print summary of optimal design parameters of percentile-based Xbar chart # with guaranted in-control and out-of-control performances. nmax=10 # Set the maximum possible sample size in each h units is 10. T1=100 # Set the process in-control time to signal is at least 100 samples. # Set the control chart time to signal is at most 1 samples when shift occur #in the process mean or/and std.dev. T2=3 # Set the sampling intersample intervals to 0.5(0.5) T2 units of time. hv=seq(0.5, T2, by=0.5) #Set the lower and upper bounds of parameters(n and h) used in the optimization. mat=matrix(c(2, nmax, 1, length(hv)), 2,2, byrow=TRUE) p1=0.05 # Set the probability of guaranteed in-control signals is 5%. p2=0.05 # Set the probability of guaranteed out-of-control signals is 5%. d=3 # Set the shift size in the process mean is 3 (large shift). Q1<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta=1.5, type= "Xbar") summary(Q1) # summarize the results # Summary of percentile-based design of joint xbar and s chart with guaranted #in-control and out-of-control performances. d=1.0 # Set the shift size in the process mean is 1 (small shift). delta=2 # Set the shift size in the process dispersion is 2 (moderate shift). Q3<- odpbc(nmax, T1, T2, hv, mat, p1, p2, d, delta, type= "Xbar-S") summary(Q3) # summarize the results