View source: R/UnivariateCalibratePerformanceMeasure.R
calibrateControlLimit.test | R Documentation |
The methodology used to calibrate the control limit for the SNS chart depending on the selected chart
calibrateControlLimit.test( targetARL = NULL, targetMRL = NULL, n, m, theta = NULL, Ftheta = NULL, scoring = "Z", Chi2corrector = "None", dist, mu, sigma, dist.par = c(0, 1, 1), chart, chart.par, replicates = 50000, isParallel = TRUE, maxIter = 20, progress = TRUE, alignment = "unadjusted", constant = NULL, absolute = FALSE, isFixed = FALSE, rounding.factor = NULL )
targetARL |
scalar. is the target ARL to calibrate. By default is set to NULL |
targetMRL |
scalar. is the target ARL to calibrate. By default is set to 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). |
scoring |
character string. If "Z" (normal scores) (default). If "Z-SQ" (normal scores squared). |
Chi2corrector |
character string. Only when scoring is Z-SQ. Select from
If "approx" () (default). If "exact" (normal scores squared). |
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:
|
replicates |
scalar. Number of replicates to get the ARL |
isParallel |
logical. If |
maxIter |
scalar. is a numeric. The maximum number of iteration to take the calibration before stops |
progress |
logical. If |
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. |
The argument chart.par
in this function correspond to the initial parameters to start the calibration.
n <- 2 # subgroup size m <- 30 # reference-sample size dist <- "Normal" # distribution mu <- c(0, 0) # c(reference sample mean, monitoring sample mean) sigma <- c(1, 1) # c(reference sample sd, monitoring sample sd) #### Distribution parameters dist.par <- c(0, 1) # c(location, scale) #### Other Parameters replicates <- 2 targetARL <- 370 isParallel = FALSE #### Control chart parameters chart <- "Shewhart" chart.par <- c(3) shewhart <- calibrateControlLimit.test( targetARL = targetARL, targetMRL = NULL, n = n, m = m, theta = NULL, Ftheta = NULL, dist = dist, mu = mu, sigma = sigma, dist.par = dist.par, chart.par = chart.par, replicates = replicates, chart = chart, isParallel = isParallel ) chart <- "CUSUM" chart.par <- c(0.5, 2.5, 3) cusum <- calibrateControlLimit.test( targetARL = targetARL, targetMRL = NULL, n = n, m = m, theta = NULL, Ftheta = NULL, dist = dist, mu = mu, sigma = sigma, dist.par = dist.par, chart.par = chart.par, replicates = replicates, chart = chart, isParallel = isParallel ) chart <- "EWMA" chart.par <- c(0.2, 2.962) ewma <- calibrateControlLimit.test( targetARL = targetARL, targetMRL = NULL, n = n, m = m, theta = NULL, Ftheta = NULL, dist = dist, mu = mu, sigma = sigma, dist.par = dist.par, chart.par = chart.par, replicates = replicates, chart = chart, isParallel = isParallel )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.