mcalibrateControlLimit: Calibration of the control limit for the selected chart

Description Usage Arguments Value Note Examples

View source: R/MultivariateCalibratePerformanceMeasure.R

Description

The methodology used to calibrate the control limit for the SNS chart depending on the selected chart

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
mcalibrateControlLimit(
  targetARL = NULL,
  targetMRL = NULL,
  n,
  m,
  nv,
  theta = NULL,
  Ftheta = NULL,
  dists = c("Normal", "Normal"),
  mu = c(0, 0),
  sigma = NULL,
  dists.par = matrix(c(0, 1, 1, 0, 1, 1), ncol = 2),
  correlation = 0,
  chart = "T2",
  chart.par = c(10),
  replicates = 50000,
  isParallel = FALSE,
  maxIter = 20,
  progress = TRUE,
  alignment = "unadjusted",
  constant = NULL,
  absolute = FALSE
)

Arguments

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

nv

scalar. Number of variables to be generated.

theta

vector. Value corresponding with the Ftheta quantile.

Ftheta

vector. Quantile of the data distribution. The values that take are between (0,1).

dists

list. Select the

mu

vector. Two elements of the vector the first one is the mean of the reference sample and the second one is the mean of the monitoring sample.

sigma

scalar. Standard deviation of the desired distribution.

dists.par

matrix For each variable (column), specify

  • par.location: Location parameter of the desired distribution. Default 0.

  • par.scale: Scale parameter of the desired distribution. Default 1.

  • par.shape: Shape parameter of the desired distribution, Default 1.

The number of columns must be the same as the number of variables.

correlation

scalar. Corralation between variables.

chart

character string. Selected type of chart. One option available: "T2".

T2 scheme:

is c(k), where k comes from UCL = mu + kσ, LCL = mu - kσ.

chart.par

vector. Control limit and other parameters of the selected chart.

replicates

scalar. Number of replicates to get the ARL

isParallel

logical. If TRUE the code runs in parallel according to the number of cores in the computer,otherwise the code runs sequentially. Default TRUE.

maxIter

scalar. is a numeric. The maximum number of iteration to take the calibration before stops

progress

logical. If TRUE it shows the progress in the console.

alignment

character string. Aligment of the data X and Y. Select from

  • "unadjusted": nothing is sustracte from X and Y (default).

  • "overallmean": overall mean is sustracted from X and Y.

  • "overallmedian": overall median is sustracted from X and Y.

  • "samplemean": mean from corresponding group (X and Y) is sustracted from its corresponing vector.

  • "samplemedian": median from corresponding group (X and Y) is sustracted from its corresponing vector.

  • "referencemean": mean from Y is subtracted from X and Y.

  • "referencemedian": median from Y is subtracted from X and Y.

  • "constantvalue": a constant value is subtracted from X and Y.

constant

scalar. Only used when the alignment is selected "constantvalue". Default NULL.

absolute

logical. If TRUE, the absolute aligned values are obtained. (Default FALSE)

Value

Multiple output. Select by output$

Note

The argument chart.par in this function correspond to the initial parameters to start the calibration.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
n <- 5 # subgroup size
m <- 10 # reference-sample size
dists <- c("Normal", "Normal") # distribution
mu <- c(0, 0) # c(reference sample mean, monitoring sample mean)
nv <- 2 # number of variables
#### Other Parameters
replicates <- 2
targetARL <- 200
isParallel = FALSE
maxIter <- 2
#### Control chart parameters
chart <- "T2"
chart.par <- c(0.005)
t2 <- mcalibrateControlLimit(targetARL = targetARL,n = n, m = m, nv = nv, theta = NULL,
  Ftheta = NULL, dists = dists, mu = mu, chart.par = chart.par,
  replicates = replicates, chart = chart, isParallel = isParallel,
  maxIter = maxIter
)

SNSchart documentation built on April 7, 2021, 9:07 a.m.