# NOT RUN {
##
## 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")
# }
Run the code above in your browser using DataLab