Description Usage Arguments Value Examples
View source: R/UnivariateObtainAverageRunLength.R
Get the ARL getRL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25  getARL(
n,
m,
theta = NULL,
Ftheta = NULL,
dist,
mu,
sigma,
dist.par = c(0, 1, 1),
chart,
chart.par,
scoring = "Z",
Chi2corrector = "None",
replicates = 10000,
isParallel = TRUE,
print.RL = FALSE,
progress = FALSE,
calibrate = FALSE,
arl0 = 370,
alignment = "unadjusted",
constant = NULL,
absolute = FALSE,
isFixed = FALSE,
rounding.factor = NULL
)

n 
scalar. Subroup size 
m 
scalar. Reference sample size 
theta 
scalar. Value corresponig with the 
Ftheta 
scalar. Quantile of the data distribution. The values that take are between (0,1). 
dist 
character string. Select from:

mu 
vector. Two elements, the first one is the mean of the reference sample and the second one is the mean of the monitoring sample. 
sigma 
vector. Two elements, the first one is the sd of the reference sample and the second one is the sd of the monitoring sample. 
dist.par 
vector. Distribution parameters. 
chart 
character string. Selected type of chart. Three options are available: Shewhart, CUSUM, EWMA 
chart.par 
vector. The size depends on the selected chart:

scoring 
character string. If "Z" (normal scores) (default). If "ZSQ" (normal scores squared). 
Chi2corrector 
character string. Only when scoring is ZSQ. Select from
If "approx" () (default). If "exact" (normal scores squared). 
replicates 
scalar. Number of replicates to get the ARL 
isParallel 
logical. If 
print.RL 
logical. If 
progress 
logical. If 
calibrate 
logical. If 
arl0 
scalar. Expected value of the RL. Default 
alignment 
character string. Aligment of the data

constant 
scalar. Only used when the 
absolute 
logical. If 
isFixed 
logical. If 
rounding.factor 
scalar. positive value that determine the range between two consecutive rounded values. 
Multiple output. Select by output$
ARL
: scalar. Average Run Length for the RL
s of all the replicates
.
SDRL
: scalar. Standard Deviation Run Length for the RL
in all the replicates
.
MRL
: bolean. Median Run Length for the RL
s of all the replicates
.
QRL
: vector. It retrieve the quantiles (0.05, 0.1, 0.2, 0.25, 0.5, 0.75, 0.8, 0.9, 0.95) for all the RL
s.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44  n < 5 # subgroup size
m < 100 # referencesample size
dist < "Normal"
mu < c(0, 0) # c(reference sample mean, monitoring sample mean)
sigma < c(1, 1) # c(reference sample sd, monitoring sample sd)
#### Normal distribution parameters
dist.par < c(0, 1) # c(location, scale)
#### Other Parameters
replicates < 2
print.RL < TRUE
isParallel < FALSE
calibrate < FALSE
progress < TRUE
arl0 < 370
#### Control chart parameters
chart < "Shewhart"
chart.par < c(3)
shewhart < getARL(n, m,
theta = NULL, Ftheta = NULL, dist, mu, sigma, dist.par = dist.par,
chart = chart, chart.par = chart.par, print.RL = print.RL,
replicates = replicates, isParallel = isParallel,
calibrate = calibrate, arl0 = arl0
)
chart < "CUSUM"
chart.par < c(0.25, 4.4181, 3)
cusum < getARL(n, m,
theta = NULL, Ftheta = NULL, dist, mu, sigma, dist.par = dist.par,
chart = chart, chart.par = chart.par, print.RL = print.RL,
replicates = replicates, isParallel = isParallel,
calibrate = calibrate, arl0 = arl0
)
chart < "EWMA"
chart.par < c(0.2, 2.962)
shewhart < getARL(n, m,
theta = NULL, Ftheta = NULL, dist, mu, sigma, dist.par = dist.par,
chart = chart, chart.par = chart.par, print.RL = print.RL,
replicates = replicates, isParallel = isParallel,
calibrate = calibrate, arl0 = arl0
)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.