| Title: | Data and Functions for "An Intro. to Accept. Samp. & SPC/R" |
|---|---|
| Description: | Contains data frames and functions used in the book "An Introduction to Acceptance Sampling and SPC with R". This book is available electronically at <https://bookdown.org/>. A physical copy will be published by CRC Press. |
| Authors: | John Lawson |
| Maintainer: | John Lawson <[email protected]> |
| License: | GPL-2 |
| Version: | 1.2.1 |
| Built: | 2026-05-20 09:26:54 UTC |
| Source: | https://github.com/cran/IAcsSPCR |
Calculates ARL for Lucas's Cusum Chart for Attribute Data
arl(h=2,k=2,lambda=1,shift=.5)arl(h=2,k=2,lambda=1,shift=.5)
h |
input - this is the decision limit. It should be an even number, so that h/2 for the FIR feature will also be an integer. |
k |
input - this is the reference value. It should be calculated as (mu_d-mu_a)/ln(mu_d-mu_a), where mu_a is the in-control Poisson mean and mu_d mean to detect. k should be rounded to an integer. |
lambda |
input - this is the in-control Poisson mean. |
shift |
input - this is the number of standard deviation shift from the in-control mean to the mean to detect , i.e., lambda+shift*sqrt(lambda)=mu_d. |
returned list containing the ARL and the ARL with FIR.
John Lawson
Lucas, J.M.(1985) "Counted data cusums", Technometrics, Vol. 27, No. 2, pp129-143.
library(IAcsSPCR) arl(h=6,k=2,lambda=1.88,shift=0) arl(h=6,k=2,lambda=1.88,shift=.9627) { }library(IAcsSPCR) arl(h=6,k=2,lambda=1.88,shift=0) arl(h=6,k=2,lambda=1.88,shift=.9627) { }
Data from M. Gonzales-de la Parra & P. Rodriguez-Loaiza "Application of the Multivariate T2 Chart and the Mason-Tracy-Young Decomposition Procedure to Study the Consistency of Impurity profiles of Drug Substances"
data(DrugI)data(DrugI)
A data frame with 30 observations on the following 6 variables.
observationa numeric vector containing observation numbers from 1 to 30
Aa numeric vector containing values of impurity A in ppm
Ba numeric vector containing values of impurity B in ppm
Da numeric vector containing values of impurity D in ppm
Ea numeric vector containing values of impurity E in ppm
Ga numeric vector containing values of impurity G in ppm
data(DrugI)data(DrugI)
Data from M. Gonzales-de la Parra & P. Rodriguez-Loaiza "Application of the Multivariate T2 Chart and the Mason-Tracy-Young Decomposition Procedure to Study the Consistency of Impurity profiles of Drug Substances"
data(DrugIn)data(DrugIn)
A data frame with 10 observations on the following 6 variables.
observationa numeric vector containing observation numbers from 1 to 10
Aa numeric vector containing values of impurity A in ppm
Ba numeric vector containing values of impurity B in ppm
Da numeric vector containing values of impurity D in ppm
Ea numeric vector containing values of impurity E in ppm
Ga numeric vector containing values of impurity G in ppm
data(DrugIn)data(DrugIn)
Generated data
data(Frame)data(Frame)
A data frame with 100 observations on the following 4 variables.
subgroupa numeric vector containing subgroup numbers from 1 to 10
V2a numeric vector containing values of quality characteristic x1
V3a numeric vector containing values of quality characteristic x2
V4a numeric vector containing values of quality characteristic x3
data(Frame)data(Frame)
This function makes a control chart of the generalized variance, |S|.
GVcontrol(DF,m,n,p)GVcontrol(DF,m,n,p)
DF |
input - this is dataframe containing the subgrouped multivariate data. One line for each observation and one column for each variable or quality characteristic being monitored. The first column is a subgroup indicator numbered from 1 to m, with n repeats of each. There should be m x n rows and p + 1 columns. |
m |
input this is the number of observations in each subgroup |
n |
input this is the known (or estimate from a Phase I study) mean vector of the variables |
p |
input this is the number of quality characteristics |
returned list containing the upper control limit, the covariance matrix (S), the generalized variance (|S|), the mean vector (mu), and a vector of the generalized variances (|Si|, i=1,2,...m) within each subgroup.
John Lawson
Alt, F. B. (1985) "Multivariate Quality Control", Encyclopedia of Statistical Sciences, Vol. 6 Editors N. L. Johnson and S. Kotz, John Wiley and Sons, N. Y.
library(IAcsSPCR) data(Ryan92) GVcontrol(Ryan92,20,4,2) { }library(IAcsSPCR) data(Ryan92) GVcontrol(Ryan92,20,4,2) { }
Data from the Phase I multivariate data from Lowry, Woodall, Champ, and Rigdon
data(Lowry)data(Lowry)
A data frame with 10 observations on the following 2 variables.
x1a numeric vector containing values of quality characteristic x1
x2a numeric vector containing values of quality characteristic x2
C. Lowry, W. Woodall, C. Champ, and S. Rigdon, "A Multivariate Exponentially Weighted Moving Average Control Chart", Technometrics (34),pp 46-53, 1992.
data(Lowry)data(Lowry)
Computes a MEWMA using the method of Lowry, Woodall, Champ and Rigdon. The number of variables p must be between 2 and 10, r is fixed at .1
MEWMA(X,Sigma=NULL,mu=NULL,Sigma.known=TRUE)MEWMA(X,Sigma=NULL,mu=NULL,Sigma.known=TRUE)
X |
input - this is a matrix or data frame containing the multivariate data. One line for each observation and one column for each variable or quality characteristic being monitored. |
Sigma |
input this is the known (or estimate from a Phase I study) covariance matrix of the variables |
mu |
input this is the known (or estimate from a Phase I study) mean vector of the variables |
Sigma.known |
input this is a logical variable, if TRUE, Sigma, and mu must be supplied, if FALSE the function will estimate them from the data in X |
returned list containing the upper control limit, the covariance matrix and the mean vector.
John Lawson
Lowry, Woodall, Champ and Rigdon(1992)<https://www.tandfonline.com/doi/abs/10.1080/00401706.1992.10485232.>
data(Lowry) Sigma<-matrix(c(1, .5, .5, 1), nrow=2, ncol=2) mu<-c(0,0) MEWMA(Lowry,Sigma,mu,Sigma.known=TRUE) MEWMA(Lowry,Sigma.known=FALSE) mu5<-c(-.314,.32) Sig5<-matrix(c(1.16893, -.3243, -.3243, 1.16893), nrow=2, ncol=2) MEWMA(Lowry,Sig5,mu5,Sigma.known=TRUE)data(Lowry) Sigma<-matrix(c(1, .5, .5, 1), nrow=2, ncol=2) mu<-c(0,0) MEWMA(Lowry,Sigma,mu,Sigma.known=TRUE) MEWMA(Lowry,Sigma.known=FALSE) mu5<-c(-.314,.32) Sig5<-matrix(c(1.16893, -.3243, -.3243, 1.16893), nrow=2, ncol=2) MEWMA(Lowry,Sig5,mu5,Sigma.known=TRUE)
Data from the Phase I multivariate data from Ryan's Table 9.2 used in chapter 7 of An Introduction to Acceptance Sampling and SPC with R
data(Ryan92)data(Ryan92)
A data frame with 80 observations on the following 2 variables.
subgroupa numeric vector containing subgroup numbers from 1 to 20
x1a numeric vector containing values of quality characteristic x1
x2a numeric vector containing values of quality characteristic x2
Statistical Methods for Quality Improvement, by Thomas P. Ryan, John Wiley and Sons Inc.
data(Ryan92)data(Ryan92)
Data for Exercise 2 Chapter 7 of An Introduction to Acceptance Sampling and SPC with R
data(Sample)data(Sample)
A data frame with 125 observations on the following 5 variables.
subgroupa numeric vector containing subgroup numbers from 1 to 25
V1a numeric vector containing values of quality characteristic V1
V2a numeric vector containing values of quality characteristic V2
V3a numeric vector containing values of quality characteristic V3
V4a numeric vector containing values of quality characteristic V4
data(Sample)data(Sample)
Data from Phase I
data(x2)data(x2)
A numeric vector of length 50.
x1a numeric vector
data(x1)data(x1)
Data from Phase II
data(x2)data(x2)
A numeric vector of length 50.
x2a numeric vector
data(x2)data(x2)
Data from the Phase II multivariate data for Ryan's Table 9.2 used in chapter 7 of An Introduction to Acceptance Sampling and SPC with R
data(Xnew)data(Xnew)
A data frame with 80 observations on the following 2 variables.
subgroupa numeric vector containing subgroup numbers from 1 to 20
x1a numeric vector containing values of quality characteristic x1
x2a numeric vector containing values of quality characteristic x2
data(Xnew)data(Xnew)