# NOT RUN {
## 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)
# }
Run the code above in your browser using DataLab