View source: R/UnivariateSequentialNormalScores.R
SNS.test | R Documentation |
Transform a vector X
into SNS using initial observations Y
if available
SNS follow the order of X
.
SNS.test( X, X.id, Y = NULL, theta = NULL, Ftheta = NULL, scoring = "Z", Chi2corrector = "None", tie.correction = "None", alignment = "unadjusted", constant = NULL, absolute = FALSE, chart = "Shewhart", chart.par = c(3), snsRaw = FALSE, isFixed = FALSE, omit.id = NULL, auto.omit.alarm = TRUE )
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). |
tie.correction |
string. Select from |
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. |
If ties occur, average ranks are used.
NS.test
for normal scores
# 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.test(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.test(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.test(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.test(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.test(X = X, X.id = sample.id, Y = Y, theta = theta, Ftheta = Ftheta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.