# Example 1: Variables Sampling (Normal distribution)
plan <- optVarPlan(
PRQ = 0.025,
CRQ = 0.1,
alpha = 0.05,
beta = 0.1,
distribution = "normal"
)
# Generate OC data from optimal plan
oc_data <- OCdata(plan, pd = seq(0, 0.15, by = 0.001))
# Plot the OC curve
plot(oc_data)
# Example 2: Attributes Sampling
# Generate OC data from custom plan
oc_data2 <- OCdata(n = 132, c = 5, distribution = "binomial",
pd = seq(0, 0.15, by = 0.001))
# Plot the OC curve
plot(oc_data2)
Run the code above in your browser using DataLab