simulation {CautiousLearning}  R Documentation 
Function ruv
simulates the standardized
estimation errors at the starting of the monitoring phase
(see Section 2.3 of Capizzi and Masarotto (2019)).
Function rcrl
simulates, under different incontrol or
outcontrol scenarios, the conditional runlength given
the standardized estimation errors. When openMP is supported,
computation can be distribuited on multiple cores.
See omp
.
ruv(n, m) rcrl(n, chart, u, v, tau, delta, omega, maxrl = 1000000L)
n 
number of simulated values. 
m 
number of incontrol observations available at the starting of the monitoring phase. 
chart 
list with the same elements as those returned by

u, v 
values of the estimation errors (scalars). 
tau, delta, omega 
when i<tau, observations are distributed as N(mu,sigma^2) random variables; when i>=tau, observations are distributed as N(mu+delta*sigma, (omega*sigma)^2) random variables. 
maxrl 
runlength are truncated at i=maxrl. 
ruv 
numeric matrix of dimension nx2. 
rcrl 
integer vector of length n. 
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.
ruv(5, 100) ## 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)) rcrl(10, chart, 2, 1, 50, 2, 1)