Drift-Aware Risk-Guaranteed Acceptance Sampling

Implements drift-aware risk-guaranteed acceptance sampling methods for adaptive lot disposition. The package provides tools for classical acceptance sampling, producer-risk and consumer-risk assessment, exponentially weighted moving average drift monitoring, adaptive tightening policies, decision fragility analysis, and safety-cost Pareto frontier construction. Classical binomial acceptance-plan design is described in the NIST/SEMATECH e-Handbook of Statistical Methods < https://www.itl.nist.gov/div898/handbook/pmc/section2/pmc232.htm>. Exponentially weighted moving averages follow Roberts (1959) . The methods are intended for simulation studies, supplier quality monitoring, and audit-oriented inspection decision support.


drasR

Drift-Aware Risk-Guaranteed Acceptance Sampling

drasR implements Drift-Aware Risk-Guaranteed Acceptance Sampling for adaptive lot disposition under process drift.

The package extends classical acceptance sampling by adding:

  • producer-risk and consumer-risk assessment,
  • EWMA-based process drift monitoring,
  • adaptive inspection tightening,
  • Monte Carlo evaluation,
  • policy tuning,
  • low-cost, balanced, and high-safety policy selection,
  • safety-cost frontier visualisation.

Installation

# Development version
# install.packages("devtools")
# devtools::install_github("YOUR-GITHUB-USERNAME/drasR")

Basic example

library(drasR)

plan <- find_plan(
  aql = 0.01,
  ltpd = 0.05,
  alpha = 0.05,
  beta = 0.10
)

plan

Compare fixed acceptance sampling with DRAS

set.seed(123)

result <- run_dras_experiment(
  n_reps = 100,
  scenario = "sudden_deterioration",
  seed = 123
)

result

Tune DRAS policies

tuned <- tune_dras_policy(
  n_reps = 100,
  scenario = "sudden_deterioration",
  seed = 123
)

selected <- select_dras_policy(tuned)

selected

Plot safety-cost frontier

plot_dras_frontier(tuned, selected)

Interpretation

drasR helps users study how adaptive inspection can reduce false acceptance of bad lots under process drift while making the inspection-cost trade-off explicit.

Status

This package is under active development. The current version focuses on simulation-based evaluation and methodological development.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("drasR")

0.1.0 by Muhammad Zahir Khan, 15 hours ago


https://github.com/zerish12/drasR


Report a bug at https://github.com/zerish12/drasR/issues


Browse source code at https://github.com/cran/drasR


Authors: Muhammad Zahir Khan [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports stats, graphics, utils

Suggests testthat, knitr, rmarkdown


See at CRAN