Package 'IAcsSPCR'

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: 2025-02-27 03:00:28 UTC
Source: https://github.com/cran/IAcsSPCR

Help Index


ARL for Lucas's Cusum Chart for Attribute Data

Description

Calculates ARL for Lucas's Cusum Chart for Attribute Data

Usage

arl(h=2,k=2,lambda=1,shift=.5)

Arguments

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.

Value

returned list containing the ARL and the ARL with FIR.

Author(s)

John Lawson

References

Lucas, J.M.(1985) "Counted data cusums", Technometrics, Vol. 27, No. 2, pp129-143.

Examples

library(IAcsSPCR)
arl(h=6,k=2,lambda=1.88,shift=0)
arl(h=6,k=2,lambda=1.88,shift=.9627)
{
  }

Drug Impurities data - Phase I

Description

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"

Usage

data(DrugI)

Format

A data frame with 30 observations on the following 6 variables.

observation

a numeric vector containing observation numbers from 1 to 30

A

a numeric vector containing values of impurity A in ppm

B

a numeric vector containing values of impurity B in ppm

D

a numeric vector containing values of impurity D in ppm

E

a numeric vector containing values of impurity E in ppm

G

a numeric vector containing values of impurity G in ppm

Examples

data(DrugI)

Drug Impurities data - Phase II

Description

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"

Usage

data(DrugIn)

Format

A data frame with 10 observations on the following 6 variables.

observation

a numeric vector containing observation numbers from 1 to 10

A

a numeric vector containing values of impurity A in ppm

B

a numeric vector containing values of impurity B in ppm

D

a numeric vector containing values of impurity D in ppm

E

a numeric vector containing values of impurity E in ppm

G

a numeric vector containing values of impurity G in ppm

Examples

data(DrugIn)

Example multivariate data

Description

Generated data

Usage

data(Frame)

Format

A data frame with 100 observations on the following 4 variables.

subgroup

a numeric vector containing subgroup numbers from 1 to 10

V2

a numeric vector containing values of quality characteristic x1

V3

a numeric vector containing values of quality characteristic x2

V4

a numeric vector containing values of quality characteristic x3

Examples

data(Frame)

Control Chart for the generalized variance |S|

Description

This function makes a control chart of the generalized variance, |S|.

Usage

GVcontrol(DF,m,n,p)

Arguments

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

Value

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.

Author(s)

John Lawson

References

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.

Examples

library(IAcsSPCR)
data(Ryan92)
GVcontrol(Ryan92,20,4,2)
{
  }

Phase I multivariate data from Lowry, Woodall, Champ and Rigdon

Description

Data from the Phase I multivariate data from Lowry, Woodall, Champ, and Rigdon

Usage

data(Lowry)

Format

A data frame with 10 observations on the following 2 variables.

x1

a numeric vector containing values of quality characteristic x1

x2

a numeric vector containing values of quality characteristic x2

Source

C. Lowry, W. Woodall, C. Champ, and S. Rigdon, "A Multivariate Exponentially Weighted Moving Average Control Chart", Technometrics (34),pp 46-53, 1992.

Examples

data(Lowry)

Multivariate EWMA Control Chart

Description

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

Usage

MEWMA(X,Sigma=NULL,mu=NULL,Sigma.known=TRUE)

Arguments

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

Value

returned list containing the upper control limit, the covariance matrix and the mean vector.

Author(s)

John Lawson

References

Lowry, Woodall, Champ and Rigdon(1992)<https://www.tandfonline.com/doi/abs/10.1080/00401706.1992.10485232.>

Examples

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)

Phase I multivariate data from Ryan's Table 9.2

Description

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

Usage

data(Ryan92)

Format

A data frame with 80 observations on the following 2 variables.

subgroup

a numeric vector containing subgroup numbers from 1 to 20

x1

a numeric vector containing values of quality characteristic x1

x2

a numeric vector containing values of quality characteristic x2

Source

Statistical Methods for Quality Improvement, by Thomas P. Ryan, John Wiley and Sons Inc.

Examples

data(Ryan92)

Phase I multivariate data from Ryan's Table 9.2

Description

Data for Exercise 2 Chapter 7 of An Introduction to Acceptance Sampling and SPC with R

Usage

data(Sample)

Format

A data frame with 125 observations on the following 5 variables.

subgroup

a numeric vector containing subgroup numbers from 1 to 25

V1

a numeric vector containing values of quality characteristic V1

V2

a numeric vector containing values of quality characteristic V2

V3

a numeric vector containing values of quality characteristic V3

V4

a numeric vector containing values of quality characteristic V4

Examples

data(Sample)

Phase I data for exercise 7 Chapt 6

Description

Data from Phase I

Usage

data(x2)

Format

A numeric vector of length 50.

x1

a numeric vector

Examples

data(x1)

Phase II data for exercise 7 Chapt 6

Description

Data from Phase II

Usage

data(x2)

Format

A numeric vector of length 50.

x2

a numeric vector

Examples

data(x2)

Phase II for Ryan's Table 9.2

Description

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

Usage

data(Xnew)

Format

A data frame with 80 observations on the following 2 variables.

subgroup

a numeric vector containing subgroup numbers from 1 to 20

x1

a numeric vector containing values of quality characteristic x1

x2

a numeric vector containing values of quality characteristic x2

Examples

data(Xnew)