mgetARL: Multivariate Average Run Length (ARL)

View source: R/MultivariateObtainAverageRunLength.R

mgetARLR Documentation

Multivariate Average Run Length (ARL)

Description

Get the ARL getRL.test

Usage

mgetARL(
  n,
  m,
  nv,
  theta = NULL,
  Ftheta = NULL,
  dists,
  dists.par = NULL,
  mu,
  sigma = NULL,
  chart = "T2",
  chart.par = c(0.005),
  correlation = 0,
  s = NULL,
  replicates = 10000,
  isParallel = TRUE,
  print.RL = FALSE,
  progress = FALSE,
  calibrate = FALSE,
  arl0 = 370,
  alignment = "unadjusted",
  constant = NULL,
  absolute = FALSE
)

Arguments

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

vector of character string. Distribution of each variable. The length mus be the same as the number of variables. Select from:

  • "Normal": Normal distribution (default).

  • "Gamma": Gamma 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.

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.

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.

correlation

scalar. Corralation between variables.

s

matrix. Correlation matrix of the variables

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.

print.RL

logical. If TRUE return the vectors of RL for each iteration.

progress

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

calibrate

logical. If TRUE the RL is limit to 10 times the target ARL.

arl0

scalar. Expected value of the RL. It is only used for stop the RL if exceeds 10 times its value. Default 370.

Examples

mgetARL(replicates=50,n=5,m=100,nv=2,mu=c(0,0),
dists = c("Normal", "Normal"), dists.par = matrix(c(0,1,1,0,1,1), ncol=2),
isParallel=FALSE)

LuisBenavides/SNS.test documentation built on June 25, 2022, 11:52 p.m.