plot.AttrPlan: Plot the OC Curve for Attribute Sampling Plans

View source: R/optAttrPlan.R

plot.AttrPlanR Documentation

Plot the OC Curve for Attribute Sampling Plans

Description

Plots the Operating Characteristic (OC) curve for an attribute sampling plan object of class AttrPlan.

Usage

## S3 method for class 'AttrPlan'
plot(x, pd = NULL, ...)

Arguments

x

An object of class AttrPlan representing an attribute acceptance sampling plan.

pd

Optional vector of proportions of nonconforming items. If NULL (default), a range is automatically generated.

...

Additional graphical parameters passed to plot().

Details

This method computes and visualizes the probability of acceptance (P(accept)) as a function of the proportion of nonconforming items in the population, based on the attribute sampling plan.

The plot also includes reference lines at the plan's producer and consumer quality levels (PRQ, CRQ) and their corresponding acceptance probabilities.

Value

A plot showing the OC curve for the given attribute sampling plan.

Author(s)

Ha Truong

See Also

optAttrPlan, accProb, OCdata

Examples

# Create attribute plan
plan <- optAttrPlan(PRQ = 0.01, CRQ = 0.1)

# Plot OC curve
plot(plan)

# With custom pd
plot(plan, pd = seq(0, 0.15, by = 0.001))

AccSamplingDesign documentation built on June 27, 2025, 1:08 a.m.