asample: Develop an Attribute Sampling Plan

Description Usage Arguments Value Examples

View source: R/asample.R


Develop an Attribute Sampling Plan


asample(AQL, CI, RQL, Power, N = 5e+05, n = 1000, c = NULL,
  listed = FALSE, oc = TRUE)



Acceptance Quality Limit and is the defined as the quality level that is the worst tolerable process average when continuing series of lots is submitted for acceptance sampling. The AQL represents the poorest level of quality for the manufacturer's process that the customer would consider to be acceptable as a process average and is thus a property of the manufacture's process and is not a property of the sampling plan. Note that the designation of an AQL does not suggest that this is a desirable quality level only that the process averages are consistently better than the AQL. Furthermore, the AQL is not intended to be a specification on the product, nor it is a target value for the manufacture's production process. The AQL is simply a standard against which to judge the lots as the manufacture's intent is to operate at a fallout level that is considerably better than the AQL. The value used is a rounded percentage value. For example, if a 1 percent non conformance is used for the process average acceptance then ALQ = 1 AND NOT 0.01. AQLs are reported in percentage values.


Confidence Interval (CI) = 1-Manufacturer's Risk(alpha). Denotes 1 - the probability that a good lot will be rejected, or 1 - the probability that a process producing acceptable value of quality characteristic will be rejected as performing unsatisfactory. This is also known as 1 - Type-I error. Unlike AQL and RQL, CI is a non-percentage value. For example, a 95 percent confidence level for an associated AQL would be CI = 0.95.


Reject able Quality Level and is the poorest level of quality that the consumer is willing to accept in an individual lot. Note that the RQL is not a characteristic of the sampling plan, but is a level of lot quality specified by the consumer. Alternate names for the RQL are the Lot Tolerance Percent Defective (LTPD) and the Limiting Quality Level (LQL). Similar to AQL, the RQL is percentage value and must be less than the AQL.


The power is the probability of correctly rejecting the null hypothesis and is denoted as Power = 1 - beta. Beta is the probability of accepting a lot of poor quality, or allowing a process that is operating in an unsatisfactory manner relative to some quality characteristic to continue in operation. Beta is also known as the Type-II error. Similar to CI, Power is a non-percentage value and 1-Power must be less than the CI.


500,000 by default. N = total lot size. If using the default value the hyper geometric reduces to the binomial in which the sampling plan can be thought of as with replacement. However, for small lot size AND where sampling is done without replacement N should be defined appropriately.


1,000 by default. n is simply a defined starting point for the sample size. In the event that n is greater than N then n will be set to equal N. Depending on how small the AQL and RQL get or how large the CI and Power get n may need to be increased to capture sample sizes that exceed 1,000.


Acceptance Number. Unless otherwise specified an acceptance number (c) is not used and the 4-5 parameters needed to calculate a sample size is used. However, c can be a single value or a vector of values in the event that one needs to compare sampling plans with different levels of acceptance numbers.


FALSE by default. If TRUE the output is a list that contains the data frames from the computations as well as the plot in case further analysis is needed from the output. If FALSE, the output is only the OC curve. By default this is set to FALSE and only the OC curve is provided in the output.


TRUE by default. If TRUE an OC curve will be generated. If FALSE an OC curve will not be gernated any only raw data from the sampling plan will be reported. NOTE: This is really only meant to prevent the computations for the OC curve from running if the OC curve isn't needed and just the raw sampling plan.


The sampling plan from the paramaters of AQL, CI, RQL, Power, N, &/or c


asample(AQL = 1, CI = 0.95, RQL = 5, Power = 0.90)
asample(AQL = 1, CI = 0.95, RQL = 5, Power = 0.90, N = 1000, c = 0:3, listed = TRUE, oc = FALSE)

PChemNick/qualityr documentation built on Oct. 30, 2019, 10:24 p.m.