Description Usage Arguments Value Author(s) References Examples
View source: R/cautiousLearning.R
This function applies and, optionally, plots a control chart based on the cautious learning approach described in Capizzi and Masarotto (2019).
1 | 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 in-control 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 1-2 for CUSUM |
control statistic[s] |
columns 2-4 for X and EWMA, columns 3-5 for CUSUM |
central line, lower and upper control limits |
columns 5-7 for X and EWMA, columns 6-8 for CUSUM |
"cautious" estimates of the mean, standard deviation and critical value, i.e., using the notation in Capizzi and Masarotto (2019), mu.hat[i-d[i]], sigma.hat[i-d[i]] and L[i-d[i]]. |
Giovanna Capizzi and Guido Masarotto
Capizzi, G. and Masarotto, G. (2019) "Guaranteed In-Control 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## EWMA control chart (nominal ARL=500,
## initial estimates based on 100 in-control 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.