Package 'Dodge'

Title: Acceptance Sampling Ideas Originated by H.F. Dodge
Description: A variety of sampling plans are able to be compared using evaluations of their operating characteristics (OC), average outgoing quality (OQ), average total inspection (ATI) etc.
Authors: A. Jonathan R. Godfrey [aut, cre], K. Govindaraju [aut]
Maintainer: A. Jonathan R. Godfrey <[email protected]>
License: GPL
Version: 0.9-4
Built: 2024-11-08 02:42:17 UTC
Source: https://github.com/ajrgodfrey/dodge

Help Index


Acceptance sampling functions

Description

A number of sampling plans can be compared for their operating characteristics and other commonly used functions.

Details

Package: Dodge
Type: Package
Version: 0.9-4
Date: 2020-12-13
License: GPL
LazyLoad: yes

Author(s)

Raj Govindaraju and Jonathan Godfrey

Maintainer: A. Jonathan R. Godfrey <[email protected]>

References

Dodge


Chain Sampling Plans

Description

Chain Sampling Plans for the binomial and Poisson distributions.

Usage

ChainBinomial(N, n, i, p = seq(0, 0.2, 0.001), Plots = TRUE)

Arguments

N

the lot size

n

the sample size

i

the number of preceding lots that are free from nonconforming units for the lot to be accepted

p

a vector of values for the possible fraction of product that is nonconforming

Plots

logical to request generation of the four plots

Value

A matrix containing the argument p as supplied and the calculated OC, ATI and ???

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

References

Dodge, H.F. (1955) “Chain Sampling Inspection Plan”, Industrial Quality Control 11(4), pp10-13.

Examples

require(Dodge)
ChainBinomial(1000, 20,3)
ChainPoisson(1000, 20,3)

Curtailed Average Sample Number

Description

Computes the average sample number for a curtailed inspection plan for single sampling plans. Functionality is currently available for only the binomial distribution.

Usage

CurtBinomial(n, Ac, p = seq(0, 0.5, 0.01), Plots = TRUE)

Arguments

n

the sample size (potential)

Ac

the acceptance number

p

a vector of values for the possible fraction of product that is nonconforming

Plots

logical to request generation of the four plots

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

Examples

CurtBinomial(20,1)

Double Sampling Plans

Description

Double Sampling Plans for the binomial and Poisson distributions.

Usage

DSPlanBinomial(N, n1, n2, Ac1, Re1, Ac2, p = seq(0, 0.25, 0.005), Plots = TRUE)

Arguments

N

the lot size

n1

the sample size in the first stage of the plan

n2

the sample size in the second stage of the plan

Ac1

the first stage acceptance number

Re1

the first stage rejection number

Ac2

the second stage acceptance number

p

a vector of values for the possible fraction of product that is nonconforming

Plots

logical to request generation of the four plots

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

References

Dodge, H.F. and Romig, H.G. (1959) “Sampling Inspection Tables, Single and Double Sampling”, Second edition, John Wiley and Sons, New York.

Examples

DSPlanBinomial(1000, 10, 10, 0, 2, 1)
DSPlanPoisson(1000, 10, 10, 0,2, 1)

Lot Sensitive Compliance Sampling Plans

Description

The lot sensitive compliance sampling plans for given parameters.

Usage

LSP(N, LTPD, beta, p = seq(0, 0.3, 0.001), Plots = TRUE)

Arguments

N

the lot size

LTPD

the lot tolerance percent defective, also known as the limiting quality

beta

consumer risk

p

fraction nonconforming

Plots

logical indicating if the four plots are required

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

References

Schilling, E.G. (1978) “A Lot Sensitive Sampling Plan for Compliance Testing and Acceptance Inspection”, Journal of Quality Technology 10(2), pp47-51.

Examples

LSP(1000, 0.04,0.05)

plot methods for the Dodge package

Description

Creates plots for analysing the design of an acceptance sampling procedure.

Usage

## S3 method for class 'AccSampPlan'
plot(x, y = NULL, ...)

Arguments

x

an object of class AccSampPlan, CurtSampPlan, or SeqSampPlan

y

ignored

...

further arguments passed to or from other methods.

Details

At this stage the plot.AccSampPlan method only plots the Operating Characteristic (OC) curve, the Average (AOQ) and (ATI) against the proportion (p) of product that is nonconforming. It also plots the curtailed sample size or the average sample number (ASN) against p. Further development is still required.

