cautiousLearning {CautiousLearning}  R Documentation 
This function applies and, optionally, plots a control chart based on the cautious learning approach described in Capizzi and Masarotto (2019).
cautiousLearning(chart, x, mu0, s0, plot = TRUE)
chart 
list with the same elements as those returned by

x 
numeric vector containing the Phase II data. 
mu0, s0 
estimates of the incontrol mean and standard deviation obtained by the Phase I reference sample. 
plot 
if 
The function returns (invisibly when plot==TRUE
) a numeric matrix
containing
column 1 for X and EWMA, columns 12 for CUSUM 
control statistic[s] 
columns 24 for X and EWMA, columns 35 for CUSUM 
central line, lower and upper control limits 
columns 57 for X and EWMA, columns 68 for CUSUM 
"cautious" estimates of the mean, standard deviation and critical value, i.e., using the notation in Capizzi and Masarotto (2019), mu.hat[id[i]], sigma.hat[id[i]] and L[id[i]]. 
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.
## EWMA control chart (nominal ARL=500, ## initial estimates based on 100 incontrol observations) chart < list(chart = "EWMA", lambda = 0.2, limit = c(Linf=3.187, Delta=0.427, A=1.5, B=50, m=100)) ## Phase I estimates set.seed(12345) xic < rnorm(100, 12 , 3) m0 < mean(xic) s0 < sd(xic) ## Phase II observations (one sigma mean shift starting at i=501) x < c(rnorm(500, 12, 3), rnorm(50, 15, 3)) ## Monitoring y < cautiousLearning(chart, x, m0, s0) head(y) tail(y)