Title: | Process Performance Qualification (PPQ) Plans in Chemistry, Manufacturing and Controls (CMC) Statistical Analysis |
---|---|
Description: | Assessment for statistically-based PPQ sampling plan, including calculating the passing probability, optimizing the baseline and high performance cutoff points, visualizing the PPQ plan and power dynamically. The analytical idea is based on the simulation methods from the textbook Burdick, R. K., LeBlond, D. J., Pfahler, L. B., Quiroz, J., Sidor, L., Vukovinsky, K., & Zhang, L. (2017). Statistical Methods for CMC Applications. In Statistical Applications for Chemistry, Manufacturing and Controls (CMC) in the Pharmaceutical Industry (pp. 227-250). Springer, Cham. |
Authors: | Yalin Zhu [aut, cre] , Merck & Co., Inc. [cph] |
Maintainer: | Yalin Zhu <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.1.0 |
Built: | 2024-11-03 03:20:50 UTC |
Source: | https://github.com/allenzhuaz/ppqplan |
The function for dynamically plotting (ggplot) the heatmap to evaluate the sampling plan based on a general lower and/or upper specification limits.
heatmap_ly(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, test.point, dynamic)
heatmap_ly(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, test.point, dynamic)
attr.name |
(optional) user-defined attribute name for sampling plan assessment |
attr.unit |
(optional) user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
test.point |
(optional) actual process data points for testing whether the processes pass PPQ |
dynamic |
logical; if |
A Plain or Dynamic Heatmap for Sampling Plan Assessment.
Yalin Zhu
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. Springer.
pp
and PPQ.occurve
.
## Not run: heatmap_ly(attr.name = "Thickness", attr.unit = "%",Llim = -0.2, Ulim = 0.2, mu = seq(-0.2, 0.2, 0.001), sigma = seq(0,0.2, 0.001), test.point=data.frame(c(0.1,-0.05),c(0.15,0.05)), n=2, dynamic = T) ## End(Not run)
## Not run: heatmap_ly(attr.name = "Thickness", attr.unit = "%",Llim = -0.2, Ulim = 0.2, mu = seq(-0.2, 0.2, 0.001), sigma = seq(0,0.2, 0.001), test.point=data.frame(c(0.1,-0.05),c(0.15,0.05)), n=2, dynamic = T) ## End(Not run)
Estimates k-factors for tolerance intervals based on Howe's method with normality assumption.
k_factor(n, alpha = 0.05, P = 0.99, side = 1)
k_factor(n, alpha = 0.05, P = 0.99, side = 1)
n |
Sample size |
alpha |
The level chosen such that (1-alpha) is the confidence level. |
P |
The proportion of the population to be covered by the tolerance interval. |
side |
Whether a 1-sided or 2-sided tolerance interval is required (determined by |
The estimated k-factor for tolerance intervals assuming normality.
This function is a simplified version of tolerance::K.factor()
, only considering Howe's method.
ti_pp
k_factor(10, P = 0.95, side = 2)
k_factor(10, P = 0.95, side = 2)
The function for plotting the heatmap to evaluate the PPQ plan based on the specification test, given lower and upper specification limits.
pi_ctplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, test.point)
pi_ctplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, test.point)
attr.name |
user-defined attribute name for PPQ assessment |
attr.unit |
user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
alpha |
significant level for constructing the prediction interval. |
test.point |
(optional) actual process data points for testing whether the processes pass PPQ |
Heatmap (or Contour Plot) for PPQ Assessment.
Yalin Zhu
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. Springer.
pi_pp
and pi_occurve
.
## Not run: ## Example verifying simulation resutls in the textbook page 249 mu <- seq(95, 105, 0.1) sigma <- seq(0.2, 3.5, 0.1) pi_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", mu = mu, sigma = sigma, Llim=95, Ulim=105) mu <- seq(90, 110, 0.5) pi_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", mu = mu, sigma = sigma, Llim=90, Ulim=110) mu <- seq(95,105,0.1) sigma <- seq(0.1,2.5,0.1) pi_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", mu = mu, sigma = sigma, Llim=95, Ulim=105) test <- data.frame(mean=c(97,98.3,102.5), sd=c(0.55, 1.5, 1.2)) pi_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, test.point=test) ## End(Not run)
## Not run: ## Example verifying simulation resutls in the textbook page 249 mu <- seq(95, 105, 0.1) sigma <- seq(0.2, 3.5, 0.1) pi_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", mu = mu, sigma = sigma, Llim=95, Ulim=105) mu <- seq(90, 110, 0.5) pi_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", mu = mu, sigma = sigma, Llim=90, Ulim=110) mu <- seq(95,105,0.1) sigma <- seq(0.1,2.5,0.1) pi_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", mu = mu, sigma = sigma, Llim=95, Ulim=105) test <- data.frame(mean=c(97,98.3,102.5), sd=c(0.55, 1.5, 1.2)) pi_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, test.point=test) ## End(Not run)
The function for plotting the OC curves and optimizing the baseline and high performance PPQ plans, given lower and upper specification limits.
pi_occurve(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, add.reference)
pi_occurve(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, add.reference)
attr.name |
user-defined attribute name |
attr.unit |
user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
alpha |
significant level for constructing the prediction interval. |
add.reference |
logical; if |
OC curves for specification test and PPQ plan.
Yalin Zhu
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. Springer.
pi_pp
and rl_pp
.
## Not run: pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01)) pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), n.batch=3) # Baseline curve pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), alpha = 0.1135434) # High performance curve pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), alpha = 0.0225518) # 95% with reference curves pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), add.reference=TRUE) pi_occurve(attr.name = "Composite Assay", attr.unit = "%", mu = 100, sigma = seq(0.1,6,0.1), Llim=95, Ulim=105, n.batch=1, add.reference=TRUE) pi_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=97, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) pi_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=100, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) pi_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=seq(95,105,0.1), sigma=1, Llim=95, Ulim=105, n=10, add.reference=TRUE) pi_occurve(attr.name = "Protein Concentration", attr.unit="%", mu=seq(90, 110, 0.1), sigma=1.25, Llim=90, Ulim=110, add.reference=TRUE) ## End(Not run)
## Not run: pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01)) pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), n.batch=3) # Baseline curve pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), alpha = 0.1135434) # High performance curve pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), alpha = 0.0225518) # 95% with reference curves pi_occurve(attr.name = "Total Protein", attr.unit = "mg/mL", sigma = seq(0.01,1,0.01), add.reference=TRUE) pi_occurve(attr.name = "Composite Assay", attr.unit = "%", mu = 100, sigma = seq(0.1,6,0.1), Llim=95, Ulim=105, n.batch=1, add.reference=TRUE) pi_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=97, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) pi_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=100, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) pi_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=seq(95,105,0.1), sigma=1, Llim=95, Ulim=105, n=10, add.reference=TRUE) pi_occurve(attr.name = "Protein Concentration", attr.unit="%", mu=seq(90, 110, 0.1), sigma=1.25, Llim=90, Ulim=110, add.reference=TRUE) ## End(Not run)
The function for calculating the probability of passing critical quality attributes (CQA) PPQ test .
pi_pp(Llim, Ulim, mu, sigma, n, n.batch, alpha)
pi_pp(Llim, Ulim, mu, sigma, n, n.batch, alpha)
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
alpha |
significant level for constructing the prediction interval. |
A numeric value of the passing/acceptance probability
Yalin Zhu
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. Springer.
rl_pp
.
## Not run: pi_pp(sigma=0.5, mu=2.5, n=10, n.batch=1, Llim=1.5, Ulim=3.5, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = pi_pp, mu=97, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = pi_pp, mu=100, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05) ## End(Not run)
## Not run: pi_pp(sigma=0.5, mu=2.5, n=10, n.batch=1, Llim=1.5, Ulim=3.5, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = pi_pp, mu=97, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = pi_pp, mu=100, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05) ## End(Not run)
The function for calculating the probability of passing a general upper and/or lower boundary.
pp(Llim, Ulim, mu, sigma, n)
pp(Llim, Ulim, mu, sigma, n)
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) |
A numeric value of the passing/acceptance probability
Yalin Zhu
rl_pp
and PPQ_pp
.
The function for plotting the heatmap to evaluate the PPQ plan based on the specification test, given lower and upper specification limits.
PPQ_ctplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, k, test.point)
PPQ_ctplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, k, test.point)
attr.name |
(optional) user-defined attribute name for PPQ assessment |
attr.unit |
(optional) user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
k |
general multiplier for constructing the specific interval |
test.point |
(optional) actual process data points for testing whether the processes pass PPQ |
Heatmap (or Contour Plot) for PPQ Assessment.
Yalin Zhu
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. Springer.
PPQ_pp
and PPQ_occurve
.
## Not run: mu <- seq(1.6,3.4,0.05) sigma <- seq(0.05,0.8,0.01) PPQ_ctplot(attr.name = "Total Protein", attr.unit = "mg/mL", Llim=1.5, Ulim=3.5, mu = mu, sigma = sigma, k=2.373) ## Example verifying simulation resutls in the textbook page 249 mu <- seq(95, 105, 0.1) sigma <- seq(0.2, 5, 0.1) PPQ_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373) mu <- seq(90, 110, 0.5) PPQ_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", Llim=90, Ulim=110, mu = mu, sigma = sigma, k=2.373) mu <- seq(95,105,0.1) sigma <- seq(0.1,2.5,0.1) PPQ_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373) test <- data.frame(mean=c(97,98.3,102.5), sd=c(0.55, 1.5, 1.2)) PPQ_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373, test.point=test) ## End(Not run)
## Not run: mu <- seq(1.6,3.4,0.05) sigma <- seq(0.05,0.8,0.01) PPQ_ctplot(attr.name = "Total Protein", attr.unit = "mg/mL", Llim=1.5, Ulim=3.5, mu = mu, sigma = sigma, k=2.373) ## Example verifying simulation resutls in the textbook page 249 mu <- seq(95, 105, 0.1) sigma <- seq(0.2, 5, 0.1) PPQ_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373) mu <- seq(90, 110, 0.5) PPQ_ctplot(attr.name = "Composite Assay", attr.unit = "%LC", Llim=90, Ulim=110, mu = mu, sigma = sigma, k=2.373) mu <- seq(95,105,0.1) sigma <- seq(0.1,2.5,0.1) PPQ_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373) test <- data.frame(mean=c(97,98.3,102.5), sd=c(0.55, 1.5, 1.2)) PPQ_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373, test.point=test) ## End(Not run)
The function for dynamically plotting (ggplot) the heatmap to evaluate the PPQ plan based on the specification test, given lower and upper specification limits.
PPQ_ggplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, k, test.point, dynamic)
PPQ_ggplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, k, test.point, dynamic)
attr.name |
(optional) user-defined attribute name for PPQ assessment |
attr.unit |
(optional) user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
k |
general multiplier for constructing the specific interval |
test.point |
(optional) actual process data points for testing whether the processes pass PPQ |
dynamic |
logical; if |
Dynamic Heatmap (or Contour Plot) for PPQ Assessment.
Yalin Zhu
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. Springer.
PPQ_pp
and PPQ_occurve
.
## Not run: mu <- seq(95, 105, 0.1) sigma <- seq(0.1,1.7,0.1) PPQ_ggplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373, dynamic = FALSE) test <- data.frame(mu=c(97,98.3,102.5), sd=c(0.55, 1.5, 0.2)) PPQ_ggplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373, test.point = test) ## End(Not run)
## Not run: mu <- seq(95, 105, 0.1) sigma <- seq(0.1,1.7,0.1) PPQ_ggplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373, dynamic = FALSE) test <- data.frame(mu=c(97,98.3,102.5), sd=c(0.55, 1.5, 0.2)) PPQ_ggplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", Llim=95, Ulim=105, mu = mu, sigma = sigma, k=2.373, test.point = test) ## End(Not run)
The function for plotting the OC curve to show the PPQ plan, given lower and upper specification limits.
PPQ_occurve(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, k, add.reference)
PPQ_occurve(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, k, add.reference)
attr.name |
(optional) user-defined attribute name |
attr.unit |
(optional) user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
k |
general multiplier for constructing the specific interval |
add.reference |
logical; if |
OC curves for specification test and PPQ plan.
Yalin Zhu
Yalin Zhu
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. Springer.
PPQ_pp
and rl_pp
.
## Not run: PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=97, sigma=seq(0.1, 10, 0.1), n=10, k=2.373, add.reference=TRUE) PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=100, sigma=seq(0.1, 10, 0.1), n=10, k=2.373, add.reference=TRUE) PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=seq(95,105,0.1), sigma=1, n=10, k=2.373) PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=seq(95,105,0.1), sigma=1, n=10, k=2.373, add.reference=TRUE) PPQ_occurve(attr.name = "Protein Concentration", attr.unit="%", Llim=90, Ulim=110, mu=seq(90, 110, 0.1), sigma=1.25, k=2.373) ## Only display referece curves, leave k as NULL by default PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%LC", Llim=95, Ulim=105, mu=98, sigma=seq(0.1, 10, 0.1), n=10, add.reference=TRUE) ## End(Not run)
## Not run: PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=97, sigma=seq(0.1, 10, 0.1), n=10, k=2.373, add.reference=TRUE) PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=100, sigma=seq(0.1, 10, 0.1), n=10, k=2.373, add.reference=TRUE) PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=seq(95,105,0.1), sigma=1, n=10, k=2.373) PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", Llim=95, Ulim=105, mu=seq(95,105,0.1), sigma=1, n=10, k=2.373, add.reference=TRUE) PPQ_occurve(attr.name = "Protein Concentration", attr.unit="%", Llim=90, Ulim=110, mu=seq(90, 110, 0.1), sigma=1.25, k=2.373) ## Only display referece curves, leave k as NULL by default PPQ_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%LC", Llim=95, Ulim=105, mu=98, sigma=seq(0.1, 10, 0.1), n=10, add.reference=TRUE) ## End(Not run)
The function for calculating the probability of passing critical quality attributes (CQA) PPQ test .
PPQ_pp(Llim, Ulim, mu, sigma, n, n.batch, k)
PPQ_pp(Llim, Ulim, mu, sigma, n, n.batch, k)
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
k |
general multiplier for constructing the specific interval |
A numeric value of the passing/acceptance probability
Yalin Zhu
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. Springer.
rl_pp
.
## Not run: PPQ_pp(Llim = 90, Ulim = 110, mu=105, sigma=1.5, n=10, k=3.1034) # One-sided tolerance interval with k=0.753 (95/67.5 one-sided tolerance interval LTL) PPQ_pp(sigma=0.03, mu=1.025, n=40, Llim=1, Ulim=Inf, k=0.753) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = PPQ_pp, mu=97, n=10, Llim=95, Ulim=105, k=2.373) sapply(X=seq(0.1,10,0.1), FUN = PPQ_pp, mu=97, n=10, Llim=95, Ulim=105, k=2.373) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = PPQ_pp, mu=100, n=10, Llim=95, Ulim=105, k=2.373) sigma <- seq(0.1, 4, 0.1) pp1 <- sapply(X=sigma, FUN = PPQ_pp, mu=97, n=10, Llim=95, Ulim=105, k=2.373) pp2 <- sapply(X=sigma, FUN = PPQ_pp, mu=98, n=10, Llim=95, Ulim=105, k=2.373) pp3 <- sapply(X=sigma, FUN = PPQ_pp, mu=99, n=10, Llim=95, Ulim=105, k=2.373) pp4 <- sapply(X=sigma, FUN = PPQ_pp, mu=100, n=10, Llim=95, Ulim=105, k=2.373) plot(sigma, pp1, xlab="Standard Deviation", main="LSL=95, USL=105, k=2.373, n=10", ylab="Probability of Passing", type="o", pch=1, col=1, lwd=1, ylim=c(0,1)) lines(sigma, pp2, type="o", pch=2, col=2) lines(sigma, pp3, type="o", pch=3, col=3) lines(sigma, pp4, type="o", pch=4, col=4) legend("topright", legend=paste0(rep("mu=",4),c(97,98,99,100)), bg="white", col=c(1,2,3,4), pch=c(1,2,3,4), lty=1, cex=0.8) mu <- seq(95, 105, 0.1) pp5 <- sapply(X=mu, FUN = PPQ_pp, sigma=0.5, n=10, Llim=95, Ulim=105, k=2.373) pp6 <- sapply(X=mu, FUN = PPQ_pp, sigma=1, n=10, Llim=95, Ulim=105, k=2.373) pp7 <- sapply(X=mu, FUN = PPQ_pp, sigma=1.5, n=10, Llim=95, Ulim=105, k=2.373) pp8 <- sapply(X=mu, FUN = PPQ_pp, sigma=2, n=10, Llim=95, Ulim=105, k=2.373) pp9 <- sapply(X=mu, FUN = PPQ_pp, sigma=2.5, n=10, Llim=95, Ulim=105, k=2.373) plot(mu, pp5, xlab="Mean Value", main="LSL=95, USL=105, k=2.373, n=10", ylab="Probability of Passing", type="o", pch=1, col=1, lwd=1, ylim=c(0,1)) lines(mu, pp6, type="o", pch=2, col=2) lines(mu, pp7, type="o", pch=3, col=3) lines(mu, pp8, type="o", pch=4, col=4) lines(mu, pp9, type="o", pch=5, col=5) legend("topright", legend=paste0(rep("sigma=",5),seq(0.5,2.5,0.5)), bg="white", col=c(1,2,3,4,5), pch=c(1,2,3,4,5), lty=1, cex=0.8) ## End(Not run)
## Not run: PPQ_pp(Llim = 90, Ulim = 110, mu=105, sigma=1.5, n=10, k=3.1034) # One-sided tolerance interval with k=0.753 (95/67.5 one-sided tolerance interval LTL) PPQ_pp(sigma=0.03, mu=1.025, n=40, Llim=1, Ulim=Inf, k=0.753) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = PPQ_pp, mu=97, n=10, Llim=95, Ulim=105, k=2.373) sapply(X=seq(0.1,10,0.1), FUN = PPQ_pp, mu=97, n=10, Llim=95, Ulim=105, k=2.373) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = PPQ_pp, mu=100, n=10, Llim=95, Ulim=105, k=2.373) sigma <- seq(0.1, 4, 0.1) pp1 <- sapply(X=sigma, FUN = PPQ_pp, mu=97, n=10, Llim=95, Ulim=105, k=2.373) pp2 <- sapply(X=sigma, FUN = PPQ_pp, mu=98, n=10, Llim=95, Ulim=105, k=2.373) pp3 <- sapply(X=sigma, FUN = PPQ_pp, mu=99, n=10, Llim=95, Ulim=105, k=2.373) pp4 <- sapply(X=sigma, FUN = PPQ_pp, mu=100, n=10, Llim=95, Ulim=105, k=2.373) plot(sigma, pp1, xlab="Standard Deviation", main="LSL=95, USL=105, k=2.373, n=10", ylab="Probability of Passing", type="o", pch=1, col=1, lwd=1, ylim=c(0,1)) lines(sigma, pp2, type="o", pch=2, col=2) lines(sigma, pp3, type="o", pch=3, col=3) lines(sigma, pp4, type="o", pch=4, col=4) legend("topright", legend=paste0(rep("mu=",4),c(97,98,99,100)), bg="white", col=c(1,2,3,4), pch=c(1,2,3,4), lty=1, cex=0.8) mu <- seq(95, 105, 0.1) pp5 <- sapply(X=mu, FUN = PPQ_pp, sigma=0.5, n=10, Llim=95, Ulim=105, k=2.373) pp6 <- sapply(X=mu, FUN = PPQ_pp, sigma=1, n=10, Llim=95, Ulim=105, k=2.373) pp7 <- sapply(X=mu, FUN = PPQ_pp, sigma=1.5, n=10, Llim=95, Ulim=105, k=2.373) pp8 <- sapply(X=mu, FUN = PPQ_pp, sigma=2, n=10, Llim=95, Ulim=105, k=2.373) pp9 <- sapply(X=mu, FUN = PPQ_pp, sigma=2.5, n=10, Llim=95, Ulim=105, k=2.373) plot(mu, pp5, xlab="Mean Value", main="LSL=95, USL=105, k=2.373, n=10", ylab="Probability of Passing", type="o", pch=1, col=1, lwd=1, ylim=c(0,1)) lines(mu, pp6, type="o", pch=2, col=2) lines(mu, pp7, type="o", pch=3, col=3) lines(mu, pp8, type="o", pch=4, col=4) lines(mu, pp9, type="o", pch=5, col=5) legend("topright", legend=paste0(rep("sigma=",5),seq(0.5,2.5,0.5)), bg="white", col=c(1,2,3,4,5), pch=c(1,2,3,4,5), lty=1, cex=0.8) ## End(Not run)
The function for calculating the probability of passing critical quality attributes (CQA) specification test .
rl_pp(Llim, Ulim, mu, sigma, NV)
rl_pp(Llim, Ulim, mu, sigma, NV)
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
NV |
nominal volume for the specification test. |
A numeric value of the passing/acceptance probability
Yalin Zhu
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. Springer.
PPQ_pp
, pi_pp
and ti_pp
.
rl_pp(Llim=1.5, Ulim=3.5, mu=2.5, sigma=0.8)
rl_pp(Llim=1.5, Ulim=3.5, mu=2.5, sigma=0.8)
The function for plotting the heatmap to evaluate the PPQ plan based on the specification test, given lower and upper specification limits.
ti_ctplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, coverprob, side, test.point)
ti_ctplot(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, coverprob, side, test.point)
attr.name |
user-defined attribute name for PPQ assessment |
attr.unit |
user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
alpha |
significant level for constructing the tolerance interval. |
coverprob |
coverage probability for constructing the tolerance interval |
side |
whether a 1-sided or 2-sided tolerance interval is required (determined by side = 1 or side = 2, respectively). |
test.point |
(optional) actual process data points for testing whether the processes pass PPQ |
Heatmap (or Contour Plot) for PPQ Assessment.
Yalin Zhu
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. Springer.
ti_pp
and ti_occurve
.
## Not run: mu <- seq(95,105,0.1) sigma <- seq(0.1,2.5,0.1) ti_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", mu = mu, sigma = sigma, Llim=95, Ulim=105) ti_ctplot(attr.name = "Extractable Volume", attr.unit = "% of NV=1mL", Llim = 100, Ulim = Inf, mu=seq(100, 110, 0.5), sigma=seq(0.2, 15 ,0.5), n=40, alpha = 0.05, coverprob = 0.675, side=1) ## End(Not run)
## Not run: mu <- seq(95,105,0.1) sigma <- seq(0.1,2.5,0.1) ti_ctplot(attr.name = "Sterile Concentration Assay", attr.unit = "%", mu = mu, sigma = sigma, Llim=95, Ulim=105) ti_ctplot(attr.name = "Extractable Volume", attr.unit = "% of NV=1mL", Llim = 100, Ulim = Inf, mu=seq(100, 110, 0.5), sigma=seq(0.2, 15 ,0.5), n=40, alpha = 0.05, coverprob = 0.675, side=1) ## End(Not run)
The function for plotting the OC curve to show the PPQ plan based on the specification test, given lower and upper specification limits.
ti_occurve(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, coverprob, side, add.reference, NV)
ti_occurve(attr.name, attr.unit, Llim, Ulim, mu, sigma, n, n.batch, alpha, coverprob, side, add.reference, NV)
attr.name |
user-defined attribute name |
attr.unit |
user-defined attribute unit |
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
alpha |
significant level for constructing the tolerance interval. |
coverprob |
coverage probability for constructing the tolerance interval |
side |
whether a 1-sided or 2-sided tolerance interval is required (determined by side = 1 or side = 2, respectively). |
add.reference |
logical; if |
NV |
nominal volume for the specification test. |
OC curves for specification test and PPQ plan.
Yalin Zhu
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. Springer.
ti_pp
and rl_pp
.
## Not run: ti_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=97, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) ti_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=100, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) ti_occurve(attr.name = "Extractable Volume", attr.unit = "% of NV=3mL", Llim = 100, Ulim = Inf, mu=102.5, sigma=seq(0.2, 6 ,0.05), n=40, alpha = 0.05, coverprob = 0.97, side=1, NV=3) ti_occurve(attr.name = "Extractable Volume", attr.unit = "% of NV=3mL", Llim = 100, Ulim = Inf, mu=102.5, sigma=seq(0.2, 6 ,0.05), n=40, alpha = 0.05, coverprob = 0.992, side=1, NV=3) ## End(Not run)
## Not run: ti_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=97, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) ti_occurve(attr.name = "Sterile Concentration Assay", attr.unit="%", mu=100, sigma=seq(0.1, 10, 0.1), Llim=95, Ulim=105, n=10, add.reference=TRUE) ti_occurve(attr.name = "Extractable Volume", attr.unit = "% of NV=3mL", Llim = 100, Ulim = Inf, mu=102.5, sigma=seq(0.2, 6 ,0.05), n=40, alpha = 0.05, coverprob = 0.97, side=1, NV=3) ti_occurve(attr.name = "Extractable Volume", attr.unit = "% of NV=3mL", Llim = 100, Ulim = Inf, mu=102.5, sigma=seq(0.2, 6 ,0.05), n=40, alpha = 0.05, coverprob = 0.992, side=1, NV=3) ## End(Not run)
The function for calculating the probability of passing critical quality attributes (CQA) PPQ test .
ti_pp(Llim, Ulim, mu, sigma, n, n.batch, alpha, coverprob, side)
ti_pp(Llim, Ulim, mu, sigma, n, n.batch, alpha, coverprob, side)
Llim |
lower specification limit |
Ulim |
upper specification limit |
mu |
hypothetical mean of the attribute |
sigma |
hypothetical standard deviation of the attribute |
n |
sample size (number of locations) per batch |
n.batch |
number of batches for passing PPQ during validation |
alpha |
significant level for constructing the tolerance interval |
coverprob |
coverage probability for constructing the tolerance interval |
side |
whether a 1-sided or 2-sided tolerance interval is required (determined by side = 1 or side = 2, respectively). |
A numeric value of the passing/acceptance probability
Yalin Zhu
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. Springer.
rl_pp
.
ti_pp(sigma=0.5, mu=2.5, n=10, n.batch=1, Llim=1.5, Ulim=3.5, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = ti_pp, mu=97, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = ti_pp, mu=100, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05)
ti_pp(sigma=0.5, mu=2.5, n=10, n.batch=1, Llim=1.5, Ulim=3.5, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = ti_pp, mu=97, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05) sapply(X=c(0.1,0.5, 1,2,3,4,5,10), FUN = ti_pp, mu=100, n=10, Llim=95, Ulim=105, n.batch=1, alpha=0.05)