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"))

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).

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)


AccSamplingDesign documentation built on Aug. 8, 2025, 7:32 p.m.