design {CautiousLearning}  R Documentation 
These functions compute the control limits
of X (x.cl
), EWMA (ewma.cl
) and CUSUM (cusum.cl
)
control charts based on the cautious learning approach.
The stochastic approximation algorithm, described in
the Appendix A of Capizzi and Masarotto (2019), is used.
When openMP is supported, computation can be distribuited on multiple cores.
See omp
.
x.cl(m, arl0, alpha = 0.1, beta = 0.05, H = 200, A = 1.5, B = 50, Ninit = 1000, Nfinal = 30000) ewma.cl(lambda, m, arl0, alpha = 0.1, beta = 0.05, H = 200, A = 1.5, B = 50, Ninit = 1000, Nfinal = 30000) cusum.cl(k, m, arl0, alpha = 0.1, beta = 0.05, H = 200, A = 1.5, B = 50, Ninit = 1000, Nfinal = 30000)
lambda 
EWMA smoothing constant. 
k 
CUSUM reference value. 
m 
number of incontrol observations used to estimate the process mean and standard deviation at the beginning of the monitoring phase. 
arl0, alpha, beta, H 
desired incontrol average runlength and constants defining the empirical guaranteed incontrol performance condition. See equations (2) and (6) in Capizzi and Masarotto (2019). 
A, B 
constants controlling when the parameters estimate are updated.
See equation (3) in Capizzi and Masarotto (2019).
If 
Ninit, Nfinal 
number of iterations used in the stochastic approximation algorithm. See Capizzi and Masarotto (2019), Appendix A. 
A list with the following elements:
chart 
string describing the control chart ("X", "EWMA" or "CUSUM"). 
lambda 
EWMA smoothing constant (only when

k 
CUSUM reference value (only when

limit 
numeric vector of length equal to five containing the constants defining the cautiuos learning control limits, i.e, Linf, Delta, A, B and m (see equation (3) and (4) in Capizzi and Masarotto (2019)). 
Giovanna Capizzi and Guido Masarotto
Capizzi, G. and Masarotto, G. (2019) "Guaranteed InControl Control Chart Performance with Cautious Parameter Learning", accepted for publication in Journal of Quality Technology, a copy of the paper can be obtained from the authors.
## Only for testing: the number of iterations is reduced ## to reduce the computing time Ninit < 50 Nfinal < 100 H < 50 x.cl(100, 500, Ninit=Ninit, Nfinal=Nfinal, H=H) x.cl(100, 500, A=NA, B=NA, Ninit=Ninit, Nfinal=Nfinal, H=H) ewma.cl(0.2, 100, 500, Ninit=Ninit, Nfinal=Nfinal, H=H) cusum.cl(1, 100, 500, Ninit=Ninit, Nfinal=Nfinal, H=H) ## Using the default number of iterations x.cl(100, 500) x.cl(100, 500, A=NA, B=NA) ewma.cl(0.2,100, 500) cusum.cl(1, 100, 500)