SNS {SNSchart} | R Documentation |
Sequential Normal Scores
Description
Transform a vector X
into SNS using initial observations Y
if available
SNS follow the order of X
.
Usage
SNS(
X,
X.id,
Y = NULL,
theta = NULL,
Ftheta = NULL,
scoring = "Z",
Chi2corrector = "None",
alignment = "unadjusted",
constant = NULL,
absolute = FALSE,
chart = "Shewhart",
chart.par = c(3),
snsRaw = FALSE,
isFixed = FALSE,
omit.id = NULL,
auto.omit.alarm = TRUE
)
Arguments
X |
vector. New observations to obtain the N¡normal scores. |
X.id |
vector. The id of the vector |
Y |
vector. If |
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). |
alignment |
character string. Aligment of the data
|
constant |
scalar. Only used when the |
absolute |
logical. If |
chart |
character string. Selected type of chart. Three options are available: Shewhart, CUSUM, EWMA |
chart.par |
vector. The size depends on the selected chart:
|
snsRaw |
logical. If |
isFixed |
logical. If |
omit.id |
vector. Elements of the vector are the id which are omitted in the analysis. |
auto.omit.alarm |
logical. Determine if OC signals are added (or not) to reference sample. By default is set to TRUE. |
Value
Multiple output. Select by output$
-
coefficients
: list. Three elements:n
the number of observation per group inX
,chart
the selected chart to perform the analysis, andchart.par
the parameters of the selected chart. -
R
: vector. Ranks for the new observations (Monitoring sample). -
X
: vector. New observations (Monitoring sample) to obtain the SNS. -
Z
: vector. SNS of theX
monitoring sample. -
X.id
: vector. The id of each column (variable) of the matrixX
. -
UCL
: vector. Upper control limit for each group inX
. -
LCL
: vector. Lower control limit for each group inX
. -
scoring
: string. Selected score to evaluate SNS.
Comments
If ties occur, average ranks are used.
See Also
NS
for normal scores
Examples
# EXAMPLE CONDITIONAL WITH REFERENCE SAMPLE
Y <- c(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
X <- c(30, 35, 45)
theta <- 40
Ftheta <- 0.5
sample.id <- c("a", "b", "c")
SNS(X = X, X.id = sample.id, Y = Y, theta = theta, Ftheta = Ftheta)
# EXAMPLE CONDITIONAL WITH REFERENCE SAMPLE
Y <- c(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
X <- c(30, 35, 45)
theta <- 40
Ftheta <- 0.5
sample.id <- c("a", "b", "c")
SNS(X = X, X.id = sample.id, Y = Y, theta = theta, Ftheta = Ftheta)
# EXAMPLE UNCONDITIONAL WITH REFERENCE SAMPLE
Y <- c(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
X <- c(30, 35, 45)
theta <- NULL
Ftheta <- NULL
sample.id <- c("a", "b", "c")
SNS(X = X, X.id = sample.id, Y = Y, theta = theta, Ftheta = Ftheta)
# EXAMPLE CONDITIONAL WITHOUT REFERENCE SAMPLE
Y <- NULL # c(10,20,30,40,50,60,70,80,90,100)
X <- c(30, 35, 45)
theta <- 40
Ftheta <- 0.5
sample.id <- c("a", "b", "c")
SNS(X = X, X.id = sample.id, Y = Y, theta = theta, Ftheta = Ftheta)
# EXAMPLE UNCONDITIONAL WITHOUT REFERENCE SAMPLE
Y <- NULL
X <- c(30, 35, 45)
theta <- NULL
Ftheta <- NULL
sample.id <- c("a", "b", "c")
SNS(X = X, X.id = sample.id, Y = Y, theta = theta, Ftheta = Ftheta)