This function is used to compute statistics required by the Non Parametric S chart.
Usage
npqcs.S(x, ...)
# S3 method for default
npqcs.S(
x,
G,
data.name = NULL,
limits = NULL,
method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"),
alpha = 0.01,
plot = FALSE,
standardize = FALSE,
...
)
# S3 method for npqcd
npqcs.S(
x,
data.name,
limits = NULL,
method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"),
alpha = 0.01,
plot = FALSE,
standardize = F,
...
)
Arguments
- x
An object of class "npqcd".
- ...
Arguments passed to or from methods.
- G
The x as a matrix, data frame or list. If it is a matrix or data frame, then each row is viewed as one multivariate observation.
- data.name
A string that specifies the title displayed on the plots. If not provided it is taken from the name of the object
x
.- limits
A two-value vector specifying the control limits lower and central.
- method
Character string which determines the depth function used.
method
can be "Tukey" (the default), "Liu", "Mahalanobis", "RP" Random Project or "LD" Likelihood depth.- alpha
It is the significance level (by default
alpha
= 0.01)- plot
Logical value. If
TRUE
a S chart should be plotted.- standardize
A logical value indicating data should be standardized.
Examples
if (FALSE) {
##
## Continuous data
##
set.seed(12345)
mu<-c(0,0)
Sigma<- matrix(c(1,0,0,1),nrow = 2,ncol = 2)
u <- c(2,2)
S <- matrix(c(4,0,0,4),nrow = 2,ncol = 2)
G <- rmvnorm(540, mean = mu, sigma = Sigma)
x<- rmvnorm(40,mean=u,sigma = S)
x.a <- rbind(G[501:540,],x)
M <- G[1:500,]
data.npqcd <- npqcd(x.a,M)
res.npqcs <- npqcs.S(data.npqcd,method = "Liu", alpha=0.05)
summary(res.npqcs)
plot(res.npqcs,title =" S Control Chart")}