fdqcs.rank | R Documentation |
This function is used to compute statistics required by the RFD chart.
fdqcs.rank(x, ...) ## S3 method for class 'fdqcd' fdqcs.rank( x, y = x, func.depth = depth.FM, alpha = 0.01, plot = TRUE, trim = 0.1, draw.control = NULL, ... )
x |
an R object (used to select the method). See details. |
... |
arguments passed to or from methods. |
y |
The set of new curves to evaluate the depth. fdqcd class object. The set of reference curves respect to which the depth is computed. fdqcd class object. |
func.depth |
Type of depth measure, by default depth.mode. |
alpha |
Quantile to determine the cutoff from the Bootstrap procedure |
plot |
a logical value indicating that it should be plotted. |
trim |
The porcentage of the trimming. |
draw.control |
ist that it specifies the col, lty and lwd for objects: fdataobj, statistic, IN and OUT. |
Flores, M.; Naya, S.; Fernández-Casal,R.; Zaragoza, S.; Raña, P.; Tarrío-Saavedra, J. Constructing a Control Chart Using Functional Data. Mathematics 2020, 8, 58.
## Not run: library(qcr) m <- 30 tt<-seq(0,1,len=m) mu<-30 * tt * (1 - tt)^(3/2) n0 <- 100 set.seed(12345) mdata<-matrix(NA,ncol=m,nrow=n0) sigma <- exp(-3*as.matrix(dist(tt))/0.9) for (i in 1:n0) mdata[i,]<- mu+0.5*mvrnorm(mu = mu,Sigma = sigma ) fdchart <- fdqcd(mdata) summary(fdchart) plot(fdchart,type="l",col="gray") out <- fddep$out ## Outliers - State in Control alpha <- 0.005 trim <- 0.1 while (length(out)>0) { mdata <- fddep$fdata$data[-out,] fddep <- fdqcs.depth(mdata,ns = alpha, trim=trim, plot=FALSE) out <- fddep$out } plot(fddep,title.fdata = "FD-State in Control",title.depth = "Depth") # Ha mu_a<- 30 * tt^(3/2) * (1 - tt) n_a <- 50 set.seed(12345) mdata_a<-matrix(NA,ncol=m,nrow=n_a) for (i in 1:n_a) mdata_a[i,]<- mu_a+0.5*mvrnorm(mu = mu_a,Sigma = sigma ) fdchart_a <- fdqcd(mdata_a,"Curves Monitoring") plot(fdchart_a) plot(fdchart,fdchart_a,main="Phase II") pashe2.chart <- fdqcs.rank(fdchart,fdchart_a) plot(pashe2.chart,title.fdata = "FDA",title.rank = "Rank") summary(pashe2.chart) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.