| Title: | Generalized Process Capability Indices under Progressive Type-II Censoring |
|---|---|
| Description: | Provides a comprehensive generalized framework for parameter estimation and Generalized Process Capability Indices (GPCIs) under Progressive Type-II censored data using the MleCensoR package. Accepts user-supplied probability density functions (PDF/PMF), cumulative distribution functions (CDF), and survival functions (SF). Computes classical and generalized capability indices including Cpy (Maiti et al., 2010 <doi:10.1080/16843703.2010.11673233>), Spmk (Dey & Saha, 2019 <doi:10.1007/s41872-019-00081-4>), CpTk (Saha et al., 2019), Cpc (Saha et al., 2022 <doi:10.1080/02664763.2021.1971632>), CNpmc (Alotaibi et al., 2022 <doi:10.1155/2022/3135264>), CNpmkc (Saha et al., 2024 <doi:10.1142/S021853932450013X>), CNpk (Saha et al., 2018 <doi:10.1080/21681015.2018.1437793>), and Vannman's Cp(u,v) family. Evaluates parametric and non-parametric bootstrap confidence intervals at 90%, 95%, and 99% levels of significance. Computes Standard Errors, Mean Squared Error (MSE), Bias, and Coverage Probabilities for model parameters and capability indices. References: Balakrishnan & Aggarwala (2000) <doi:10.1007/978-1-4612-1186-0>, Maiti, Saha & Nanda (2010) <doi:10.1080/16843703.2010.11673233>, Saha, Dey & Maiti (2018) <doi:10.1080/21681015.2018.1437793>, Dey & Saha (2019) <doi:10.1007/s41872-019-00081-4>, Saha, Dey & Maiti (2019), Alotaibi, Dey & Saha (2022) <doi:10.1155/2022/3135264>, Saha, Dey & Nadarajah (2022) <doi:10.1080/02664763.2021.1971632>, Saha, Tripathi & Dey (2024) <doi:10.1142/S021853932450013X>. |
| Authors: | Shikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Sumit Kumar [aut], Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut] |
| Maintainer: | Shikhar Tyagi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-11 12:31:40 UTC |
| Source: | https://github.com/cran/gpciProgTyII |
Computes parametric and non-parametric bootstrap confidence intervals for Generalized Process Capability Indices (GPCIs) and model parameters under progressive Type-II censoring at 90%, 95%, and 99% significance levels.
boot_ci_prog( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric") ) gpc_boot( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric") )boot_ci_prog( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric") ) gpc_boot( fit, B = 1000, alpha = c(0.1, 0.05, 0.01), method = c("percentile", "normal", "basic", "BCp", "BCa", "studentized"), type = c("parametric", "nonparametric") )
fit |
A |
B |
Number of bootstrap replicates (default 1000). |
alpha |
Vector of significance levels (default |
method |
Confidence interval method. Options: |
type |
Resampling type: |
An object of class "gpc_prog_ci" containing confidence interval tables, standard errors, MSE, and bias.
dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) ci <- boot_ci_prog(fit, B = 50, alpha = c(0.10, 0.05, 0.01), method = "percentile") print(ci)dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) ci <- boot_ci_prog(fit, B = 50, alpha = c(0.10, 0.05, 0.01), method = "percentile") print(ci)
Computes classical and generalized Process Capability Indices (PCIs) for progressive
Type-II censored data using model parameter estimates obtained from MleCensoR.
capability_prog( x = NULL, r_removals = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Cp", "Cpk", "Cpu", "Cpl", "Cpm", "Cpmk", "Spmk", "CpTk", "Cpc", "CNpmc"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL ) gpc_fit( x = NULL, r_removals = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Cp", "Cpk", "Cpu", "Cpl", "Cpm", "Cpmk", "Spmk", "CpTk", "Cpc", "CNpmc"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL )capability_prog( x = NULL, r_removals = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Cp", "Cpk", "Cpu", "Cpl", "Cpm", "Cpmk", "Spmk", "CpTk", "Cpc", "CNpmc"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL ) gpc_fit( x = NULL, r_removals = NULL, distribution, USL, LSL, target = (USL + LSL)/2, indices = c("Cpy", "Cp", "Cpk", "Cpu", "Cpl", "Cpm", "Cpmk", "Spmk", "CpTk", "Cpc", "CNpmc"), u = 1, v = 1, mode = c("moments", "quantile"), fit = TRUE, C0 = 1, C1 = 0, C2 = 1, tolerance_t = USL - LSL, P0 = 0.9973002, LDL = LSL, UDL = USL )
x |
Numeric vector of observed failure times under progressive Type-II censoring. Can be |
r_removals |
Numeric vector of removal counts (censoring scheme R). |
distribution |
A |
USL |
Upper Specification Limit. |
LSL |
Lower Specification Limit. |
target |
Process target (defaults to |
indices |
Vector of capability indices to compute. Choices include |
u |
Weight parameter |
v |
Weight parameter |
mode |
Mode of evaluation: |
fit |
Logical. If |
C0, C1, C2
|
Parameters for loss/tolerance cost function in |
tolerance_t |
Tolerance length |
P0 |
Desired conformance level for |
LDL, UDL
|
Lower and Upper Desired Limits for |
An object of class c("gpc_prog_fit", "gpcifit").
dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) cap <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) print(cap)dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) cap <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) print(cap)
Evaluates standard error, MSE, bias, and empirical coverage probability for parameters and GPCIs under progressive Type-II censoring.
eval_performance( distribution, r_removals, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) ) gpc_sim( distribution, r_removals, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) )eval_performance( distribution, r_removals, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) ) gpc_sim( distribution, r_removals, USL, LSL, target = (USL + LSL)/2, true_indices = NULL, M = 100, B = 200, alpha = c(0.1, 0.05, 0.01) )
distribution |
A |
r_removals |
Progressive censoring scheme vector R. |
USL |
Upper Specification Limit. |
LSL |
Lower Specification Limit. |
target |
Process target. |
true_indices |
Optional named vector of true index values. |
M |
Number of Monte Carlo simulation runs (default 100). |
B |
Number of bootstrap iterations per run (default 200). |
alpha |
Vector of significance levels (default |
A list containing performance tables and coverage probabilities.
dist_true <- dist_weibull(shape = 2, scale = 5) r_scheme <- c(2, 0, 3, 0, 1) eval_res <- eval_performance(dist_true, r_scheme, USL = 10, LSL = 0, M = 5, B = 20) print(eval_res)dist_true <- dist_weibull(shape = 2, scale = 5) r_scheme <- c(2, 0, 3, 0, 1) eval_res <- eval_performance(dist_true, r_scheme, USL = 10, LSL = 0, M = 5, B = 20) print(eval_res)
Fits process distribution parameters to progressive Type-II censored data using
the MleCensoR package (mle_progressive_type2).
fit_prog_ty2( x, r_removals, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... )fit_prog_ty2( x, r_removals, distribution, start = NULL, method = NULL, lower = NULL, upper = NULL, ... )
x |
Numeric vector of observed failure times (must be sorted in ascending order). |
r_removals |
Numeric vector of progressive removal counts (censoring scheme R). |
distribution |
A |
start |
Vector of initial parameter values. |
method |
Optimization method (e.g. |
lower |
Optional lower bounds for parameters. |
upper |
Optional upper bounds for parameters. |
... |
Additional arguments passed to |
A fitted gpc_dist object with updated parameters, log-likelihood, standard errors, and covariance matrix.
dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- fit_prog_ty2(x = x, r_removals = r, distribution = dist_exp)dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- fit_prog_ty2(x = x, r_removals = r, distribution = dist_exp)
Dispatcher for Index Value Retrieval
gpc_index(fit, index)gpc_index(fit, index)
fit |
A |
index |
Name of index to extract or compute. |
Numeric value of the specified index.
dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) gpc_index(fit, "Cpy")dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) gpc_index(fit, "Cpy")
Builds a distribution specification object for parameter estimation and Generalized Process Capability Indices (GPCIs) under Progressive Type-II Censored Data.
make_gpc_dist( name, pdf, cdf, surv = NULL, quantile = NULL, start, param_names = paste0("param", seq_along(start)), support = c(0, Inf) )make_gpc_dist( name, pdf, cdf, surv = NULL, quantile = NULL, start, param_names = paste0("param", seq_along(start)), support = c(0, Inf) )
name |
Character string giving the name of the distribution. |
pdf |
Function |
cdf |
Function |
surv |
Function |
quantile |
Optional function |
start |
Vector of initial parameter values for estimation. |
param_names |
Character vector of parameter names. |
support |
Numeric vector of length 2 giving domain support of the distribution. |
An object of class "gpc_dist".
pdf_exp <- function(x, theta) dexp(x, rate = theta[1]) cdf_exp <- function(x, theta) pexp(x, rate = theta[1]) surv_exp <- function(x, theta) 1 - pexp(x, rate = theta[1]) dist <- make_gpc_dist("Exponential", pdf_exp, cdf_exp, surv_exp, start = c(1), param_names = "rate")pdf_exp <- function(x, theta) dexp(x, rate = theta[1]) cdf_exp <- function(x, theta) pexp(x, rate = theta[1]) surv_exp <- function(x, theta) 1 - pexp(x, rate = theta[1]) dist <- make_gpc_dist("Exponential", pdf_exp, cdf_exp, surv_exp, start = c(1), param_names = "rate")
Provides plot S3 methods for fitted progressive Type-II capability objects and bootstrap confidence interval results.
## S3 method for class 'gpc_prog_fit' plot(x, ...) ## S3 method for class 'gpc_prog_ci' plot(x, index = NULL, ...)## S3 method for class 'gpc_prog_fit' plot(x, ...) ## S3 method for class 'gpc_prog_ci' plot(x, index = NULL, ...)
x |
Object of class |
... |
Additional plot parameters. |
index |
Name of index or parameter to plot for |
Invisibly returns the input object.
dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) plot(fit)dist_exp <- dist_weibull(shape = 1, scale = 1) x <- c(0.5, 1.2, 2.1, 3.4, 4.8) r <- c(1, 0, 2, 0, 1) fit <- capability_prog(x = x, r_removals = r, distribution = dist_exp, USL = 6, LSL = 0) plot(fit)
Built-in helper functions creating "gpc_dist" objects for standard process distributions.
dist_normal(mean = 0, sd = 1) dist_weibull(shape = 1, scale = 1) dist_gamma(shape = 1, rate = 1) dist_exp_exp(alpha = 1, lambda = 1) dist_logistic_exp(alpha = 1, lambda = 1)dist_normal(mean = 0, sd = 1) dist_weibull(shape = 1, scale = 1) dist_gamma(shape = 1, rate = 1) dist_exp_exp(alpha = 1, lambda = 1) dist_logistic_exp(alpha = 1, lambda = 1)
mean |
Initial mean for Normal distribution. |
sd |
Initial standard deviation for Normal distribution. |
shape |
Initial shape parameter. |
scale |
Initial scale parameter. |
rate |
Initial rate parameter. |
alpha |
Initial alpha shape parameter. |
lambda |
Initial lambda scale parameter. |
A "gpc_dist" object.
d_norm <- dist_normal() d_weib <- dist_weibull()d_norm <- dist_normal() d_weib <- dist_weibull()