Author(s)

Jonathan Godfrey with some assistance from Raj Govindaraju

Examples

Plan1 = SSPlanBinomial(1000, 20,1, Plots=FALSE)
plot(Plan1)

print methods for the Dodge package

Description

Adds to the base functionality for the print() command. The accompanying plot methods are more sophisticated.

Usage

## S3 method for class 'AccSampPlan'
print(x, ...)

Arguments

x

an object of class AccSampPlan, CurtSampPlan, or SeqSampPlan

...

further arguments passed to or from other methods.

Details

These methods print the most necessary elements of the corresponding objects.

Author(s)

Jonathan Godfrey

See Also

The corresponding plot method is far more interesting. See plot.AccSampPlan for example.


Create a sequential sampling plan

Description

Selects the appropriate sequential sampling plan from the given inputs. The only distribution that has been used in functions thus far is the binomial, but further development is expected.

Usage

SeqDesignBinomial(N = NULL, AQL, alpha, LQL, beta, Plots = TRUE)

Arguments

N

the lot size, ignored for the design of the plan unless the underlying distribution is hypergeometric

AQL

Acceptable quality level

alpha

producer's risk

LQL

Limiting quality level

beta

consumers' risk

Plots

logical stating if the sequential chart should be plotted

Author(s)

Raj Govindaraju and Jonathan Godfrey


Attribute Sequential Sampling Plans

Description

Designs an attribute sequential sampling plan for given AQL, alpha, LQL, and beta. The user can request plots describing the performance of the plan.

Usage

SequentialBinomial(x, Plots = TRUE)

Arguments

x

an object of class SeqSampPlan, or at least having the same elements as one.

Plots

logical indicating if the four plots should be returned

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

Examples

PlanDesign=SeqDesignBinomial(AQL=0.01, alpha=0.05, LQL=0.04, beta=0.05, Plots=FALSE)
SequentialBinomial(PlanDesign)

Single Sampling Plan Designs

Description

Design a single sampling plan for given AQL, alpha, LQL, and beta. Currently there are functions for the binomial and Poisson distributions.

Usage

SSPDesignBinomial(AQL, alpha, LQL, beta)

Arguments

AQL

Acceptable quality level

alpha

producer's risk

LQL

Limiting quality level

beta

consumers' risk

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

References

Dodge, H.F. and Romig, H.G. (1959) “Sampling Inspection Tables, Single and Double Sampling”, Second edition, John Wiley and Sons, New York.

Examples

SSPDesignBinomial(0.01, 0.05, 0.04, 0.05)
SSPDesignPoisson(0.01, 0.05, 0.04, 0.05)

Single Sampling Plans

Description

Single sampling plans for the binomial, hypergeometric and Poisson distributions.

Usage

SSPlanBinomial(N, n, Ac, p = seq(0, 0.3, 0.001), Plots = TRUE)

Arguments

N

the lot size

n

the sample size

Ac

the acceptance number, being the maximum allowable number of non-conforming units or non-conformities

p

a vector of values for the possible fraction of product that is non-conforming

Plots

logical to request generation of the four plots

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

References

Dodge, H.F. and Romig, H.G. (1959) “Sampling Inspection Tables, Single and Double Sampling”, Second edition, John Wiley and Sons, New York.

Examples

SSPlanBinomial(1000, 20,1)
SSPlanHyper(5000, 200,3)
SSPlanPoisson(1000, 20,1)

Variable Sampling Plan Design

Description

Design the variable sampling plan for given AQL, alpha, LQL, and beta.

Usage

VSPDesign(AQL, alpha, LQL, beta)

Arguments

AQL

Acceptable quality level

alpha

producer's risk

LQL

Limiting quality level

beta

consumers' risk

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

Examples

VSPDesign(AQL=0.01, alpha=0.05, LQL=0.04, beta=0.05)

Variable Sampling Plans

Description

Variable sampling plans for known and unknown sigma, evaluated for given parameters.

Usage

VSPKnown(N, n, k, Pa = seq(0, 1, 0.001), Plots = TRUE)

Arguments

N

the lot size

n

the sample size

k

the acceptability constant

Pa

fraction nonconforming

Plots

logical indicating whether the four plots are required

Author(s)

Raj Govindaraju with minor editing by Jonathan Godfrey

Examples

VSPKnown(1000, 20,1)
VSPUnknown(1000, 20,1)