# Example for normal distribution plan
norm_plan <- optVarPlan(
PRQ = 0.025, # Acceptable quality level (% nonconforming)
CRQ = 0.1, # Rejectable quality level (% nonconforming)
alpha = 0.05, # Producer's risk
beta = 0.1, # Consumer's risk
distribution = "normal",
USL = 10
)
summary(norm_plan)
# Example for beta distribution plan
beta_plan <- optVarPlan(
PRQ = 0.025, # Target quality level (% nonconforming)
CRQ = 0.1, # Minimum quality level (% nonconforming)
alpha = 0.05, # Producer's risk
beta = 0.1, # Consumer's risk
distribution = "beta",
theta = 44000000, # Beta distribution parameter
LSL = 0.00001
)
summary(beta_plan)
Run the code above in your browser using DataLab