Introduction to Process Performance Qualification (PPQ) Sampling Plan R Package

Yalin Zhu (yalin.zhu@merck.com)

2020-10-07

This vignette summarizes the functions in the PPQplan package, and provides some examples to illustrates how to use the package.

Note: in order to better perform the dynamic plots, it is recommended to run the following code in RStudio.

devtools::load_all()
## Loading PPQplan

Functions

This package provides several S3 functions listed as follows:

rl_pp: calculates probability of pass the specification test.

Example: Consider some sterile concentration assay as a CQA, the lower and upper specification limits are 95% and 105%, if the hypothetical mean and standard deviation are 98% and 1%, then the probability of passing the specification test will be calculated as follow.

## [1] 0.9986501

The following four functions are mainly for the sampling plan using statistical intervals with general multiplier

For the above example, assume the PPQ study reports a sample of 10 assay results per batch, test only one batch. Then a general multiplier for constructing 95% two-sided prediction interval can be calculated as \(k=2.373\).

PPQ_pp: calculates the probability of passing some critical quality attributes (CQA) PPQ test using a general constant multiplier k.

## [1] 0.8604419

Comparing different scenarios for hypothetical mean and standard deviation:

PPQ_occurve: plots OC curves for specification test and PPQ plan, with the options of customizing CQA name, unit, number of batch, optimizing the plans, etc.

The function can also optimize the baseline and high performance sampling plan1 by using add.reference option.

We can also optimize and show the Baseline and High performance reference lines only:

Since \(k=2.373\) is between 1.798 (baseline) and 2.945 (high performance), the 95% confidence interval is suitable for this PPQ plan.

PPQ_ggplot: Dynamic Heatmap (or Contour Plot) for PPQ assessment with parameter space.

Plot a dynamic heat map. User can hover on the plot to interactively evaluate the plan with dynamic = TRUE option.

The following three functions are used for sampling plan with prediction interval.

pi_pp: calculates the probability of passing the PPQ test using prediction interval with confidence level \(100 \times 1-\alpha\).

Use the same example with alpha=0.05 option.

## [1] 0.8606111

The following three functions are used for sampling plan with tolerance interval.

ti_pp: calculates the probability of passing the PPQ test using one-sided or two-sided tolerance interval with confidence level \(100 \times 1-\alpha\).

Use the same example with alpha=0.05 option.

## [1] 0.9942658
## [1] 0.6185582

ti_occurve: plots OC curves for specification test and PPQ plan, with the options of customizing CQA name, unit, number of batch, optimizing the plans, etc.

Another example is test Extractable Volume using one-sided lower tolerance interval2.

  1. NV = 1mL, select 5 containers and pool them together

  1. NV = 3mL, select 5 containers but not pool

  1. NV = 6mL, select 3 containers but not pool

The package also provides two functions for a general sampling plan based on lower and/or upper specification limits.

pp: calculate the probability of passing general upper and/or lower specification limit.

## [1] 0.02568295

heatmap_ly: plot a plain or dynamic heatmap (or contour plot) for a general sampling plan with specification limit.


  1. Burdick, R. K., LeBlond, D. J., Pfahler, L. B., Quiroz, J., Sidor, L., Vukovinsky, K., & Zhang, L. (2017). Statistical Applications for Chemistry, Manufacturing and Controls (CMC) in the Pharmaceutical Industry.

  2. USP <1> https://www.usp.org/sites/default/files/usp/document/harmonization/gen-method/q08_pf_31_1_2005.pdf.