Title: | Quality Control Review |
---|---|
Description: | Univariate and multivariate SQC tools that completes and increases the SQC techniques available in R. Apart from integrating different R packages devoted to SQC ('qcc','MSQC'), provides nonparametric tools that are highly useful when Gaussian assumption is not met. This package computes standard univariate control charts for individual measurements, X-bar, S, R, p, np, c, u, EWMA and CUSUM. In addition, it includes functions to perform multivariate control charts such as Hotelling T2, MEWMA and MCUSUM. As representative feature, multivariate nonparametric alternatives based on data depth are implemented in this package: r, Q and S control charts. In addition, Phase I and II control charts for functional data are included. This package also allows the estimation of the most complete set of capability indices from first to fourth generation, covering the nonparametric alternatives, and performing the corresponding capability analysis graphical outputs, including the process capability plots. |
Authors: | Miguel Flores [aut, cre] , Ruben Fernandez-Casal [aut] , Salvador Naya [aut], Javier Tarrio-Saavedra [aut], Jorge Sosa Donoso [ctb] |
Maintainer: | Miguel Flores <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.3 |
Built: | 2024-11-20 03:35:12 UTC |
Source: | https://github.com/mflores72000/qcr |
It consists of a stage in which the archer shoots 72 arrows in 12 ends of six arrows. The information is given in x and y coordinates.
An array of (24 x 2 x 3).
x-coordinate
y-coordinate
data(archery1) str(archery1) ; plot(archery1)
data(archery1) str(archery1) ; plot(archery1)
Number of nonconformities observed in 26 successive samples of 100 printed circuit boards. Sample 6 and 20 are out of control limits. Sample 6 was examined by a new inspector and he did not recognize several type of nonconformities that could have been present. Furthermore, the unusually large number of nonconformities in sample 20 resulted from a temperature control problem in the wave soldering machine, which was subsequentely repaired. The last 20 samples are further samples collected on inspection units (each formed by 100 boards).
A data frame with 46 observations on the following 4 variables:
Number of defectives in 100 printed circuit boards (inspection unit)
Sample ID
Sample size
Trial sample indicator (TRUE/FALSE)
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd ed, New York, John Wiley & Sons, pp. 173–175
data(circuit) attach(circuit) summary(circuit) boxplot(x ~ trial) plot(x, type="b") detach(circuit)
data(circuit) attach(circuit) summary(circuit) boxplot(x ~ trial) plot(x, type="b") detach(circuit)
A water supply company wants to control the performance of the water counters installed throughout a city. For this purpose, 60 rational samples have been taken, each one composed by 3 measurements, from the same age (10 years) and caliber water counters corresponding to two different brands, and during a period of 5 years. This dataset is based on a study case of A Coruña’s water supply company, Empresa Municipal de Aguas de La Coruña (Emalcsa).
A data frame with 180 observations on the following 3 variables:
The measurement error of the counters (Error: (Real Volume - Measured Volume)/Real Volume)
Sample ID
Brands of providers of counters
data(counters) attach(counters) summary(counters) plot(error, type="b") detach(counters)
data(counters) attach(counters) summary(counters) plot(error, type="b") detach(counters)
Diameter and length of a manufacturing process of a dowel pin.
A data frame with 40 observations on the following 2 variables.
A numeric vector
A numeric vector
data(dowel1) str(dowel1) ; plot(dowel1)
data(dowel1) str(dowel1) ; plot(dowel1)
A Spaniard-Argentinian hotel company wants to control the level of occupancy (measured in application of a continuous control. For this purpose, 48 subsamples have been taken from six hotels corresponding to two different countries.
A data frame with 288 observations on the following 3 variables:
The amount of occupants in terms of percentage
Sample ID
Hemisphere
data(employment) attach(employment) summary(employment) boxplot(occupantion ~ hemisphere) plot(occupantion, type="b") detach(employment)
data(employment) attach(employment) summary(employment) boxplot(occupantion ~ hemisphere) plot(occupantion, type="b") detach(employment)
Create an object of class 'fdqcd' to perform statistical quality control. This object is used to plot Functional Data Control Charts.
fdqcd(x, data.name = NULL, ...)
fdqcd(x, data.name = NULL, ...)
x |
Matrix of set cases with dimension (n x m), where 'n' is the number of curves and 'm' are the points observed in each curve. |
data.name |
A string that specifies the title displayed on the plots.
If not provided it is taken from the name of the object |
... |
Arguments passed to or from methods. |
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) plot(fdchart,type="l",col="gray")
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) plot(fdchart,type="l",col="gray")
This function is used to compute statistics required by the DFD chart.
fdqcs.depth(x, ...) ## Default S3 method: fdqcs.depth( x, data.name = NULL, func.depth = depth.mode, nb = 200, type = c("trim", "pond"), ns = 0.01, plot = TRUE, trim = 0.025, smo = 0.05, draw.control = NULL, ... ) ## S3 method for class 'fdqcd' fdqcs.depth( x, func.depth = depth.mode, nb = 200, type = c("trim", "pond"), ns = 0.01, plot = TRUE, trim = 0.025, smo = 0.05, draw.control = NULL, ... )
fdqcs.depth(x, ...) ## Default S3 method: fdqcs.depth( x, data.name = NULL, func.depth = depth.mode, nb = 200, type = c("trim", "pond"), ns = 0.01, plot = TRUE, trim = 0.025, smo = 0.05, draw.control = NULL, ... ) ## S3 method for class 'fdqcd' fdqcs.depth( x, func.depth = depth.mode, nb = 200, type = c("trim", "pond"), ns = 0.01, plot = TRUE, trim = 0.025, smo = 0.05, draw.control = NULL, ... )
x |
An object of class 'fdqcd'. |
... |
Arguments passed to or from methods. |
data.name |
A string that specifies the title displayed on the plots.
If not provided it is taken from the name of the object |
func.depth |
Type of depth measure, by default depth.mode. |
nb |
The number of bootstrap samples. |
type |
The method used to trim the data (trim or pond). |
ns |
Quantile to determine the cutoff from the Bootstrap procedure. |
plot |
Logical value. If |
trim |
The percentage of the trimming. |
smo |
The smoothing parameter for the bootstrap samples. |
draw.control |
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) plot.fdqcd(fdchart,type="l",col="gray") set.seed(1234) fddep <- fdqcs.depth(fdchart,plot = T) plot(fddep,title.fdata = "Fdata",title.depth = "Depth") summary(fddep) ## End(Not run)
## 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) plot.fdqcd(fdchart,type="l",col="gray") set.seed(1234) fddep <- fdqcs.depth(fdchart,plot = T) plot(fddep,title.fdata = "Fdata",title.depth = "Depth") summary(fddep) ## End(Not run)
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, ... )
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 |
The set of reference curves respect to which the depth is computed. fdqcd class object. |
... |
Arguments passed to or from methods. |
y |
The set of new curves to evaluate the depth. fdqcd class object. |
func.depth |
Type of depth measure, by default depth.FM |
alpha |
Quantile to determine the cutoff from the Bootstrap procedure. |
plot |
Logical value. If |
trim |
The percentage of the trimming. |
draw.control |
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)
## 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)
Create an object of class 'mqcd' to perform statistical quality control. This object is used to plot Multivariate Control Charts.
mqcd(x, data.name = NULL)
mqcd(x, data.name = NULL)
x |
A matrix, a data-frame or an array where it should contain data. |
data.name |
A string that specifies the title displayed on the plots.
If not provided it is taken from the name of the object |
library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) str(data.mqcd)
library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) str(data.mqcd)
Create an object of class 'mqcs' to perform statistical quality control. This function is used to compute statistics required to plot Multivariate Control Charts
mqcs(x, method = "sw", ...)
mqcs(x, method = "sw", ...)
x |
An object of class 'mqcd' (Multivariante Quality Control Data) |
method |
The method employed to compute the covariance matrix in individual observation case. Two methods are used "sw" for compute according to (Sullivan,Woodall 1996a) and "hm" by (Holmes,Mergen 1993) |
... |
Arguments passed to or from methods. |
This function is used to join two objects of type matrix, data.frame or array and mqcs.
mqcs.add(x, ...) ## Default S3 method: mqcs.add(x, value, ...)
mqcs.add(x, ...) ## Default S3 method: mqcs.add(x, value, ...)
x |
Object type mqcs |
... |
arguments to be passed to or from methods. |
value |
Object type data.frame, matrix or array |
This function is used to compute statistics required by the Multivariate Cumulative Sum (MCUSUM) chart.
mqcs.mcusum(x, ...) ## Default S3 method: mqcs.mcusum( x, data.name = NULL, limits = NULL, Xmv = NULL, S = NULL, k = 0.5, h = 5.5, method = "sw", plot = FALSE, ... ) ## S3 method for class 'mqcd' mqcs.mcusum( x, limits = NULL, Xmv = NULL, S = NULL, k = 0.5, h = 5.5, method = "sw", plot = FALSE, ... )
mqcs.mcusum(x, ...) ## Default S3 method: mqcs.mcusum( x, data.name = NULL, limits = NULL, Xmv = NULL, S = NULL, k = 0.5, h = 5.5, method = "sw", plot = FALSE, ... ) ## S3 method for class 'mqcd' mqcs.mcusum( x, limits = NULL, Xmv = NULL, S = NULL, k = 0.5, h = 5.5, method = "sw", plot = FALSE, ... )
x |
An object of class 'mqcd'. |
... |
Arguments passed to or from methods. |
data.name |
A string that specifies the title displayed on the plots.
If not provided it is taken from the name of the object |
limits |
A two-values vector specifying the control limits. |
Xmv |
The mean vector. It is only specified for Phase II or when the parameters of the distribution are known. |
S |
The sample covariance matrix. It is only used for Phase II or when the parameters of the distribution are known. |
k |
A constant used in MCUSUM chart. Frequently k = 0.5 |
h |
A constant used in MCUSUM chart. Usually h = 5.5 |
method |
The method employed to compute the covariance matrix in the individual observation case. Two methods are used "sw" for compute according to (Sullivan,Woodall 1996a) and "hm" by (Holmes,Mergen 1993) |
plot |
Logical value. If |
Edgar Santos-Fernandez
## ## Continuous data ## library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.mcusum(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" MCUSUM Control Chart for dowel1")
## ## Continuous data ## library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.mcusum(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" MCUSUM Control Chart for dowel1")
This function is used to compute statistics required by the Multivariate Exponentially Weighted Moving Average (MEWMA) chart.
mqcs.mewma(x, ...) ## Default S3 method: mqcs.mewma( x, data.name = NULL, limits = NULL, Xmv = NULL, S = NULL, method = "sw", plot = FALSE, ... ) ## S3 method for class 'mqcd' mqcs.mewma( x, limits = NULL, Xmv = NULL, S = NULL, lambda = 0.1, method = "sw", plot = FALSE, ... )
mqcs.mewma(x, ...) ## Default S3 method: mqcs.mewma( x, data.name = NULL, limits = NULL, Xmv = NULL, S = NULL, method = "sw", plot = FALSE, ... ) ## S3 method for class 'mqcd' mqcs.mewma( x, limits = NULL, Xmv = NULL, S = NULL, lambda = 0.1, method = "sw", plot = FALSE, ... )
x |
An object of class 'mqcd' |
... |
Arguments passed to or from methods. |
data.name |
A string that specifies the title displayed on the plots.
If not provided it is taken from the name of the object |
limits |
A two-values vector specifying the control limits. |
Xmv |
The mean vector. It is only specified for Phase II or when the parameters of the distribution are known. |
S |
The sample covariance matrix. It is only used for Phase II or when the parameters of the distribution are known. |
method |
The method employed to compute the covariance matrix in the individual observation case. Two methods are used "sw" for compute according to (Sullivan,Woodall 1996a) and "hm" by (Holmes,Mergen 1993) |
plot |
Logical value. If |
lambda |
The smoothing constant. Only values of 0.1, 0.2,...,0.9 are allowed. |
Edgar Santos-Fernandez
## ## Continuous data ## library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.mewma(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" MEWMA Control Chart for dowel1")
## ## Continuous data ## library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.mewma(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" MEWMA Control Chart for dowel1")
This function is used to compute statistics required by the t2 of HOTELLING or Shewhart Multivariate chart.
mqcs.t2(x, ...) ## Default S3 method: mqcs.t2( x, data.name = NULL, limits = NULL, Xmv = NULL, S = NULL, colm = NULL, alpha = 0.01, phase = 1, method = "sw", plot = FALSE, ... ) ## S3 method for class 'mqcd' mqcs.t2( x, limits = NULL, Xmv = NULL, S = NULL, colm = NULL, alpha = 0.01, phase = 1, method = "sw", plot = FALSE, ... )
mqcs.t2(x, ...) ## Default S3 method: mqcs.t2( x, data.name = NULL, limits = NULL, Xmv = NULL, S = NULL, colm = NULL, alpha = 0.01, phase = 1, method = "sw", plot = FALSE, ... ) ## S3 method for class 'mqcd' mqcs.t2( x, limits = NULL, Xmv = NULL, S = NULL, colm = NULL, alpha = 0.01, phase = 1, method = "sw", plot = FALSE, ... )
x |
An object of class 'mqcd' |
... |
Arguments passed to or from methods. |
data.name |
A string that specifies the title displayed on the plots.
If not provided it is taken from the name of the object |
limits |
A two-values vector specifying the control limits. |
Xmv |
The mean vector. It is only specified for Phase II or when the parameters of the distribution are known. |
S |
The sample covariance matrix. It is only used for Phase II or when the parameters of the distribution are known. |
colm |
The number of samples (m) and it is only used in Hotelling control chart for Phase II. |
alpha |
It is the the significance level (0.01 for default) |
phase |
Allows to select the type of UCL to use. Only values of phase = 1 or 2 are allowed. |
method |
The method employed to compute the covariance matrix in the individual observation case. Two methods are used "sw" for compute according to (Sullivan,Woodall 1996a) and "hm" by (Holmes,Mergen 1993) |
plot |
Logical value. If |
Edgar Santos-Fernandez
## ## Continuous data ## library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.t2(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" Hotelling Control Chart for dowel1") data(archery1) str(archery1) data.mqcd <- mqcd(archery1) res.mqcs <- mqcs.t2(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" Hotelling Control Chart for archery1")
## ## Continuous data ## library(qcr) data(dowel1) str(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.t2(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" Hotelling Control Chart for dowel1") data(archery1) str(archery1) data.mqcd <- mqcd(archery1) res.mqcs <- mqcs.t2(data.mqcd) summary(res.mqcs) plot(res.mqcs, title =" Hotelling Control Chart for archery1")
This function removes observations from the sample which violates the rules of a process under control.
mstate.control(x)
mstate.control(x)
x |
Object mqcd (Multivariate Quality Control Statistical) |
control |
A logical value indicating whether the initial sample comes from a process under control. |
## ## Continuous data ## library(qcr) set.seed(356) x <- matrix(rnorm(66),ncol=3) x <- rbind(x,matrix(rexp(66,100),ncol=3)) dim(x) x <-mqcd(x) str(x) x <-mqcs.mewma(x) str(x) plot(x) data.mqcs <- mstate.control(x) x <-mqcs.mewma(data.mqcs) plot(x)
## ## Continuous data ## library(qcr) set.seed(356) x <- matrix(rnorm(66),ncol=3) x <- rbind(x,matrix(rexp(66,100),ncol=3)) dim(x) x <-mqcd(x) str(x) x <-mqcs.mewma(x) str(x) plot(x) data.mqcs <- mstate.control(x) x <-mqcs.mewma(data.mqcs) plot(x)
It creates an object of class 'npqcd' to perform statistical quality control. This object is used to plot Non Parametric Multivariate Control Charts.
npqcd(x, G = NULL, data.name = NULL)
npqcd(x, G = NULL, data.name = NULL)
x |
A matrix, a data-frame or an array which it should contain data. Dimension has to be the same as that of the observations. |
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 |
library(qcr) set.seed(356) data <- matrix(rnorm(999), nc = 3) x <-rexp(999,0.5) x <-matrix(x,ncol=3) data.npqcd <- npqcd(data,x) str(data.npqcd)
library(qcr) set.seed(356) data <- matrix(rnorm(999), nc = 3) x <-rexp(999,0.5) x <-matrix(x,ncol=3) data.npqcd <- npqcd(data,x) str(data.npqcd)
Create an object of class 'npqcs' to perform statistical quality control. This function is used to compute statistics required to plot Non Parametric Multivariate Control Charts.
npqcs(x, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), ...)
npqcs(x, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), ...)
x |
Object npqcd (Non Parametric Multivariate Quality Control Data) |
method |
Character string which determines the depth function used.
|
... |
Arguments passed to or from methods. |
This function is used to join two objects of type matrix, data.frame or array and npqcs.
npqcs.add(x, ...) ## Default S3 method: npqcs.add(x, value, ...)
npqcs.add(x, ...) ## Default S3 method: npqcs.add(x, value, ...)
x |
Object type npqcs |
... |
Arguments to be passed to or from methods. |
value |
Object type data.frame, matrix or array. |
This function is used to compute statistics required by the Non Parametric Q chart.
npqcs.Q(x, ...) ## Default S3 method: npqcs.Q( x, G, data.name = NULL, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... ) ## S3 method for class 'npqcd' npqcs.Q( x, data.name, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... )
npqcs.Q(x, ...) ## Default S3 method: npqcs.Q( x, G, data.name = NULL, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... ) ## S3 method for class 'npqcd' npqcs.Q( x, data.name, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... )
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 |
limits |
A two-value vector specifying the control limits lower and central. |
method |
Character string which determines the depth function used.
|
alpha |
It is the significance level (0.01 for default) |
plot |
Logical value. If |
Regina Liu (1995)
## Not run: ## ## Continuous data ## library(qcr) 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 <- rbind(G[501:540,],x) n <- 4 # samples m <- 20 # measurements k <- 2 # number of variables x.a <- array(,dim=c(n,k,m)) for (i in 1:m){ x.a[,,i] <- x[(1+(i-1)*n):(i*n),] } M <- G[1:500,] data.npqcd <- npqcd(x.a,M) str(data.npqcd) res.npqcs <- npqcs.Q(data.npqcd,method = "Liu", alpha=0.025) str(res.npqcs) summary(res.npqcs) plot(res.npqcs,title =" Q Control Chart") ## End(Not run)
## Not run: ## ## Continuous data ## library(qcr) 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 <- rbind(G[501:540,],x) n <- 4 # samples m <- 20 # measurements k <- 2 # number of variables x.a <- array(,dim=c(n,k,m)) for (i in 1:m){ x.a[,,i] <- x[(1+(i-1)*n):(i*n),] } M <- G[1:500,] data.npqcd <- npqcd(x.a,M) str(data.npqcd) res.npqcs <- npqcs.Q(data.npqcd,method = "Liu", alpha=0.025) str(res.npqcs) summary(res.npqcs) plot(res.npqcs,title =" Q Control Chart") ## End(Not run)
This function is used to compute statistics required by the Non Parametric r chart.
npqcs.r(x, ...) ## Default S3 method: npqcs.r( x, G, data.name = NULL, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... ) ## S3 method for class 'npqcd' npqcs.r( x, data.name, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... )
npqcs.r(x, ...) ## Default S3 method: npqcs.r( x, G, data.name = NULL, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... ) ## S3 method for class 'npqcd' npqcs.r( x, data.name, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, ... )
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 |
limits |
A two-value vector specifying the control limits lower and central. |
method |
Character string which determines the depth function used.
|
alpha |
It is the significance level (by default |
plot |
Logical value. If |
Regina Liu (1995)
## Not run: library(qcr) set.seed(356) 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 <- rbind(G[501:540,],x) M <- G[1:500,] data.npqcd <- npqcd(x,M) str(data.npqcd) res.npqcs <- npqcs.r(data.npqcd,method = "Liu", alpha=0.025) str(res.npqcs) summary(res.npqcs) plot(res.npqcs,title =" r Control Chart") ## End(Not run)
## Not run: library(qcr) set.seed(356) 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 <- rbind(G[501:540,],x) M <- G[1:500,] data.npqcd <- npqcd(x,M) str(data.npqcd) res.npqcs <- npqcs.r(data.npqcd,method = "Liu", alpha=0.025) str(res.npqcs) summary(res.npqcs) plot(res.npqcs,title =" r Control Chart") ## End(Not run)
This function is used to compute statistics required by the Non Parametric S chart.
npqcs.S(x, ...) ## Default S3 method: 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 class 'npqcd' npqcs.S( x, data.name, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, standardize = F, ... )
npqcs.S(x, ...) ## Default S3 method: 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 class 'npqcd' npqcs.S( x, data.name, limits = NULL, method = c("Tukey", "Liu", "Mahalanobis", "RP", "LD"), alpha = 0.01, plot = FALSE, standardize = F, ... )
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 |
limits |
A two-value vector specifying the control limits lower and central. |
method |
Character string which determines the depth function used.
|
alpha |
It is the significance level (by default |
plot |
Logical value. If |
standardize |
A logical value indicating data should be standardized. |
Regina Liu (1995)
## 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") ## End(Not run)
## 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") ## End(Not run)
This function removes observations from the sample which violates the rules of a process under control.
npstate.control(x, control = FALSE)
npstate.control(x, control = FALSE)
x |
An object of class "npqcd" (Quality Control Statitical Non Parametric). |
control |
A logical value indicating whether the initial sample comes from a process under control. |
## Not run: ## ## Continuous data ## library(qcr) set.seed(356) mu<-c(0,0) Sigma<- matrix(c(1,0,0,1),nrow = 2,ncol = 2) mu <- 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=mu,sigma = S) x <- rbind(G[501:540,],x) M <- G[1:500,] data.npqcd <- npqcd(x,M) str(data.npqcd) res.npqcs <- npqcs.r(data.npqcd,method = "Liu", alpha=0.025) str(res.npqcs) summary(res.npqcs) plot(res.npqcs) new.npqcd <- npstate.control(x = res.npqcs) res.npqcs <- npqcs.r(new.npqcd) summary(res.npqcs) plot(res.npqcs) ## End(Not run)
## Not run: ## ## Continuous data ## library(qcr) set.seed(356) mu<-c(0,0) Sigma<- matrix(c(1,0,0,1),nrow = 2,ncol = 2) mu <- 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=mu,sigma = S) x <- rbind(G[501:540,],x) M <- G[1:500,] data.npqcd <- npqcd(x,M) str(data.npqcd) res.npqcs <- npqcs.r(data.npqcd,method = "Liu", alpha=0.025) str(res.npqcs) summary(res.npqcs) plot(res.npqcs) new.npqcd <- npstate.control(x = res.npqcs) res.npqcs <- npqcs.r(new.npqcd) summary(res.npqcs) plot(res.npqcs) ## End(Not run)
Frozen orange juice concentrate is packed in 6-oz cardboard cans. These cans are formed on a machine by spinning them from cardboard stock and attaching a metal bottom panel. A can is then inspected to determine whether, when filled, the liquid could possible leak either on the side seam or around the bottom joint. If this occurs a can is considered nonconforming. The data were collected as 30 samples of 50 cans each at half-hour intervals over a three-shift period in which the machine was in continuous operation. From sample 15 used, a new bacth of cardboard stock was punt into production. Sample 23 was obtained when an inexperienced operator was temporarily assigned to the machine. After the first 30 samples, a machine adjustment was made. Then further 24 samples were taken from the process.
A data frame with 54 observations on the following 4 variables:
Sample ID
Number of defectives
Sample sizes
Trial samples (TRUE/FALSE)
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd ed, New York, John Wiley & Sons, pp. 152–155.
data(orangejuice) orangejuice$d <- orangejuice$D/orangejuice$size attach(orangejuice) summary(orangejuice) boxplot(d ~ trial) mark <- ifelse(trial, 1, 2) plot(sample, d, type="b", col=mark, pch=mark)
data(orangejuice) orangejuice$d <- orangejuice$D/orangejuice$size attach(orangejuice) summary(orangejuice) boxplot(d ~ trial) mark <- ifelse(trial, 1, 2) plot(sample, d, type="b", col=mark, pch=mark)
This database contains information about the level of purity of each batch of Picual varities. Then we have the type of oil by measuring the Oxidation Onset Temperature (OOT). We have 50 subsamples of oil with their temperature to oxide, each subsample is size 5.
A data frame with 250 observations on the following 2 variables:
A quantitative variable that controls the quality of oil.
sample id
data(oxidation) attach(oxidation) summary(oxidation) plot(OOT, type="b",xlab='Observations') detach(oxidation)
data(oxidation) attach(oxidation) summary(oxidation) plot(OOT, type="b",xlab='Observations') detach(oxidation)
A personal computer manufacturer counts the number of nonconformities per unit on the final assembly line. He collects data on 20 samples of 5 computers each.
A data frame with 20 observations on the following 3 variables.
A quantitative variable that measures the number of nonconformities in each sample.
Sample ID
Number of computers inspected.
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd ed, New York, John Wiley & Sons, pp. 181–182
data(pcmanufact) summary(pcmanufact) plot(pcmanufact$x/pcmanufact$size, type="b")
data(pcmanufact) summary(pcmanufact) plot(pcmanufact$x/pcmanufact$size, type="b")
This is a database that contains information on the inside diameter of piston rings. Piston rings are manufactured for an automobile engine that are produced through a forging process. This process is considered "in control" and is measured on 25 samples, each of size 5.
A data frame with 200 observations on the following 3 variables.
A numeric vector.
Sample ID
Trial sample indicator (TRUE
/FALSE
)
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd ed, New York, John Wiley & Sons, pp. 206–213
data(pistonrings) attach(pistonrings) summary(pistonrings) boxplot(diameter ~ sample) plot(sample, diameter, cex=0.7) lines(tapply(diameter,sample,mean)) detach(pistonrings)
data(pistonrings) attach(pistonrings) summary(pistonrings) boxplot(diameter ~ sample) plot(sample, diameter, cex=0.7) lines(tapply(diameter,sample,mean)) detach(pistonrings)
A known chemical company is developing a patent for a new variant of artificial stone composed mostly of quartz ( 93wt and polyester resin . This company is launching a pilot plant where it begins to produce plates of this material to industry scale. In order to measure the degree of product homogeneity, 50 samples were taken, performed 5 measurements per plate corresponding to different areas of artificial stone Vickers hardness
A data frame with 250 observations on the following 2 variables:
A quantitative variable that measure Vickers hardness corresponding to different areas of artificial stone.
Sample ID
data(plates) attach(plates) summary(plates) plot(hardness, type="b") detach(plates)
data(plates) attach(plates) summary(plates) plot(hardness, type="b") detach(plates)
Generic function for plotting Multivarite charts of object of class 'fdqcd' to perform statistical quality control.
## S3 method for class 'fdqcd' plot(x, y = NULL, title = NULL, xlab = NULL, ylab = NULL, col = NULL, ...)
## S3 method for class 'fdqcd' plot(x, y = NULL, title = NULL, xlab = NULL, ylab = NULL, col = NULL, ...)
x |
Object fdqcd (pashe I) |
y |
Object fdqcd (monitoring) |
title |
An overall title for the plot. |
xlab |
A title for the 'x' axis. |
ylab |
A title for the 'y' axis. |
col |
The color for curves. |
... |
Arguments to be passed to or from methods. |
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) plot(fdchart,type="l",col="gray")
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) plot(fdchart,type="l",col="gray")
Generic function for plotting charts of object of class 'fdqcs.depth' to perform statistical quality control.
## S3 method for class 'fdqcs.depth' plot( x, title.fdata = NULL, title.depth = NULL, xlab = NULL, ylab = NULL, col = NULL, draw.control = NULL, ... )
## S3 method for class 'fdqcs.depth' plot( x, title.fdata = NULL, title.depth = NULL, xlab = NULL, ylab = NULL, col = NULL, draw.control = NULL, ... )
x |
An object of class fdqcs.depth |
title.fdata |
An overall title for the fdata plot. |
title.depth |
An overall title for the depth plot. |
xlab |
A title for the x axis. |
ylab |
A title for the y axis. |
col |
The color for curves. |
draw.control |
It specifies the col, lty and lwd for objects: fdataobj, statistic, IN and OUT. |
... |
Arguments to be passed to or from methods. |
Generic function for plotting charts of object of class 'fdqcs.rank' to perform statistical quality control.
## S3 method for class 'fdqcs.rank' plot( x, title.fdata = NULL, title.rank = NULL, xlab = NULL, ylab = NULL, col = NULL, draw.control = NULL, ... )
## S3 method for class 'fdqcs.rank' plot( x, title.fdata = NULL, title.rank = NULL, xlab = NULL, ylab = NULL, col = NULL, draw.control = NULL, ... )
x |
An object of class fdqcs.rank |
title.fdata |
An overall title for the fdata plot. |
title.rank |
An overall title for the depth plot. |
xlab |
A title for the x axis. |
ylab |
A title for the y axis. |
draw.control |
It specifies the col, lty and lwd for objects: fdataobj, statistic, IN and OUT. |
... |
Arguments to be passed to or from methods. |
Generic function for plotting Multivarite charts of object of class 'mqcs' to perform statistical quality control.
## S3 method for class 'mqcs' plot(x, title, subtitle, xlab, ylab, ylim, ...) ## S3 method for class 'mqcs.t2' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'mqcs.mcusum' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'mqcs.mewma' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... )
## S3 method for class 'mqcs' plot(x, title, subtitle, xlab, ylab, ylim, ...) ## S3 method for class 'mqcs.t2' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'mqcs.mcusum' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'mqcs.mewma' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... )
x |
An Object of class 'mqcs' (Multivarite Quality Control Statical) |
title |
An overall title for the plot. |
subtitle |
A sub title for the plot. |
xlab |
A title for the 'x' axis. |
ylab |
A title for the 'y' axis. |
ylim |
The 'y' limits of the plot. |
... |
Arguments to be passed to or from methods. |
## Not run: ## ## Continuous data ## data(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.mcusum(data.mqcd) plot(res.mqcs, title =" MCUSUM Control Chart ", subtitle="Database dowel1", xlab = "Observations", ylab = "MCUSUM", ylim = c(-1,6.5)) res1.mqcs <- mqcs.mewma(data.mqcd) plot(res1.mqcs, title =" MEWMA Control Chart", subtitle="Database dowel1", xlab = "Observations", ylab = "MEWMA", ylim = c(-1,10)) res2.mqcs <- mqcs.t2(data.mqcd) plot(res2.mqcs, title =" Hotelling Control Chart",subtitle="Database dowel1", xlab = "Observations", ylab = "T2 Hotelling", ylim = c(-1,14)) ## End(Not run)
## Not run: ## ## Continuous data ## data(dowel1) data.mqcd <- mqcd(dowel1) res.mqcs <- mqcs.mcusum(data.mqcd) plot(res.mqcs, title =" MCUSUM Control Chart ", subtitle="Database dowel1", xlab = "Observations", ylab = "MCUSUM", ylim = c(-1,6.5)) res1.mqcs <- mqcs.mewma(data.mqcd) plot(res1.mqcs, title =" MEWMA Control Chart", subtitle="Database dowel1", xlab = "Observations", ylab = "MEWMA", ylim = c(-1,10)) res2.mqcs <- mqcs.t2(data.mqcd) plot(res2.mqcs, title =" Hotelling Control Chart",subtitle="Database dowel1", xlab = "Observations", ylab = "T2 Hotelling", ylim = c(-1,14)) ## End(Not run)
Generic function for plotting Multivariate charts of object of class 'npqcs' to perform statistical quality control.
## S3 method for class 'npqcs' plot(x, title, subtitle, xlab, ylab, ylim, lim = TRUE, ...) ## S3 method for class 'npqcs.r' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'npqcs.Q' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'npqcs.S' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... )
## S3 method for class 'npqcs' plot(x, title, subtitle, xlab, ylab, ylim, lim = TRUE, ...) ## S3 method for class 'npqcs.r' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'npqcs.Q' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'npqcs.S' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... )
x |
An object of class "npqcs" (Multivariate Statistical Quality Control) |
title |
An overall title for the plot. |
subtitle |
A sub title for the plot. |
xlab |
A title for the "x" axis. |
ylab |
A title for the "y" axis. |
ylim |
The "y" limits of the plot. |
lim |
A logical value indicating that limits should be constant. |
... |
Arguments to be passed to or from methods. |
Generic function for plotting Shewhart charts of object of class 'qcs' to perform statistical quality control.
## S3 method for class 'qcs' plot( x, title, subtitle, xlab, ylab, ylim, center.nominal = NULL, limits.specification = NULL, limits.alert = NULL, type.data = c("continuous", "atributte", "dependence"), ... ) ## S3 method for class 'qcs.xbar' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.S' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.R' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.one' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.p' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.np' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.c' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.u' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.ewma' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'qcs.cusum' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... )
## S3 method for class 'qcs' plot( x, title, subtitle, xlab, ylab, ylim, center.nominal = NULL, limits.specification = NULL, limits.alert = NULL, type.data = c("continuous", "atributte", "dependence"), ... ) ## S3 method for class 'qcs.xbar' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.S' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.R' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.one' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.p' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.np' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.c' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.u' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, conf.nsigma.alert = NULL, center.nominal = NULL, limits.specification = NULL, ... ) ## S3 method for class 'qcs.ewma' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... ) ## S3 method for class 'qcs.cusum' plot( x, title = NULL, subtitle = NULL, xlab = NULL, ylab = NULL, ylim = NULL, ... )
x |
An object of class "qcs" (Quality Control Statical). |
title |
An overall title for the plot. |
subtitle |
A sub title for the plot. |
xlab |
A title for the "x" axis. |
ylab |
A title for the "y" axis. |
ylim |
The "y" limits of the plot. |
center.nominal |
A value specifying the center of group statistics or the "target" value of the process. |
limits.specification |
A two-value vector specifying control limits. |
limits.alert |
A two-value vector specifying control alert limits. |
type.data |
A string specifying the type of data. |
... |
Arguments to be passed to or from methods. |
conf.nsigma.alert |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
A shipyard of recreational boats manufacturing, intended to optimize and control the mechanical properties hull yacht models. This has made a study in which the modulus of elasticity tensile strength of the epoxy resin (polymer) used, after applying different curing pressures measured: 0.1 y 10 MPa. 60 subsamples composed of three measurements taken on the same day are taken.
A data frame with 180 observations on the following 3 variables:
Presion level.
sample id
Pressures measured: 0.1 y 10 MPa
data(presion) attach(presion) summary(presion) plot(presion$presion, type="b") detach(presion)
data(presion) attach(presion) summary(presion) plot(presion$presion, type="b") detach(presion)
Create an object of class 'qcd' to perform statistical quality control. This object may then be used to plot Shewhart charts, Multivariate Control Charts, and more.
qcd( data, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, type.data = c("continuous", "atributte", "dependence"), sizes = NULL )
qcd( data, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, type.data = c("continuous", "atributte", "dependence"), sizes = NULL )
data |
A matrix or data-frame which should contain data, index sample and, optionally, covariate(s). |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
type.data |
A string specifying the type of data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
## Not run: library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) ## End(Not run)
## Not run: library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) ## End(Not run)
Quality Control Review
Univariate and multivariate SQC tools that completes and increases the SQC techniques available in R. Apart from integrating different R packages devoted to SQC ('qcc','MSQC'), provides nonparametric tools that are highly useful when Gaussian assumption is not met. This package computes standard univariate control charts for individual measurements, X-bar, S, R, p, np, c, u, EWMA and CUSUM. In addition, it includes functions to perform multivariate control charts such as Hotelling T2, MEWMA and MCUSUM. As representative feature, multivariate nonparametric alternatives based on data depth are implemented in this package: r, Q and S control charts. In addition, Phase I and II control charts for functional data are included. This package also allows the estimation of the most complete set of capability indices from first to fourth generation, covering the nonparametric alternatives, and performing the corresponding capability analysis graphical outputs, including the process capability plots.
Create an object of class 'qcs' to perform statistical quality control. This object may then be used to plot Shewhart charts, Multivariate Control Charts, and more.
qcs( x, sample.index, sizes = NULL, type = c("xbar", "R", "S", "one", "p", "np", "c", "u", "ewma", "cusum"), center = NULL, std.dev, conf.nsigma = 3, limits = NULL, type.data = c("continuous", "atributte", "dependence"), lambda = 0.2, decision.interval = 5, se.shift = 1 ) qcs.continuous( x, sample.index, sizes = NULL, type = c("xbar", "R", "S", "one"), center = NULL, std.dev, conf.nsigma = 3, limits = NULL ) qcs.atributte( x, sample.index = NULL, sizes = NULL, type = c("p", "np", "c", "u"), center = NULL, conf.nsigma = 3, limits = NULL ) qcs.dependence( x, sample.index = NULL, sizes = NULL, type = c("ewma", "cusum"), center = NULL, std.dev, nsigma = 3, lambda = 0.2, decision.interval = 5, se.shift = 1 )
qcs( x, sample.index, sizes = NULL, type = c("xbar", "R", "S", "one", "p", "np", "c", "u", "ewma", "cusum"), center = NULL, std.dev, conf.nsigma = 3, limits = NULL, type.data = c("continuous", "atributte", "dependence"), lambda = 0.2, decision.interval = 5, se.shift = 1 ) qcs.continuous( x, sample.index, sizes = NULL, type = c("xbar", "R", "S", "one"), center = NULL, std.dev, conf.nsigma = 3, limits = NULL ) qcs.atributte( x, sample.index = NULL, sizes = NULL, type = c("p", "np", "c", "u"), center = NULL, conf.nsigma = 3, limits = NULL ) qcs.dependence( x, sample.index = NULL, sizes = NULL, type = c("ewma", "cusum"), center = NULL, std.dev, nsigma = 3, lambda = 0.2, decision.interval = 5, se.shift = 1 )
x |
An object of class "qcd". |
||||||||||||||||||||||||||||||
sample.index |
A scalar with the column number corresponding to the index of each group (sample). |
||||||||||||||||||||||||||||||
sizes |
A value or a vector of values specifying the sample sizes
associated with each group. For continuous data the sample sizes are obtained counting the non- |
||||||||||||||||||||||||||||||
type |
A character string specifying the group statistics to compute:
|
||||||||||||||||||||||||||||||
center |
A value specifying the center of group statistics or the ”target” value of the process. |
||||||||||||||||||||||||||||||
std.dev |
A value or an available method specifying the within-group standard deviation(s) of the process. Several methods are available for estimating the standard deviation in case of a continuous process variable. |
||||||||||||||||||||||||||||||
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
||||||||||||||||||||||||||||||
limits |
A two-value vector specifying control limits. |
||||||||||||||||||||||||||||||
type.data |
A string specifying el type de data. |
||||||||||||||||||||||||||||||
lambda |
The smoothing parameter |
||||||||||||||||||||||||||||||
decision.interval |
A numeric value specifying the number of standard errors of the summary statistics at which the cumulative sum is out of control. |
||||||||||||||||||||||||||||||
se.shift |
The amount of shift to detect in the process, measured in standard errors of the summary statistics. |
||||||||||||||||||||||||||||||
nsigma |
A numeric value used to compute control limits, specifying the number of standard deviations. |
Returns an object of class 'qcs'.
Montgomery, D.C. (2000) Introduction to Statistical
Quality Control, 4th ed. New York: John Wiley & Sons.
Wetherill, G.B.
and Brown, D.W. (1991) Statistical Process Control. New York:
Chapman & Hall.
This function is used to join two objects of type data.frame and qcs.
qcs.add(x, ...) ## Default S3 method: qcs.add( x, value, var.index = NULL, sample.index = NULL, covar.index = NULL, ... )
qcs.add(x, ...) ## Default S3 method: qcs.add( x, value, var.index = NULL, sample.index = NULL, covar.index = NULL, ... )
x |
Object type qcs |
... |
Arguments to be passed to or from methods. |
value |
Object type data.frame |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternatively it can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding the index each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternatively can be a character vector with the names of the covariates. |
This function is used to compute statistics required by the c chart.
qcs.c(x, ...) ## Default S3 method: qcs.c( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.c(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
qcs.c(x, ...) ## Default S3 method: qcs.c( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.c(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-value vector specifying control limits. |
plot |
Logical value. If |
library(qcr) data(circuit) attach(circuit) str(circuit) datos <- circuit datos$sample <- 1:length(datos$x) str(datos) sizes <- datos[,2] datos.qcd <- qcd(data = datos, var.index = 1,sample.index = 2, sizes = size, type.data = "atributte") res.qcs <- qcs.c(datos.qcd) summary(res.qcs) plot(res.qcs)
library(qcr) data(circuit) attach(circuit) str(circuit) datos <- circuit datos$sample <- 1:length(datos$x) str(datos) sizes <- datos[,2] datos.qcd <- qcd(data = datos, var.index = 1,sample.index = 2, sizes = size, type.data = "atributte") res.qcs <- qcs.c(datos.qcd) summary(res.qcs) plot(res.qcs)
Calculates the process capability indices Cp, Cpk, Cpl, Cpu, Cpm, Cpmk for a
qcs object and normal distribution. Also, this function calculates confidence
limits for using the method described by Chou et al. (1990).
Approximate confidence limits for
,
and
are computed using the method in Bissell (1990).
Confidence limits for
are based on the method of Boyles (1991);
this method is approximate and it assumes the target is midway between the
specification limits.
Moreover, calculates the process capability indices CNp, CNpk, CNpm, CNpmk for a qcs object.
A histogram with a density curve is displayed along with the specification limits, a
Quantile-Quantile Plot for the specified distribution and contour graph is plotted
for estimate the index Cpm.
qcs.ca( object, limits = c(lsl = -3, usl = 3), target = NULL, std.dev = NULL, nsigmas = 3, confidence = 0.9973, plot = TRUE, main = NULL, ... )
qcs.ca( object, limits = c(lsl = -3, usl = 3), target = NULL, std.dev = NULL, nsigmas = 3, confidence = 0.9973, plot = TRUE, main = NULL, ... )
object |
qcs object of type |
limits |
A vector specifying the lower and upper specification limits. |
target |
A value specifying the target of the process.
If it is |
std.dev |
A value specifying the within-group standard deviation. |
nsigmas |
A numeric value specifying the number of sigmas to use. |
confidence |
A numeric value between 0 and 1 specifying the probabilities
for computing the quantiles.
This values is used only when |
plot |
Logical value indicating whether graph should be plotted. |
main |
Title of the plot. |
... |
Arguments to be passed to or from methods. |
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd
ed, New York, John Wiley & Sons.
Tong, L.I. and Chen, J.P. (1998), Lower con???dence limits of process capability
indices for nonnormal process distributions. International Journal of Quality & Reliability Management,
Vol. 15 No. 8/9, pp. 907-19.
Vannman, K (1995) A Unified Approach to Capability Indices. Statitica Sinica,5,805-820.
Vannman, K. (2001). A Graphical Method to Control Process Capability. Frontiers in Statistical Quality Control,
No 6, Editors: H-J Lenz and P-TH Wilrich. Physica-Verlag, Heidelberg, 290-311.
Hubele and Vannman (2004). The E???ect of Pooled and Un-pooled Variance Estimators on Cpm When Using Subsamples.
Journal Quality Technology, 36, 207-222.
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) LSL=73.99; USL=74.01 limits = c(lsl = 73.99, usl = 74.01) qcs.ca(xbar, limits = limits)
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) LSL=73.99; USL=74.01 limits = c(lsl = 73.99, usl = 74.01) qcs.ca(xbar, limits = limits)
Calculates ,
using the formulation described by Kerstin Vannman(1995).
qcs.cp( object, parameters = c(u = 0, v = 0), limits = c(lsl = -3, usl = 3), target = NULL, mu = 0, std.dev = 1, nsigmas = 3, k = 1, contour = TRUE, ylim = NULL, ... )
qcs.cp( object, parameters = c(u = 0, v = 0), limits = c(lsl = -3, usl = 3), target = NULL, mu = 0, std.dev = 1, nsigmas = 3, k = 1, contour = TRUE, ylim = NULL, ... )
object |
qcs object of type |
parameters |
A vector specifying the |
limits |
A vector specifying the lower and upper specification limits. |
target |
A value specifying the target of the process.
If it is |
mu |
A value specifying the mean of data. |
std.dev |
A value specifying the within-group standard deviation. |
nsigmas |
A numeric value specifying the number of sigmas to use. |
k |
A numeric value. If the capacity index exceeds the |
contour |
Logical value indicating whether contour graph should be plotted. |
ylim |
The 'y' limits of the plot. |
... |
Arguments to be passed to or from methods. |
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd
ed, New York, John Wiley & Sons.
Vannman, K (1995) A Unified Approach to Capability Indices. Statitica Sinica,5,805-820.
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) mu <-xbar$center std.dev <-xbar$std.dev LSL=73.99; USL=74.01 qcs.cp(parameters = c(0,0),limits = c(LSL,USL), mu = mu,std.dev = std.dev,ylim=c(0,1)) #calculating all the indices qcs.cp(object = xbar,parameters = c(0,0), limits = c(LSL,USL),ylim=c(0,1)) qcs.cp(object = xbar,parameters = c(1,0), limits = c(LSL,USL),ylim=c(0,1)) qcs.cp(object = xbar,parameters = c(0,1), limits = c(LSL,USL),ylim=c(0,1)) qcs.cp(object = xbar,parameters = c(1,1), limits = c(LSL,USL),ylim=c(0,1))
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) mu <-xbar$center std.dev <-xbar$std.dev LSL=73.99; USL=74.01 qcs.cp(parameters = c(0,0),limits = c(LSL,USL), mu = mu,std.dev = std.dev,ylim=c(0,1)) #calculating all the indices qcs.cp(object = xbar,parameters = c(0,0), limits = c(LSL,USL),ylim=c(0,1)) qcs.cp(object = xbar,parameters = c(1,0), limits = c(LSL,USL),ylim=c(0,1)) qcs.cp(object = xbar,parameters = c(0,1), limits = c(LSL,USL),ylim=c(0,1)) qcs.cp(object = xbar,parameters = c(1,1), limits = c(LSL,USL),ylim=c(0,1))
Calculates ,
using the formulation
described by Tong and Chen (1998).
qcs.cpn( object, parameters = c(u = 0, v = 0), limits = c(lsl = -3, usl = 3), q = c(lq = -3, uq = 3), target = NULL, median = 0, nsigmas = 3, confidence = 0.9973 )
qcs.cpn( object, parameters = c(u = 0, v = 0), limits = c(lsl = -3, usl = 3), q = c(lq = -3, uq = 3), target = NULL, median = 0, nsigmas = 3, confidence = 0.9973 )
object |
qcs object of type |
parameters |
A vector specifying the |
limits |
A vector specifying the lower and upper specification limits. |
q |
A vector specifying the lower and upper quantiles. These values are
necessary, if |
target |
A value specifying the target of the process.
If it is |
median |
A value specifying the median of data. |
nsigmas |
A numeric value specifying the number of sigmas to use. |
confidence |
A numeric value between 0 and 1 specifying the probabilities
for computing the quantiles.
This values is used only when |
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd
ed, New York, John Wiley & Sons.
Tong, L.I. and Chen, J.P. (1998), Lower confidence limits of process capability
indices for nonnormal process distributions. International Journal of Quality & Reliability Management,
Vol. 15 No. 8/9, pp. 907-19.
library(qcr) ##' data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) x<-xbar$statistics[[1]] LSL=73.99; USL=74.01 median <-median(x) lq=as.numeric(quantile(x,probs=0.00135)) uq=as.numeric(quantile(x,probs=0.99865)) qcs.cpn(parameters = c(0,0),limits = c(LSL,USL), median = median, q=c(lq,uq)) qcs.cpn(object = xbar,parameters = c(0,0), limits = c(LSL,USL)) qcs.cpn(object = xbar,parameters = c(1,0), limits = c(LSL,USL)) qcs.cpn(object = xbar,parameters = c(0,1), limits = c(LSL,USL)) qcs.cpn(object = xbar,parameters = c(1,1), limits = c(LSL,USL))
library(qcr) ##' data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) x<-xbar$statistics[[1]] LSL=73.99; USL=74.01 median <-median(x) lq=as.numeric(quantile(x,probs=0.00135)) uq=as.numeric(quantile(x,probs=0.99865)) qcs.cpn(parameters = c(0,0),limits = c(LSL,USL), median = median, q=c(lq,uq)) qcs.cpn(object = xbar,parameters = c(0,0), limits = c(LSL,USL)) qcs.cpn(object = xbar,parameters = c(1,0), limits = c(LSL,USL)) qcs.cpn(object = xbar,parameters = c(0,1), limits = c(LSL,USL)) qcs.cpn(object = xbar,parameters = c(1,1), limits = c(LSL,USL))
This function is used to compute statistics required by the cusum chart.
qcs.cusum(x, ...) ## Default S3 method: qcs.cusum( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = NULL, decision.interval = 5, se.shift = 1, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.cusum( x, center = NULL, std.dev = NULL, decision.interval = 5, se.shift = 1, plot = FALSE, ... )
qcs.cusum(x, ...) ## Default S3 method: qcs.cusum( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = NULL, decision.interval = 5, se.shift = 1, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.cusum( x, center = NULL, std.dev = NULL, decision.interval = 5, se.shift = 1, plot = FALSE, ... )
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
A value or a vector of values specifying the sample sizes associated with each group. |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
std.dev |
A value or an available method specifying the within-group
standard deviation(s) of the process. |
decision.interval |
A numeric value specifying the number of standard errors of the summary statistics at which the cumulative sum is out of control. |
se.shift |
The amount of shift to detect in the process, measured in standard errors of the summary statistics. |
plot |
Logical value. If |
library(qcr) data(pistonrings) attach(pistonrings) res.qcd <- qcd(pistonrings, type.data = "dependence") res.qcs <- qcs.cusum(res.qcd, type = "cusum") summary(res.qcs) plot(res.qcs)
library(qcr) data(pistonrings) attach(pistonrings) res.qcd <- qcd(pistonrings, type.data = "dependence") res.qcs <- qcs.cusum(res.qcd, type = "cusum") summary(res.qcs) plot(res.qcs)
This function is used to compute statistics required by the ewma chart.
qcs.ewma(x, ...) ## Default S3 method: qcs.ewma( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = NULL, nsigma = 3, lambda = 0.2, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.ewma( x, center = NULL, std.dev = NULL, nsigma = 3, lambda = 0.2, plot = FALSE, ... )
qcs.ewma(x, ...) ## Default S3 method: qcs.ewma( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = NULL, nsigma = 3, lambda = 0.2, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.ewma( x, center = NULL, std.dev = NULL, nsigma = 3, lambda = 0.2, plot = FALSE, ... )
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
std.dev |
A value or an available method specifying the within-group standard deviation(s) of the process. Several methods are available for estimating the standard deviation in case of a continuous process variable. |
nsigma |
A numeric value used to compute control limits, specifying the number of standard deviations. |
lambda |
The smoothing parameter |
plot |
Logical value. If |
library(qcr) data(pistonrings) attach(pistonrings) res.qcd <- qcd(pistonrings, type.data = "dependence") res.qcs <- qcs.ewma(res.qcd, type = "ewma") summary(res.qcs) plot(res.qcs)
library(qcr) data(pistonrings) attach(pistonrings) res.qcd <- qcd(pistonrings, type.data = "dependence") res.qcs <- qcs.ewma(res.qcd, type = "ewma") summary(res.qcs) plot(res.qcs)
Estimate "Cpm"
using the method described by Kerstin Vannman(2001).
qcs.hat.cpm( object, limits = c(lsl = -3, usl = 3), target = NULL, mu = 0, std.dev = 1, nsigmas = 3, k0 = 1, alpha = 0.05, n = 50, contour = TRUE, ylim = NULL, ... )
qcs.hat.cpm( object, limits = c(lsl = -3, usl = 3), target = NULL, mu = 0, std.dev = 1, nsigmas = 3, k0 = 1, alpha = 0.05, n = 50, contour = TRUE, ylim = NULL, ... )
object |
qcs object of type |
limits |
A vector specifying the lower and upper specification limits. |
target |
A value specifying the target of the process.
If it is |
mu |
A value specifying the mean of data. |
std.dev |
A value specifying the within-group standard deviation. |
nsigmas |
A numeric value specifying the number of sigmas to use. |
k0 |
A numeric value. If the capacity index exceeds the |
alpha |
The significance level (by default alpha=0.05). |
n |
Size of the sample. |
contour |
Logical value indicating whether contour graph should be plotted. |
ylim |
The "y" limits of the plot. |
... |
Arguments to be passed to or from methods. |
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd
ed, New York, John Wiley & Sons.
Vannman, K. (2001). A Graphical Method to Control Process Capability. Frontiers in Statistical Quality Control,
No 6, Editors: H-J Lenz and P-TH Wilrich. Physica-Verlag, Heidelberg, 290-311.
Hubele and Vannman (2004). The E???ect of Pooled and Un-pooled Variance Estimators on Cpm When Using Subsamples.
Journal Quality Technology, 36, 207-222.
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) mu <-xbar$center std.dev <-xbar$std.dev LSL=73.99; USL=74.01 qcs.hat.cpm(limits = c(LSL,USL), mu = mu,std.dev = std.dev,ylim=c(0,1)) qcs.hat.cpm(object = xbar, limits = c(LSL,USL),ylim=c(0,1))
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) mu <-xbar$center std.dev <-xbar$std.dev LSL=73.99; USL=74.01 qcs.hat.cpm(limits = c(LSL,USL), mu = mu,std.dev = std.dev,ylim=c(0,1)) qcs.hat.cpm(object = xbar, limits = c(LSL,USL),ylim=c(0,1))
This function is used to compute statistics required by the np chart.
qcs.np(x, ...) ## Default S3 method: qcs.np( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.np(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
qcs.np(x, ...) ## Default S3 method: qcs.np( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.np(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-values vector specifying control limits. |
plot |
Logical value. If |
library(qcr) data(orangejuice) str(orangejuice) attach(orangejuice) datos.qcd <- qcd(data = orangejuice, var.index = 1, sample.index = 2, sizes = size, type.data = "atributte") res.qcs <- qcs.np(datos.qcd) summary(res.qcs) plot(res.qcs) datos.qcs <- qcs.np(orangejuice[trial,c(1,2)], sizes = orangejuice[trial,3]) plot(datos.qcs)
library(qcr) data(orangejuice) str(orangejuice) attach(orangejuice) datos.qcd <- qcd(data = orangejuice, var.index = 1, sample.index = 2, sizes = size, type.data = "atributte") res.qcs <- qcs.np(datos.qcd) summary(res.qcs) plot(res.qcs) datos.qcs <- qcs.np(orangejuice[trial,c(1,2)], sizes = orangejuice[trial,3]) plot(datos.qcs)
This function is used to compute statistics required by the xbar.one chart.
qcs.one(x, ...) ## Default S3 method: qcs.one( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("MR", "SD"), k = 2, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.one( x, center = NULL, std.dev = c("MR", "SD"), k = 2, conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
qcs.one(x, ...) ## Default S3 method: qcs.one( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("MR", "SD"), k = 2, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.one( x, center = NULL, std.dev = c("MR", "SD"), k = 2, conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data the sample sizes are obtained counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
std.dev |
A value or an available method specifying the within-group standard deviation(s) of the process. Several methods are available for estimating the standard deviation in case of a continuous process variable. |
k |
Number of successive pairs of observations for computing the standard deviation based on moving ranges of k points. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-value vector specifying control limits. |
plot |
Logical value. If |
## ## Continuous data ## library(qcr) x <- c(33.75, 33.05, 34, 33.81, 33.46, 34.02, 33.68, 33.27, 33.49, 33.20, 33.62, 33.00, 33.54, 33.12, 33.84) sample <- 1:length(x) datos <- data.frame(x,sample) datos.qcd <- qcd(datos) res.qcs <- qcs.one(datos.qcd) class(res.qcs) summary(res.qcs) plot(res.qcs, title = "Control Chart Xbar.one for pistonrings")
## ## Continuous data ## library(qcr) x <- c(33.75, 33.05, 34, 33.81, 33.46, 34.02, 33.68, 33.27, 33.49, 33.20, 33.62, 33.00, 33.54, 33.12, 33.84) sample <- 1:length(x) datos <- data.frame(x,sample) datos.qcd <- qcd(datos) res.qcs <- qcs.one(datos.qcd) class(res.qcs) summary(res.qcs) plot(res.qcs, title = "Control Chart Xbar.one for pistonrings")
This function is used to compute statistics required by the p chart.
qcs.p(x, ...) ## Default S3 method: qcs.p( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.p(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
qcs.p(x, ...) ## Default S3 method: qcs.p( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.p(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-values vector specifying control limits. |
plot |
Logical value. If |
library(qcr) data(orangejuice) str(orangejuice) attach(orangejuice) datos.qcd <- qcd(data = orangejuice, var.index = 1, sample.index = 2, sizes = size, type.data = "atributte") res.qcs <- qcs.p(datos.qcd) summary(res.qcs) plot(res.qcs) datos.qcs <- qcs.p(orangejuice[trial,c(1,2)], sizes = orangejuice[trial,3]) plot(datos.qcs)
library(qcr) data(orangejuice) str(orangejuice) attach(orangejuice) datos.qcd <- qcd(data = orangejuice, var.index = 1, sample.index = 2, sizes = size, type.data = "atributte") res.qcs <- qcs.p(datos.qcd) summary(res.qcs) plot(res.qcs) datos.qcs <- qcs.p(orangejuice[trial,c(1,2)], sizes = orangejuice[trial,3]) plot(datos.qcs)
Calculates the process capability indices cp, cpk, cpkL and cpkU for a given dataset and distribution. A histogram with a density curve is displayed along with the specification limits and a Quantile-Quantile Plot for the specified distribution.
qcs.pcr( object, distribution = c("normal", "beta", "chi-squared", "exponential", "f", "geometric", "lognormal", "log-normal", "logistic", "t", "negative binomial", "poisson", "weibull", "gamma"), limits = c(lsl = -3, usl = 3), target = NULL, std.dev = NULL, boxcox = FALSE, lambda = c(-5, 5), confidence = 0.9973, plot = TRUE, main = NULL, ... )
qcs.pcr( object, distribution = c("normal", "beta", "chi-squared", "exponential", "f", "geometric", "lognormal", "log-normal", "logistic", "t", "negative binomial", "poisson", "weibull", "gamma"), limits = c(lsl = -3, usl = 3), target = NULL, std.dev = NULL, boxcox = FALSE, lambda = c(-5, 5), confidence = 0.9973, plot = TRUE, main = NULL, ... )
object |
qcs object of type |
distribution |
Character string that represent the probability distribution of the data, such as: "normal", "beta", "chi-squared", "exponential", "f", "geometric", "lognormal", "log-normal", "logistic","t", "negative binomial", "poisson", "weibull", "gamma". |
limits |
A vector specifying the lower and upper specification limits. |
target |
A value specifying the target of the process.
If it is |
std.dev |
A value specifying the within-group standard deviation. |
boxcox |
Logical value (by default |
lambda |
A vector specifying or numeric value indicating lambda for the transformation. |
confidence |
A numeric value between 0 and 1 specifying the nivel for computing the specification limits. |
plot |
Logical value indicating whether graph should be plotted. |
main |
Title of the plot. |
... |
Arguments to be passed to or from methods. |
Montgomery, D.C. (1991) Introduction to Statistical Quality Control, 2nd
ed, New York, John Wiley & Sons.
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) limits = c(lsl = 73.99, usl = 74.01) qcs.pcr(xbar, "normal", limits = limits) qcs.pcr(xbar, "weibull", limits = limits)
library(qcr) data(pistonrings) xbar <- qcs.xbar(pistonrings[1:125,],plot = TRUE) limits = c(lsl = 73.99, usl = 74.01) qcs.pcr(xbar, "normal", limits = limits) qcs.pcr(xbar, "weibull", limits = limits)
This function is used to compute statistics required by the R chart.
qcs.R(x, ...) ## Default S3 method: qcs.R( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("UWAVE-R", "MVLUE-R"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.R( x, center = NULL, std.dev = c("UWAVE-R", "MVLUE-R"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
qcs.R(x, ...) ## Default S3 method: qcs.R( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("UWAVE-R", "MVLUE-R"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.R( x, center = NULL, std.dev = c("UWAVE-R", "MVLUE-R"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
std.dev |
A value or an available method specifying the within-group standard deviation(s) of the process. Several methods are available for estimating the standard deviation in case of a continuous process variable. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-values vector specifying control limits. |
plot |
Logical value. If |
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.R(pistonrings.qcd) class(res.qcs) plot(res.qcs,title="Control Chart R for pistonrings") summary(res.qcs)
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.R(pistonrings.qcd) class(res.qcs) plot(res.qcs,title="Control Chart R for pistonrings") summary(res.qcs)
This function is used to compute statistics required by the S chart.
qcs.S(x, ...) ## Default S3 method: qcs.S( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("UWAVE-SD", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.S( x, center = NULL, std.dev = c("UWAVE-SD", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
qcs.S(x, ...) ## Default S3 method: qcs.S( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("UWAVE-SD", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.S( x, center = NULL, std.dev = c("UWAVE-SD", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
std.dev |
A value or an available method specifying the within-group standard deviation(s) of the process. Several methods are available for estimating the standard deviation in case of a continuous process variable. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-values vector specifying control limits. |
plot |
Logical value. If |
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.S(pistonrings.qcd) class(res.qcs) plot(res.qcs,title="Control Chart S for pistonrings") summary(res.qcs)
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.S(pistonrings.qcd) class(res.qcs) plot(res.qcs,title="Control Chart S for pistonrings") summary(res.qcs)
This function is used to compute statistics required by the u chart.
qcs.u(x, ...) ## Default S3 method: qcs.u( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.u(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
qcs.u(x, ...) ## Default S3 method: qcs.u( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.u(x, center = NULL, conf.nsigma = 3, limits = NULL, plot = FALSE, ...)
x |
An object of class "qcd". |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-values vector specifying control limits. |
plot |
Logical value. If |
data(pcmanufact) attach(pcmanufact) str(pcmanufact) datos <- pcmanufact datos$sample <- 1:length(datos$x) str(datos) sizes <- datos[,2] datos.qcd <- qcd(data = datos, var.index = 1,sample.index = 2, sizes = sizes, type.data = "atributte") res.qcs <- qcs.u(datos.qcd) summary(res.qcs) plot(res.qcs)
data(pcmanufact) attach(pcmanufact) str(pcmanufact) datos <- pcmanufact datos$sample <- 1:length(datos$x) str(datos) sizes <- datos[,2] datos.qcd <- qcd(data = datos, var.index = 1,sample.index = 2, sizes = sizes, type.data = "atributte") res.qcs <- qcs.u(datos.qcd) summary(res.qcs) plot(res.qcs)
This function is used to compute statistics required by the xbar chart.
qcs.xbar(x, ...) ## Default S3 method: qcs.xbar( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("UWAVE-R", "UWAVE-SD", "MVLUE-R", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.xbar( x, center = NULL, std.dev = c("UWAVE-R", "UWAVE-SD", "MVLUE-R", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
qcs.xbar(x, ...) ## Default S3 method: qcs.xbar( x, var.index = 1, sample.index = 2, covar.index = NULL, covar.names = NULL, data.name = NULL, sizes = NULL, center = NULL, std.dev = c("UWAVE-R", "UWAVE-SD", "MVLUE-R", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... ) ## S3 method for class 'qcd' qcs.xbar( x, center = NULL, std.dev = c("UWAVE-R", "UWAVE-SD", "MVLUE-R", "MVLUE-SD", "RMSDF"), conf.nsigma = 3, limits = NULL, plot = FALSE, ... )
x |
An object of class "qcd" (Quality Control Data). |
... |
Arguments passed to or from methods. |
var.index |
A scalar with the column number corresponding to the observed data for the variable (the variable quality). Alternativelly can be a string with the name of the quality variable. |
sample.index |
A scalar with the column number corresponding to the index fo each group (sample). |
covar.index |
Optional. A scalar or numeric vector with the column number(s) corresponding to the covariate(s). Alternativelly it can be a character vector with the names of the covariates. |
covar.names |
Optional. A string or vector of strings indicating the names for the covariate columns. Only valid if there is more than one column of data. By default, takes the names from the original object. |
data.name |
A string specifying the name of the variable which appears on the plots. If not provided, it is taken from the object given as data. |
sizes |
Optional. A value or a vector of values specifying the sample sizes
associated with each group. For continuous data, the sample sizes are obtained
counting the non- |
center |
A value specifying the center of group statistics or the ”target” value of the process. |
std.dev |
A value or an available method specifying the within-group standard deviation(s) of the process. Several methods are available for estimating the standard deviation in case of a continuous process variable. |
conf.nsigma |
A numeric value used to compute control limits, specifying the
number of standard deviations (if |
limits |
A two-value vector specifying control limits. |
plot |
Logical value. If |
Montgomery, D.C. (2000)
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.xbar(pistonrings.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings I") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings II") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings III") summary(res.qcs) x <- droplevels(pistonrings[1:125,]) y <- droplevels(pistonrings[126:200,]) res.qcs <- qcs.xbar(x, data.name="Control Chart Xbar for pistonrings") plot(res.qcs) res.qcs <- qcs.add(x = res.qcs, value = y[,c(1,2)]) plot(res.qcs) summary(res.qcs) res.qcs <- qcs.xbar(pistonrings.qcd, std.dev="UWAVE-SD") class(res.qcs) plot(res.qcs,title="Control Chart Xbar for pistonrings (UWAVE-SD)") summary(res.qcs)
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.xbar(pistonrings.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings I") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings II") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings III") summary(res.qcs) x <- droplevels(pistonrings[1:125,]) y <- droplevels(pistonrings[126:200,]) res.qcs <- qcs.xbar(x, data.name="Control Chart Xbar for pistonrings") plot(res.qcs) res.qcs <- qcs.add(x = res.qcs, value = y[,c(1,2)]) plot(res.qcs) summary(res.qcs) res.qcs <- qcs.xbar(pistonrings.qcd, std.dev="UWAVE-SD") class(res.qcs) plot(res.qcs,title="Control Chart Xbar for pistonrings (UWAVE-SD)") summary(res.qcs)
This function removes observations from the sample which violates the rules of a process under control.
state.control(x)
state.control(x)
x |
Object qcs (Quality Control Statistical) |
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.xbar(pistonrings.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings I") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings II") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings III") summary(res.qcs)
## ## Continuous data ## library(qcr) data(pistonrings) str(pistonrings) pistonrings.qcd<-qcd(pistonrings) class(pistonrings.qcd) res.qcs <- qcs.xbar(pistonrings.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings I") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings II") summary(res.qcs) res.qcd <- state.control(res.qcs) res.qcs <- qcs.xbar(res.qcd) plot(res.qcs,title="Control Chart Xbar for pistonrings III") summary(res.qcs)