# Variable sampling plan with specification limits
plan <- optVarPlan(
PRQ = 0.025, CRQ = 0.1,
alpha = 0.05, beta = 0.1,
distribution = "normal",
USL = 3, sigma = 0.1
)
# Plot by proportion nonconforming
plot(plan, by = "pd")
# Plot by estimated mean level (requires spec_limit and limit_type)
plot(plan, by = "mean")
# Custom pd vector
plot(plan, pd = seq(0.01, 0.15, by = 0.001))
Run the code above in your browser using DataLab