Type: | Package |
Title: | Retrieving Acceptance Sampling Schemes |
Version: | 1.7-2 |
Date: | 2023-09-06 |
Author: | John Lawson <lawsonjsl7net@gmail.com> |
Maintainer: | John Lawson <lawsonjsl7net@gmail.com> |
Description: | Functions are included for recalling AQL (Acceptable Quality Level or Acceptance Quality Level) Based single, double, and multiple attribute sampling plans from the Military Standard (MIL-STD-105E) - American National Standards Institute/American Society for Quality (ANSI/ASQ Z1.4) tables and for retrieving variable sampling plans from Military Standard (MIL-STD-414) - American National Standards Institute/American Society for Quality (ANSI/ASQ Z1.9) tables. The sources for these tables are listed in the URL: field. Also included are functions for computing the OC (Operating Characteristic) and ASN (Average Sample Number) coordinates for the attribute plans it recalls, and functions for computing the estimated proportion nonconforming and the maximum allowable proportion nonconforming for variable sampling plans. The MIL-STD AQL Sampling schemes were the most used and copied set of standards in the world. They are intended to be used for sampling a stream of lots, and were used in contract agreements between supplier and customer companies. When the US military dropped support of MIL-STD 105E and 414, The American National Standards Institute (ANSI) and the International Standards Organization (ISO) adopted the standard with few changes or no changes to the central tables. This package is useful because its computer implementation of these tables duplicates that available in other commercial software and subscription online calculators. |
URL: | https://archive.org/details/MIL-STD-105E_1 https://archive.org/details/MIL-STD-414 |
License: | GPL-2 |
LazyLoad: | yes |
Suggests: | R.rsp |
VignetteBuilder: | R.rsp |
NeedsCompilation: | no |
Packaged: | 2023-09-12 21:34:40 UTC; John |
Repository: | CRAN |
Date/Publication: | 2023-09-13 08:12:35 UTC |
This package contains functions to recall MIL-STD-105E - ANSI/ASQ Z1.4, and the MIL-STD-414 - ANSI/ASQ Z1.9 Variable Sampling Plans from the Public Domain Published Tables
Description
The AAQLSchemes package provides a functions to recall MIL-STD-105E - ANSI/ASQ Z1.4 - ISO2859-1 and MIL-STD-414 - ANSI Z1.9 - ISO3951-1 Sampling Plans from Published Tables.
Details
Package: | AQLSchemes |
Type: | Package |
Version: | 1.7-2 |
Date: | 2023-09-06 |
License: | GPL2.0 |
Dependencies: | |
LazyLoad: | yes |
Packaged: | 2023-09-06 19:54:07 UTC; Lawson |
Built: | R 3.5.1; i386-pc-mingw32; 2011-03-22 19:54:08 UTC; windows |
Index:
AADouble Calls function AAZ14Double AAMultiple Calls function AAZ14Multiple AASingle Calls function AAZ14Single AAZ14Double Recalls and prints Sampling plans AAZ14Multiple Recalls and prints Sampling Plans AAZ14Single Recalls and prints Sampling Plans AAZ19 Recalls and Prints Z19 Sampling Plans EPn Calulates the estimated proprtion non-conforming MPn Calculates the maximum allowable proportion non-conforming OCASNZ4S Calculates the OC values for an attribute single sampling plan OCASNZ4D Calculates the OC and ASN values for an attribute double sampling plan OCASNZ4M Calculates the OC and ASN values for an attribute multiple sampling plan
Author(s)
John Lawson <lawson@byu.edu>
Maintainer: John Lawson <lawson@byu.edu>
This function recalls MIL-STD-105E - ANSI/ASQ Z1.4 Double Sampling Plans from the published tables.
Description
This function calls the function AAZ14Double function that queries the user for the inspection level, lotsize, and AQL, and then it recalls the appropriate sample sizes, acceptance numbers and rejection numbers and returns a data frame with two rows and three columns.
Usage
AADouble(type)
Arguments
type |
type is either 'Normal', 'Tightened' or 'Reduced' to specify which type sampling plan is desired. |
Value
returns a data frame with two rows and three columns
Note
This function calls the function AAZ14Double to get the specifications and recall and return the plan in a data frame.
Author(s)
John S. Lawson lawson@byu.edu
References
<https://archive.org/details/MIL-STD-105E_1>
This function recalls MIL-STD-105E - ANSI/ASQ Z1.4 Multiple Sampling Plans from the published tables.
Description
This function calls the function AAZ14Multiple function that queries the user for the inspection level, lotsize, and AQL, and then it recalls the appropriate sample sizes, acceptance numbers and rejection numbers and returns a data frame.
Usage
AAMultiple(type)
Arguments
type |
type is either 'Normal', 'Tightened' or 'Reduced' to specify which type sampling plan is desired. |
Value
returns a data frame with seven rows and three columns
Note
This function calls the function AAZ14Multiple to get the specifications and recall and print the plan.
Author(s)
John S. Lawson lawson@byu.edu
References
<https://archive.org/details/MIL-STD-105E_1>
This function recalls MIL-STD-105E - ANSI/ASQ Z1.4 Single Sampling Plans from the published tables.
Description
This function calls the function AAZ14Single function that queries the user for the , inspection level, lotsize, and AQL, and then recalls and prints the appropriate sample sizes, acceptance numbers and rejection numbers and returns a data frame.
Usage
AASingle(type)
Arguments
type |
type is either 'Normal', 'Tightened' or 'Reduced' to specify which type sampling plan is desired. |
Value
returns a data frame with one row and three columns
Note
This function calls the function AAZ14Single to get the specifications and recall and print the plan.
Author(s)
John S. Lawson lawson@byu.edu
References
<https://archive.org/details/MIL-STD-105E_1>
This function queries the user for the specs and recalls MIL-STD-105E - ANSI/ASQ Z1.4 Double Sampling Plans from the published tables.
Description
This function is called by the function AADouble function.
Usage
AAZ14Double(PLAN, INSL, LOTS, AQL)
Arguments
PLAN |
PLAN is the plan type 1=normal, 2=Tightened, 3=reduced. |
INSL |
INSL is the inspection level, 1-7. |
LOTS |
LOTS is the lot size, 1-15. |
AQL |
AQL is the Acceptance Quality Level, 1-26. |
Value
returns a data frame with two rows and three columns
Note
This function is called by the function AADouble.
Author(s)
John S. Lawson lawson@byu.edu
This function queries the user for the specs and recalls MIL-STD-105E - ANSI/ASQ Z1.4 Multiple Sampling Plans from the published tables.
Description
This function is called by the function AAMultiple function.
Usage
AAZ14Multiple(PLAN, INSL, LOTS, AQL)
Arguments
PLAN |
PLAN is the plan type 1=normal, 2=Tightened, 3=reduced. |
INSL |
INSL is the inspection level, 1-7. |
LOTS |
LOTS is the lot size, 1-15. |
AQL |
AQL is the Acceptance Quality Level, 1-26. |
Value
returns a data frame with seven rows and three columns
Note
This function is called by the function AAMultiple.
Author(s)
John S. Lawson lawson@byu.edu
This function queries the user for the specs and recalls MIL-STD - ANSI/ASQ Z1.4 Double Sampling Plans from the published tables.
Description
This function is called by the function AASingle function.
Usage
AAZ14Single(PLAN, INSL, LOTS, AQL)
Arguments
PLAN |
PLAN is the plan type 1=normal, 2=Tightened, 3=reduced. |
INSL |
INSL is the inspection level, 1-7. |
LOTS |
LOTS is the lot size, 1-15. |
AQL |
AQL is the Acceptance Quality Level, 1-26. |
Value
returns a data frame with one row and three columns
Note
This function is called by the function AASingle.
Author(s)
John S. Lawson lawson@byu.edu
This function queries the user for the specs and recalls MIL-STD-414 variable sampling plans from the published tables.
Description
This function recalls Normal, Tightened and Reduced Plans including the sample size n, acceptability constant (k), and the maximum proportion nonconforming allowable M.
Usage
AAZ19(type,stype,INSL,LOTS,AQL)
Arguments
type |
type is the plan type 'Normal', 'Tightened', or 'Reduced', Normal is Default. |
stype |
stype is "known" or "unknown", unknown is Default |
INSL |
INSL is 1-5 |
LOTS |
LOTS is 1-16 |
AQL |
AQL is 1-11 |
Value
returns a vector of length 3 containing the sample size (n), acceptability constant (k), and the maximum proportion nonconforming allowable (M)).
Author(s)
John S. Lawson lawson@byu.edu
References
<https://archive.org/details/MIL-STD-414>
This function calulates the estimated proprtion non-conforming.
Description
This function calulates the estimated proprtion non-conforming with sigma unknown or known using the standardized distribution.
Usage
EPn(sample,sided,stype,LSL,USL,sigma,xbar,s,n)
Arguments
sample |
sample is a numeric vector of sampled values. |
sided |
sided is 'one' or 'two' depending on whether there is one or two specification limits. The default is 'one'. |
stype |
stype is 'known' or 'unknown' depending on whether the standard deviation is known. The default is 'unknown'. |
LSL |
LSL is the lower spoecification limit, leave it out if there is no lower specification limit. |
USL |
USL is the upper spoecification limit, leave it out if there is no upper specification limit. |
sigma |
sigma is the known standard deviation, leave it out if it is unknown an stype is 'unknown'. |
xbar |
sample mean. Leave it out if the vector sample is supplied. |
s |
sample standard deviation. Leave it out if the vector sample is supplied. |
n |
number of items in the sample. Leave it out if the vector sample is supplied. |
Value
returns a single number (the estimated proportion nonconforming)
Author(s)
John S. Lawson lawson@byu.edu
Examples
EPn(sided="one",stype="known",LSL=100,sigma=8,xbar=110,n=10)
EPn(sided="one",stype="unknown",LSL=225,xbar=255,s=15,n=42)
sample<-c(197,188,184,205,201)
EPn(sample,sided="one",USL=209)
sample<-c(197,188,184,205,201)
EPn(sample,sided="two",LSL=180,USL=209)
EPn(sided="two",stype="known",sigma=2,LSL=90,USL=100,xbar=96.68,n=21)
This function calulates the maximum allowable proprtion non-conforming.
Description
This function calulates the maximum allowable proprtion non-conforming with sigma unknown or known using the standardized distribution.
Usage
MPn(k,n,stype)
Arguments
k |
k is the acceptance constant for the variables sampling plan. |
stype |
stype is 'known' or 'unknown' depending on whether the standard deviation is known. The default is 'unknown'. |
n |
n is number of items in the sample required by the variables sampling plan. |
Value
returns a single number (the maximum allowable proportion nonconforming)
Author(s)
John S. Lawson lawson@byu.edu
References
Lawson, J. "An Introduction to Acceptance Sampling and SPC with R" pp 45=48.
Examples
MPn(k=1.6094,n=10,stype="known")
MPn(k=1.905285,n=42,stype="unknown")
This function creates a data frame containing three columns 1)proportion defective=pd, 2)OC=prob accept, and 3)ASN=average sample no.
Description
This function takes the data frame=plan created by the AAZ14Double function and and a vector of proportion defectives=pd. It calculates OC and ASN values and creates a data frame.
Usage
OCASNZ4D(plan,pd)
Arguments
plan |
plan is a data frame with two rows containing sample no's=n,acceptance no's=c, and rejection no's=r for first and second samples |
pd |
pd is a vector of values of the poprtion defective to b used in the OC ASN Curves |
Value
returns a data frame containing three columns 1)proportion defective=pd, 2)OC=prob accept, and 3)ASN=average sample no.
Note
This function calls the function AAZ14Double to get the specifications and recall and print the plan.
Author(s)
John S. Lawson lawson@byu.edu
Examples
pland<-data.frame(n=c(125,125),c=c(3,8), r=c(7,9))
Pnc<-seq(0,.08,.005)
OCASND<-OCASNZ4D(pland,Pnc)
OCASND$OC
OCASND$ASN
This function creates a data frame containing three columns 1)proportion defective=pd, 2)OC=prob accept, and 3)ASN=average sample no.
Description
This function takes the data frame=plan created by the AAZ14Multiple function and and a vector of proportion defectives=pd. It calculates OC and ASN values and creates a data frame.
Usage
OCASNZ4M(plan,pd)
Arguments
plan |
plan is a data frame with seven rows containing sample no's=n,acceptance no's=c, and rejection no's=r for first through seventh samples |
pd |
pd is a vector of values of the poprtion defective to b used in the OC ASN Curves |
Value
returns a data frame containing three columns 1)proportion defective=pd, 2)OC=prob accept, and 3)ASN=average sample no.
Note
This function calls the function AAZ14Double to get the specifications and recall and print the plan.
Author(s)
John S. Lawson lawson@byu.edu
Examples
planm<-data.frame(n=c(50,50,50,50,50,50,50),c=c(0,1,3,5,7,10,13),r=c(4,6,8,10,11,12,14))
Pnc<-seq(0,.08,.005)
OCASNM<-OCASNZ4M(planm,Pnc)
OCASNM$OC
OCASNM$ASN
This function creates a data frame containing three columns 1)proportion defective=pd, 2)OC=prob accept, and 3)ASN=average sample no.
Description
This function takes the data frame=plan created by the AAZ14Single function and and a vector of proportion defectives=pd. It calculates OC and ASN values and creates a data frame.
Usage
OCASNZ4S(plan,pd)
Arguments
plan |
plan is a data frame with two rows containing sample no's=n,acceptance no's=c, and rejection no's=r for first and second samples |
pd |
pd is a vector of values of the poprtion defective to b used in the OC ASN Curves |
Value
returns a data frame containing three columns 1)proportion defective=pd, 2)OC=prob accept, and 3)ASN=average sample no.
Note
This function calls the function AAZ14Double to get the specifications and recall and print the plan.
Author(s)
John S. Lawson lawson@byu.edu
Examples
plans<-data.frame(n=c(200),c=c(7),r=c(8))
Pnc<-seq(0,.08,.005)
OCASNS<-OCASNZ4S(plans,Pnc)
OCASNS$OC
OCASNS$ASN