manualPlan: Create manual acceptance sampling (AS) plan from User Inputs

View source: R/manualPlan.R

manualPlanR Documentation

Create manual acceptance sampling (AS) plan from User Inputs

Description

Constructs an AttrPlan or VarPlan object from the given parameters.

Usage

manualPlan(distribution = c("binomial", "poisson", "normal", "beta"),
           n = NULL, c = NULL, k = NULL,
           USL = NULL, LSL = NULL, sigma = NULL, theta = NULL,
           sigma_type = c("known", "unknown"),
           theta_type = c("known", "unknown"),
           method = c("delta_mle", "delta_mom", "gk_adjustment"))

Arguments

distribution

One of "binomial", "poisson", "normal", or "beta".

n

Sample size.

c

Acceptance number (for attribute sampling).

k

Acceptability constant (for variable sampling).

USL

Upper specification limit.

LSL

Lower specification limit.

sigma

Standard deviation (for normal plans).

theta

Precision parameter (for beta plans).

sigma_type

Either "known" or "unknown" (for normal).

theta_type

Either "known" or "unknown" (for beta).

method

Method used by an unknown-theta Beta plan. Delta–MLE is the default; alternatives are "delta_mom" and "gk_adjustment".

Details

This function provides a user-friendly wrapper to construct AS plan directly from parameters. Internally, it constructs the appropriate AttrPlan or VarPlan, from given paramenters.

Value

An object of class "AttrPlan" or VarPlan.

Author(s)

Ha Truong

See Also

optPlan, OCdata

Examples

# Attribute sampling with user-defined parameters
plan1 <- manualPlan(n = 100, c = 2, distribution = "binomial")

# Variable sampling (normal)
plan2 <- manualPlan(n = 30, k = 1.5, distribution = "normal", USL = 10, sigma = 1)

# Unknown-theta Beta plan using analytical Delta--MoM
plan3 <- manualPlan(n = 45, k = 2.2, distribution = "beta",
                    theta = 300, theta_type = "unknown", method = "delta_mom",
                    USL = 0.05)


AccSamplingDesign documentation built on Aug. 25, 2026, 9:08 a.m.