Learn R Programming

AccSamplingDesign (version 0.0.7)

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

Value

An object of class "AttrPlan" or VarPlan.

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

Author

Ha Truong

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.

See Also

optPlan, OCdata

Examples

Run this code
# 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)

Run the code above in your browser using DataLab